Commit Graph

5186 Commits

Author SHA1 Message Date
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
389eaa2c34 Merge topic 'VirtualObjectHandle_tests_include_RuntimeDeviceTracker'
4240111dd Make sure VirtualObjectHandle tests include RuntimeDeviceTracker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1322
2018-07-18 12:49:50 -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
Allison Vacanti
a0186866a3 Merge topic 'aaargh_redux'
feb987fec Fix bad target name.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1314
2018-07-11 11:32:38 -04:00
Allison Vacanti
feb987fec2 Fix bad target name. 2018-07-11 11:02:13 -04: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
2df26f3752 Merge topic 'update-diy'
2f57470a1 Merge branch 'upstream-diy' into update-diy
20c5aaeff diy 2018-07-09 (38da7b11)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1313
2018-07-10 14:04:45 -04: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
Diy Upstream
20c5aaeff0 diy 2018-07-09 (38da7b11)
Code extracted from:

    https://gitlab.kitware.com/third-party/diy2.git

at commit 38da7b11dc265918fbef8779af4533fb2b3ebe5e (for/vtk-m).
2018-07-10 13:52:20 -04:00
Allison Vacanti
8afb5e5499 Merge topic 'aaargh_failure'
e95734ef2 Fix compilation on ICC. Option/definition mismatch.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1312
2018-07-10 11:00:20 -04:00
Allison Vacanti
e95734ef2d Fix compilation on ICC. Option/definition mismatch. 2018-07-10 10:48:19 -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
376b304275 Merge topic 'Create-warp-by-Vector-workletAndFilter'
a4c4c1931 Add a warpVector worklet and filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1268
2018-07-09 15:18:31 -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
776d085464 Merge topic 'remove_cyclic_target_dependencies'
2ebde3806 Remove cyclic link between vtkm_developer_flags and vtkm_compiler_flags.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1309
2018-07-09 11:28:38 -04:00
Robert Maynard
2ebde3806a Remove cyclic link between vtkm_developer_flags and vtkm_compiler_flags.
Fixes #263
The vtkm_developer_flags target should only be to be consumed by
vtkm_compiler_flags.
2018-07-09 08:27:41 -04:00
Robert Maynard
1e28a9e3ae Merge topic 'support_pointers_as_input_to_dispatcher_invoke'
64958b014 VTK-m now supports passing pointers when invoking worklets.
c631dccfc Invocation parameters are now non const and can be 'modified'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1303
2018-07-06 16:12:53 -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
4c3e4462cb Merge topic 'fix_msvc2017_tuple_get'
be31ce012 Merge branch 'upstream-taotuple' into fix_msvc2017_tuple_get
a8fcccdeb taotuple 2018-07-05 (ee1b4af3)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1307
2018-07-05 11:19:01 -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
TaoCpp Tuple Upstream
a8fcccdeb2 taotuple 2018-07-05 (ee1b4af3)
Code extracted from:

    https://gitlab.kitware.com/third-party/taotuple.git

at commit ee1b4af3ccfaf0d7fd703b8cfea5dafd942ae0f5 (for/vtk-m).
2018-07-05 09:50:31 -04:00
Robert Maynard
5ced0da8f5 Try to ice the ubuntu 17.10 + cuda 9.1 compiler 2018-07-05 09:14:52 -04:00
Robert Maynard
9531af6d25 Merge topic 'force_point_locator_tests_to_use_correct_device'
e5090e128 Make sure the PointLocatorUniform uses the correct runtime device
38e0e4c33 Mark PointLocatorUniformGrid constructors as host only

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1306
2018-07-05 08:39:06 -04:00
Matthew Letter
25d1403615 fix bad rabse for wireframer
applied master to wireframmer and applied my changes back over it to fix a possible bad rebase
2018-07-03 15:52:53 -06:00