Commit Graph

3844 Commits

Author SHA1 Message Date
Robert Maynard
a5bcba2b4e Fix GCC 7 uninitialized warnings in ArrayPortalUniformPointCoordinates 2018-07-30 11:59:13 -04:00
Robert Maynard
4ca4c17415 DeviceAdapterTagTestAlgorithmGeneral Id is positive value.
All valid devices must use a positive integer value as the
RuntimeTracker and VirtualObject consider all negative values
to be errors.
2018-07-25 14:09:00 -04:00
Robert Maynard
b51c773766 Allow ArrayHandleBasicImpl to work when we add new devices
Previously ArrayHandleBasicImpl had no support for OpenMP since
we forgot to update the implementation. This version will
work when adding new devices without any changes.
2018-07-25 12:57:27 -04:00
Robert Maynard
42af1d09c2 Merge topic 'ExecutionArrayInterfaceBasic_explicitly_constructs_DeviceAdapterIds'
e031e6496 ExecutionArrayInterfaceBasic<T> explicitly construct DeviceAdapterId objects
86b9ab996 Refactor ExecutionArrayInterfaceBasic to use inheriting constructors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1330
2018-07-25 12:53:59 -04:00
Robert Maynard
24d3aa0428 Merge topic 'everyone_treat_deviceAdapterId_as_real_type'
14824bd42 Make sure people always treat DeviceAdapterId as a proper type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1332
2018-07-25 12:05:05 -04:00
Robert Maynard
e031e64967 ExecutionArrayInterfaceBasic<T> explicitly construct DeviceAdapterId objects
Rather than implicitly presume the `VTKM_DEVICE_ADAPTER_` macros can
convert to DeviceAdapterId.
2018-07-25 12:04:30 -04:00
Robert Maynard
86b9ab9969 Refactor ExecutionArrayInterfaceBasic to use inheriting constructors 2018-07-25 12:03:48 -04:00
Robert Maynard
14824bd42e Make sure people always treat DeviceAdapterId as a proper type 2018-07-25 11:00:06 -04:00
Robert Maynard
36be8f97a1 DeviceAdapterAlgorithmOpenMP doesn't depend on the serial device.
It should be possible to build VTK-m without the serial device
adapter enabled, and therefore the OpenMP device shouldn't
rely on it.
2018-07-25 10:37:04 -04:00
Robert Maynard
f6b0c6a7a6 Merge topic 'remove_DeviceAdapterTagCheck'
f6789d9cf Remove DeviceAdapterTagCheck with DeviceAdapterTraits

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1329
2018-07-24 11:12:09 -04:00
Robert Maynard
f6789d9cfd Remove DeviceAdapterTagCheck with DeviceAdapterTraits
The DeviceAdapterTraits already contains if the device adapter is
valid, and therefore DeviceAdapterTagCheck is redundant.
2018-07-24 08:16:48 -04:00
Robert Maynard
552eee9a23 Merge topic 'enable_openmp_worklet_tests'
2c6ca906f Enable building the worklets when OpenMP is enabled.
d595abf90 WrappedBinaryOperator now supports std::vector<bool>::reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1327
2018-07-24 08:08:07 -04:00
mclarsen
a07ca2efcc add RunTriangulator to device sources so it can run with cuda 2018-07-23 19:54:10 -07:00
Robert Maynard
2c6ca906f1 Enable building the worklets when OpenMP is enabled. 2018-07-23 14:33:03 -04:00
Robert Maynard
d595abf907 WrappedBinaryOperator now supports std::vector<bool>::reference 2018-07-23 14:24:19 -04:00
Robert Maynard
8a44d0a5ae Merge topic 'vtkm_cont_less_device_sources'
d7660a556 vtkm_cont listed non-device sources as device-source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1324
2018-07-19 15:57:02 -04:00
Robert Maynard
d3326a37a6 ReverseConnectivityBuilder now uses the new vtkm::cont::AtomicArray
Fixes Issue #270
2018-07-19 13:39:47 -04:00
Robert Maynard
d7660a556c vtkm_cont listed non-device sources as device-source
Cleanup the device sources list in vtkm_cont to only contain
.cxx files that could invoke cuda
2018-07-19 12:59:34 -04:00
Kenneth Moreland
b4bfb95131 Merge topic 'atomic-array-device-execution'
96ae94420 Simplified execution object creation for atomic array
0bd197af9 moved TwoLevelUniformGridExecutionObject to vtkm/exec/internal
6ce895be8 simplified how atomic arrays create execution objects
f1ee5b92a fix a rebase error
25d140361 fix bad rabse for wireframer
f892695f1 fixing so wierd merging issue
9bb00ec66 moved the execution object for TwoLevelUniform grid to vrkm::exec
db1c9bfee Change the namespacing of atomic array
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1243
2018-07-18 18:08:05 -04:00
Robert Maynard
4240111dd8 Make sure VirtualObjectHandle tests include RuntimeDeviceTracker 2018-07-18 10:37:46 -04:00
David Thompson
a92905a545 Merge topic 'oscillator-squashed'
4192b9a1d Add a point-oscillator filter + example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1311
2018-07-18 09:34:26 -04:00
Sebastien Jourdain
4192b9a1d8 Add a point-oscillator filter + example
The oscillator is a simple analytical source of time-varying data.
It provides a function value at each point that is computed as a
sum of Gaussian kernels -- each with a specified position, amplitude,
frequency, and phase.
2018-07-18 09:33:06 -04:00
Robert Maynard
8077b031a8 Merge topic 'uncomment_cuda_range_test'
1e478bbe6 Re-enable UnitTestCudaComputeRange

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1321
2018-07-17 13:28:05 -04:00
Robert Maynard
f331d6d686 Merge topic 'remove_unneeded_typeinfo_includes'
bf49575e0 Remove unneeded typeinfo includes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1320
2018-07-17 13:27:46 -04:00
Robert Maynard
1e478bbe63 Re-enable UnitTestCudaComputeRange 2018-07-17 11:43:19 -04:00
Robert Maynard
bf49575e00 Remove unneeded typeinfo includes 2018-07-17 11:41:53 -04:00
Allison Vacanti
30a3c5a140 Merge topic 'cell_to_point_refactor'
ef578bb2c Reduce computational overhead for reverse connectivity calc.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1294
2018-07-16 11:59:49 -04:00
Allison Vacanti
3089609b98 Merge topic 'wavelet_source'
0d6834476 Add WaveletGenerator worklet.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1310
2018-07-16 11:27:30 -04:00
Allison Vacanti
0d68344769 Add WaveletGenerator worklet. 2018-07-13 14:20:49 -04:00
Allison Vacanti
ef578bb2c7 Reduce computational overhead for reverse connectivity calc.
Benchmarking in VTK showed significant overhead in the computation
of the reverse connectivity calculation in
ConnectivityExplicitInternals::ComputeCellToPointConnectivity.

This patch adds a ReverseConnectivityBuilder that reduces the amount of
time and memory needed to build the table by using an atomic histogram
approach that avoids a costly radix SortByKey.

Key operations in the new helper class are templated to allow this
approach to be reused by VTK-specific cell array converters.
2018-07-13 14:15:06 -04:00
Kenneth Moreland
2dbc45ac08 Merge topic 'fix-cuda-warnings'
6d24343c5 Add exec to ArrayPortalFromIterators constructors
91df12305 Remove VTKM_EXEC modifiers from CPU devices

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1318
2018-07-12 13:18:25 -04:00
Robert Maynard
288719045c Merge topic 'colortable_properly_support_explicit_device_execution'
6dc06423d ColorTable can provide vtkm::exec::Colortable to a specific device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1316
2018-07-12 11:06:07 -04:00
Robert Maynard
6dc06423d8 ColorTable can provide vtkm::exec::Colortable to a specific device
Previously it wasn't possible to get a color table transfered
to a specific device.
2018-07-12 10:28:18 -04:00
Kenneth Moreland
6d24343c51 Add exec to ArrayPortalFromIterators constructors
There is no real reason why you cannot construct an
ArrayPortalFromIterators on a device, so go ahead and let that happen.
(This removes some CUDA warnings about calling __host__ from
__device__.)
2018-07-12 08:09:22 -06:00
Kenneth Moreland
91df123055 Remove VTKM_EXEC modifiers from CPU devices
Having VTKM_EXEC on algorithms for CPU devices was problematic because
the algorithms were specific to the CPU, but during a CUDA compile it
would try to compile device code (for no reasons since it was never
called on a device).

Remove these identifiers for the idea that a device implementation knows
specifically what function modifiers to use and does not need the VTK-m
defined catch-alls.
2018-07-11 16:45:30 -06:00
Haocheng LIU
69aafb1d46 Merge topic 'Create-warp-by-scale-workletAndFilter'
56993bc9e Add a warpScalar worklet and filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1276
2018-07-11 14:50:32 -04:00
Matthew Letter
96ae94420d Simplified execution object creation for atomic array
simplified the creation of the execution object in the transport tag of the atomic array.
2018-07-11 10:58:51 -06:00
Kenneth Moreland
abfc946f84 Merge topic 'exec-objects-as-alg-sort-compare'
f14021dd8 Shorten code for PrepareArgForExec
3b828608a Support ExecArg behavior in vtkm::cont::Algorithm methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1308
2018-07-10 19:01:40 -04:00
Kenneth Moreland
f14021dd84 Shorten code for PrepareArgForExec
By making is_base_of part of PrepareArgForExec, we can shorten not only
the C++ code but also the code that is generated by it.

Also, return && instead of by value when passing through the argument.

Changes thanks to Robert Maynard.
2018-07-10 13:48:20 -06:00
Haocheng LIU
2f57470a13 Merge branch 'upstream-diy' into update-diy
* upstream-diy:
  diy 2018-07-09 (38da7b11)
2018-07-10 13:52:20 -04:00
Matthew Letter
0bd197af96 moved TwoLevelUniformGridExecutionObject to vtkm/exec/internal
Also changed the namespacing to vtkm::exec::twolevelgrid after discussion with Rob
2018-07-09 16:28:09 -06:00
Matthew Letter
6ce895be8d simplified how atomic arrays create execution objects
the way atomic arrays created objects was a little over cmplicated, this commit makes it much simpler
2018-07-09 15:04:23 -06:00
Matthew Letter
f1ee5b92ae fix a rebase error
there was an error rabasing on master that removed these lines of code this commit fixes that error
2018-07-09 14:23:09 -06:00
Haocheng LIU
56993bc9e2 Add a warpScalar worklet and filter
This commit adds a worklet as well as a filter that modify point coordinates by moving points
along point normals by the scalar amount times the scalar factor.
It's a simpified version of the vtkWarpScalar class in VTK. Additionally the filter doesn't
modify the point coordinates, but creates a new point coordinates that have been warped.
2018-07-09 15:33:25 -04:00
Haocheng LIU
a4c4c1931c Add a warpVector worklet and filter
This commit adds a worklet as well as a filter that modify point coordinates by moving points
along a vector by a certain scalar amount.
It's a simpified version of the vtkWarpVector in VTK.
It doesn't modify the point coordinates, but creates a new point coordinates that have been warped.
2018-07-09 14:22:12 -04:00
Robert Maynard
64958b014b VTK-m now supports passing pointers when invoking worklets.
The original design of invoke and the transport infrastructure
relied on the implementation behavior of vtkm::cont types
such as ArrayHandle that used an internal shared_ptr to managed
state. This allowed passing by value instead of passing by
non-const ref when needing to transfer information to the device.

As VTK-m adds support for classes that use virtuals the ability
to pass by base pointer type allows for us to invoke worklets
using a base type without the risk of type slicing.

Additional by moving over to a non-const ref Invocation we
can update all transports that have 'output' to now be
by ref and therefore support types that can't be copied while
being 'more' correct.
2018-07-06 14:27:36 -04:00
Robert Maynard
c631dccfcb Invocation parameters are now non const and can be 'modified'
The invocation parameters need to be non const as we want to
be able to call non-const methods like `PrepareForOutput` on them
from a transport function.

The original implementation abused the fact that everything
could be copied by value and have that work properly. But
when we start introducing virtual classes copying by value of
a base type can cause type slicing.
2018-07-06 14:27:36 -04:00
Kenneth Moreland
3b828608a4 Support ExecArg behavior in vtkm::cont::Algorithm methods
Most of the arguments given to device adapter algorithms are actually
control-side arguments that get converted to execution objects internally
(usually a `vtkm::cont::ArrayHandle`). However, some of the algorithms,
take an argument that is passed directly to the execution environment, such
as the predicate argument of `Sort`. If the argument is a plain-old-data
(POD) type, which is common enough, then you can just pass the object
straight through. However, if the object has any special elements that have
to be transferred to the execution environment, such as internal arrays,
passing this to the `vtkm::cont::Algorithm` functions becomes
problematic.

To cover this use case, all the `vtkm::cont::Algorithm` functions now
support automatically transferring objects that support the `ExecObject`
worklet convention. If any argument to any of the `vtkm::cont::Algorithm`
functions inherits from `vtkm::cont::ExecutionObjectBase`, then the
`PrepareForExecution` method is called with the device the algorithm is
running on, which allows these device-specific objects to be used without
the hassle of creating a `TryExecute`.
2018-07-06 18:57:54 +02:00
Robert Maynard
9238cedcab Merge topic 'ice_nvcc_on_renar'
5ced0da8f Try to ice the ubuntu 17.10 + cuda 9.1 compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1305
2018-07-05 11:36:16 -04:00
Allison Vacanti
be31ce0124 Merge branch 'upstream-taotuple' into fix_msvc2017_tuple_get
* upstream-taotuple:
  taotuple 2018-07-05 (ee1b4af3)
2018-07-05 09:50:31 -04:00