Commit Graph

1391 Commits

Author SHA1 Message Date
Chuck Atkins
86bb45b9ad Simplify the ifdef conditions used for vector pragma definitions 2016-01-13 12:48:03 -05:00
Chuck Atkins
429350ab41 Merge topic 'fix-gcc-pragma'
ccdb7bb6 Fix incorrect vectorization pragma for GCC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !308
2016-01-12 12:26:42 -05:00
Chuck Atkins
ccdb7bb6cf Fix incorrect vectorization pragma for GCC 2016-01-12 11:10:20 -05:00
Robert Maynard
02d10e38c4 Merge topic 'fix-gcc-pragma'
9e9e3caf Fix a misplaced '\' for GCC pragmas in Configure.h.in

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !305
2016-01-11 15:23:51 -05:00
Chuck Atkins
9e9e3caf3c Fix a misplaced '\' for GCC pragmas in Configure.h.in 2016-01-11 14:52:41 -05:00
Robert Maynard
360694b54c Merge topic 'reset_type_and_storage_in_single_call'
b70a000a Allow resetting the Type and Storage of a DynamicArrayHandle in a single call.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !302
2016-01-08 12:25:39 -05:00
Robert Maynard
34ad520987 Merge topic 'marching_cubes_normal_generation_option'
82a573f7 MarchingCubes is now able to not generate normals.
502e7c28 Merge branch 'cleanup_scatter_counting_uses' into marching_cubes_normal_generation_option
8079dc28 MarchingCubes generate step now requires a ScatterCounting object.
4cd2f582 Add a default constructor for ScatterCounting.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !300
2016-01-08 11:50:10 -05:00
Robert Maynard
b70a000ac0 Allow resetting the Type and Storage of a DynamicArrayHandle in a single call.
vtkm::filter has the use case where we need to reset both the type and
storage of an array handle, by doing both at the same time we can reduce
the number of temporary objects, and invalid conversions of arrays.
2016-01-08 11:47:59 -05:00
Robert Maynard
82a573f712 MarchingCubes is now able to not generate normals. 2016-01-08 10:42:49 -05:00
Kenneth Moreland
378004f629 Merge branch 'point-count' into 'master'
Add PointCount to WorkletMapPointToCell.

WorkletMapPointToCell is a convenience subclass of WorkletMapTopology.
As such, it renames all the From/To signature tags to say Point/Cell to
be easier to read. However, the alias for FromCount was missing. Add the
alias PointCount.

See merge request !303
2016-01-07 18:59:41 -05:00
Kenneth Moreland
23c3cd3020 Add PointCount to WorkletMapPointToCell.
WorkletMapPointToCell is a convenience subclass of WorkletMapTopology.
As such, it renames all the From/To signature tags to say Point/Cell to
be easier to read. However, the alias for FromCount was missing. Add the
alias PointCount.
2016-01-07 15:26:29 -07:00
Robert Maynard
a6088807c0 Merge topic 'correct_tbb_sort_by_key'
c7756c78 TBB SortByKey works now when the key is a ArrayHandleZip.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !301
2016-01-05 10:40:33 -05:00
Robert Maynard
a0d86165aa Merge topic 'restrict_output_types_on_marching_cubes'
30ac46f2 We know the exact FieldOutCell types for MarchingCubes, so restrict it.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !299
2016-01-05 10:40:06 -05:00
Robert Maynard
5500bae951 Merge topic 'allow_empty_field_construction'
c2ba8baf Allow vtkm::cont::Field to have a default constructor.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !297
2016-01-05 10:39:36 -05:00
Kenneth Moreland
d502f6e28b Merge branch 'composite-array-handle-in-control' into 'master'
Support control array portals in ArrayHandleCompositeVector.

Previously, the ArrayHandleCompositeVector had a separate implementation
of ArrayPortal for the control and execution environments. Because I was
lazy when I implemented it, the control version did not support Get.

Since originally implementing this class, VTK-m now allows defining
methods that are declared as working in both control and execution
environments (VTKM_EXEC_CONT_EXPORT) but only work in one or the other
depending on methods of templated subclasses they call. Thus, solve this
problem by simply removing the control version of the portal and use the
same portal for both.

See merge request !296
2016-01-04 19:32:32 -05:00
Robert Maynard
c7756c78bb TBB SortByKey works now when the key is a ArrayHandleZip.
The issue was that the temporary index array storage container
was the same as the input ArrayHandleZip which is not correct.
2016-01-04 16:55:47 -05:00
Robert Maynard
502e7c28f2 Merge branch 'cleanup_scatter_counting_uses' into marching_cubes_normal_generation_option 2016-01-04 16:52:46 -05:00
Robert Maynard
30ac46f20e We know the exact FieldOutCell types for MarchingCubes, so restrict it.
By restricting the types explicitly in the ControlSignature we reduce
the code bloat, if we ever pass in a DynamicArrayHandle as one of those
parameters.
2016-01-04 16:43:28 -05:00
Robert Maynard
8079dc28f0 MarchingCubes generate step now requires a ScatterCounting object.
Instead of having the generate step templated on the device adapter and
the counting handle, we take in a fully constructed scatter counting object.
2016-01-04 16:38:11 -05:00
Robert Maynard
4cd2f582f4 Add a default constructor for ScatterCounting.
Without a default constructor for ScatterCounting any class that wants
to hold onto a ScatterCounting object is required to know what device
they are running on. By allowing default construction, we can move that
requirement to just have a method on the object require a device adapter
object.
2016-01-04 16:00:29 -05:00
Robert Maynard
c2ba8baf7c Allow vtkm::cont::Field to have a default constructor.
When designing vtkm::filter we needed the ability to construct invalid Fields.
This now allows us to do exactly that.
2016-01-04 15:40:37 -05:00
Kenneth Moreland
e874b52f18 Support control array portals in composite vector.
Previously, the ArrayHandleCompositeVector had a separate implementation
of ArrayPortal for the control and execution environments. Because I was
lazy when I implemented it, the control version did not support Get.

Since originally implementing this class, VTK-m now allows defining
methods that are declared as working in both control and execution
environments (VTKM_EXEC_CONT_EXPORT) but only work in one or the other
depending on methods of templated subclasses they call. Thus, solve this
problem by simply removing the control version of the portal and use the
same portal for both.
2016-01-04 12:53:56 -07:00
Robert Maynard
b93658b403 Merge topic 'correct_serial_sort_by_key'
c9751b0d Serial SortByKey works now when the key is a ArrayHandleZip.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !295
2015-12-31 15:13:17 -05:00
Robert Maynard
c9751b0d40 Serial SortByKey works now when the key is a ArrayHandleZip.
The issue was that the temporary index array storage container
was the same as the input ArrayHandleZip which is not correct.
2015-12-31 14:45:18 -05:00
T.J. Corona
d3e85af554 Merge topic 'install-missing-file'
b17bfb2d Install RuntimeDeviceInformation.h.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !294
2015-12-23 14:57:06 -05:00
T.J. Corona
b17bfb2d43 Install RuntimeDeviceInformation.h. 2015-12-23 14:54:41 -05:00
Kenneth Moreland
35cf44c466 Merge branch 'num-points-in-cell-set' into 'master'
Add GetNumberOfPoints to CellSet.

This is a pure virtual method that all CellSet subclasses must
implement. I needed to add an implementation to CellSetPermutation.

See merge request !293
2015-12-22 11:06:19 -05:00
Kenneth Moreland
5fd5353194 Add GetNumberOfPoints to CellSet.
This is a pure virtual method that all CellSet subclasses must
implement. I needed to add an implementation to CellSetPermutation.
2015-12-21 17:27:54 -07:00
Robert Maynard
37851dbe9f Merge topic 'numeric_device_adapter_id'
c70da5fc Extend vtkm::DeviceAdapterTraits to include a unique numeric identifier.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !292
2015-12-16 13:56:33 -05:00
Robert Maynard
c70da5fc23 Extend vtkm::DeviceAdapterTraits to include a unique numeric identifier.
Previously each device adapter only had a unique string name. This was
not the best when it came to developing data structures to track the status
of a given device at runtime.

This adds in a unique numeric identifier to each device adapter. This will
allow classes to easily create bitmasks / lookup tables for the validity of
devices.
2015-12-16 11:18:52 -05:00
Kenneth Moreland
c382847a91 Merge branch 'old-gcc-pragmas' into 'master'
Fixes for older compilers

This branch fixes some issues that have occurred on older compilers
(specifically on GCC 4.4).


See merge request !290
2015-12-16 10:31:37 -05:00
Robert Maynard
f96206338f Merge topic 'enable_runtime_detection_of_cuda'
a7127f0f Adding vtkm::cont::RuntimeDeviceInformation.
7d249e89 Move DeviceAdapterTraits into vtkm::cont as they are user API.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !287
2015-12-16 08:48:24 -05:00
Robert Maynard
a7127f0fc3 Adding vtkm::cont::RuntimeDeviceInformation.
The RuntimeDeviceInformation class allows developers to check if a given
device is supported on a machine at runtime. This allows developers to properly
check for CUDA support before running any worklets.
2015-12-15 17:25:27 -05:00
Kenneth Moreland
2e8873272d Add parentheses around condition in VTKM_STATIC_ASSERT_MSG
This is necessary for older compilers.
2015-12-15 10:29:53 -07:00
Kenneth Moreland
ea69785009 Disable warning push/pop on older compilers
Older GCC compilers (earlier than 4.6) do not support the diagnostic
pragmas that push and pop the warning levels. This change just disables
the warnings we need to for third party libraries and leaves them off.
This means you might miss some legit warnings on older compilers, but
most developers use newer compilers anyway, and the push/pop should
still work there.
2015-12-14 10:54:02 -07:00
Robert Maynard
95efdf25e2 Merge topic 'bad_test_for_cell_average'
7b7a56c6 UnitTestCellAverage now properly verifies against an explicit cell set.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !289
2015-12-14 12:53:08 -05:00
Robert Maynard
7b7a56c664 UnitTestCellAverage now properly verifies against an explicit cell set. 2015-12-14 10:07:32 -05:00
Robert Maynard
3688153a9f Merge topic 'mclarsen/vtk-m-bugfix/explicitCellSet'
ef0b78b9 Fixing explicit cell set bug

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !288
2015-12-11 15:52:49 -05:00
Matt Larsen
ef0b78b9ff Fixing explicit cell set bug 2015-12-11 13:38:37 -05:00
Robert Maynard
7d249e8996 Move DeviceAdapterTraits into vtkm::cont as they are user API.
When writing multiple backend code users of vtkm need to use the
DeviceAdapterTraits classes, so therefore we should move them to vtkm::cont
to signify this.
2015-12-11 09:52:18 -05:00
Robert Maynard
36e927c47c Merge topic 'reduce_test_failures'
4fd4095b Extend the timeout for vtkm worklet tests to reduce timeout failures.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !286
2015-12-10 16:04:56 -05:00
Robert Maynard
4fd4095b36 Extend the timeout for vtkm worklet tests to reduce timeout failures.
Dejagore and Renar are both having tests timeout, so lets extend the window.
2015-12-10 15:28:36 -05:00
Robert Maynard
9d172652fb Merge topic 'add_easy_cuda_flags_to_cmake'
f6ae5f3d CUDA GPU architecture detection now works with MSVC generators.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !285
2015-12-10 13:30:47 -05:00
Robert Maynard
f6ae5f3dec CUDA GPU architecture detection now works with MSVC generators. 2015-12-10 09:34:30 -05:00
Robert Maynard
33cac51e22 Merge topic 'add_easy_cuda_flags_to_cmake'
204804af Teach VTK-m how to specify the CUDA GPU architecture to build for.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !281
2015-12-10 09:08:18 -05:00
Robert Maynard
204804af50 Teach VTK-m how to specify the CUDA GPU architecture to build for.
Like the ability to specify the vectorization level, users of CMake can
now specify what GPU architectures they want to build for. Most users
should just use the default 'native'.
2015-12-09 13:17:00 -05:00
Kenneth Moreland
763de94aca Merge branch 'whole-array-control-signature' into 'master'
WholeArray tag for ControlSignature

Add WholeArrayIn, WholeArrayInOut, and WholeArrayOut tags for ControlSignature. They tags behave similarly to using an ExecObject tag with an ExecutionWholeArray or ExecutionWholeArrayConst object. However, the WholeArray* tags can simplify some implementations in two ways. First, it allows you to specify more precisely what data is passed in. You have to pass in an ArrayHandle or else an error will occur (as opposed to be able to pass in any type of execution object). Second, this allows you to easily pass in arrays stored in DynamicArrayHandle objects. The Invoke mechanism will automatically find the appropriate static class. This cannot be done easily with ExecutionWholeArray.


See merge request !284
2015-12-07 18:24:54 -05:00
Kenneth Moreland
0475e1cd18 Merge branch 'use-stl-min-max' into 'master'
Use std::Min/Max over fmin/fmax

We had a report that vtkm::Min/Max was significantly slower than other
products. This was traced back to the fact that these functions were not
completely inlining because they were calling fmin or fmax, and that
resulted in an actual C library call. It turns out using the templated
functions in the std namespace is faster.

This change has the VTK-m min/max functions use the std version in
almost all circumstances. The one exception (so far) is that fmin and
fmax are used for CUDA devices since the std functions are not declared
to run on the device and the nvcc compiler treats these functions
special.

See merge request !279
2015-12-07 12:51:44 -05:00
Kenneth Moreland
6f03f72b49 Use WholeArrayIn instead of ExecObject for MarchingCubes worklets
The two worklets for marching cubes use tables stored in arrays that
have random access. Previously, they arrays were passed using the
ExecObject tag in ControlSignature along with ExecutionWholeArrayConst.
This changes to using a WholeArrayIn tag and just passing the
ArrayHandle directly to the Invoke method. The end result is the same,
but the code is a bit cleaner.
2015-12-07 09:52:29 -07:00
Kenneth Moreland
2ac8456b5e Add WholeArray* ControlSignature tags
The WholeArrayIn, WholeArrayInOut, and WholeArrayOut ControlSignature
tags behave similarly to using an ExecObject tag with an
ExecutionWholeArray or ExecutionWholeArrayConst object. However, the
WholeArray* tags can simplify some implementations in two ways. First,
it allows you to specify more precisely what data is passed in. You have
to pass in an ArrayHandle or else an error will occur (as opposed to be
able to pass in any type of execution object). Second, this allows you
to easily pass in arrays stored in DynamicArrayHandle objects. The
Invoke mechanism will automatically find the appropriate static class.
This cannot be done easily with ExecutionWholeArray.
2015-12-07 09:52:29 -07:00