Commit Graph

41 Commits

Author SHA1 Message Date
Robert Maynard
e28244f345 Re-implement DeviceAdapterRuntimeDetector to avoid ODR violations.
The previous implementation of DeviceAdapterRuntimeDetector caused
multiple differing definitions of the same class to exist and
was causing the runtime device tracker to report CUDA as disabled
when it actually was enabled.

The ODR was caused by having a default implementation for
DeviceAdapterRuntimeDetector and a specific specialization for
CUDA. If a library had both CUDA and C++ sources it would pick up
both implementations and would have undefined behavior. In general
it would think the CUDA backend was disabled.

To avoid this kind of situation in the future I have reworked VTK-m
so that each device adapter must implement DeviceAdapterRuntimeDetector
for that device.
2018-05-15 13:08:34 -04:00
luz.paz
80b11afa24 Misc. typos
Found via `codespell -q 3` via downstream VTK
2018-01-30 06:51:47 -05:00
Li-Ta Lo
8622a2423c Merge topic 'connected_component'
bdb9c37e update based on issues pointed out by Robert
a713a0d8 Generalize and documentation for DeviceAdapterAlgorithm::Transform
29232c49 Revert un-intended change to examples
7ef956a9 Merge branch 'master' into connected_component
a9ed1ecf add CMakeLists.txt for header files
ba3cba64 update copyright statements
aa96874e Merge branch 'connected_component' of gitlab.kitware.com:ollielo/vtk-m into connected_component
2f07119e Merge branch 'master' into connected_component
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1044
2018-01-17 15:31:10 -05:00
Li-Ta Lo
a713a0d889 Generalize and documentation for DeviceAdapterAlgorithm::Transform
Generalize DeviceAdapterAlgorithm::Transform to accept input array of different value and storage type.
Add doxygen documentation in DeviceAdapterAlgorithm.h
2018-01-16 14:43:31 -07:00
Robert Maynard
96ccf14c73 Correct bad formatting in some vtkm::cont headers 2018-01-15 10:45:16 -05:00
Matt Larsen
bf6cb1bd62 removing state from functors and adding variadic templates 2017-12-11 14:15:12 -08:00
Matt Larsen
013113e393 Fixing streaming scan doc 2017-11-29 07:47:06 -08:00
Kenneth Moreland
038e12e09f Document ScanExclusive algorithm
The documentation for one of the versions of ScanExclusive was
missing in doxygen.
2017-10-24 14:29:57 -06:00
Allison Vacanti
1018d981a0 Check for overlap in CopySubRange.
Some parallel copy implementations will not handle this sanely.
2017-10-11 16:52:32 -04:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
Allison Vacanti
c9c7149ca3 Fix typo in ReduceByKey docstring. 2017-09-11 15:59:08 -04:00
Robert Maynard
b85cdd9080 Convert VTK-m over to use 'using' instead of 'typedef' 2017-08-07 14:05:43 -04:00
Robert Maynard
c09e88d214 Improve the overall doxygen content for vtk-m. 2017-07-07 11:14:25 -04:00
Robert Maynard
5dd346007b Respect VTK-m convention of parameters all or nothing on a line
clang-format BinPack settings have been disabled to make sure that the
VTK-m style guideline is obeyed.
2017-05-26 13:53:28 -04:00
Robert Maynard
60a405ef65 Add TaskTiling1D/3D which use faux virtuals to reduce binary size.
Redesigns the TBB and Serial backends and the vtkm::exec::Task concept so that
we can re-use the same launching logic for all Worklets, instead of generating
per worlet code. To keep the performance the same the TilingTask now is past
a range of indices to work on, rather than a single index.

Binary size reduction:
WorkletTests_SERIAL old - 19MB
WorkletTests_SERIAL new - 18MB

WorkletTests_TBB old - 39MB
WorkletTests_TBB new - 18MB

libvtkAcceleratorsVTKm old - 48MB
libvtkAcceleratorsVTKm new - 19MB
2017-05-25 11:00:01 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Li-Ta Lo
987b51f604 add comments on ScanInclusiveByKey and ScanExclusiveByKey 2017-04-26 16:31:20 -06:00
Sujin Philip
9eddce6c99 Rename StreamCompact to CopyIf
Plus, removes the version that uses one array as both input and stencil.
2017-03-06 11:08:27 -05:00
David C. Lonie
7a41621d82 Move default device selection out of private headers.
This will make the librarification of vtk-m easier as we tread that
path.

Refs #120.
2017-02-16 13:40:35 -05:00
Robert Maynard
2cfc9743e3 Reduce can support reduce to a T type that isn't the arrayhandles T type.
This has been done so that operations such as computing the Min/Max of
an array can be done in a single reduce step.
2016-11-25 11:40:46 -05:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07:00
Christopher Sewell
c6e15c1240 Merge remote-tracking branch 'upstream/master' into StreamingArray 2016-10-07 18:10:29 -06:00
Robert Maynard
0f58d6fc54 Add vtkm/cont/serial directory for the serial backend. 2016-09-28 14:22:53 -04:00
Christopher Sewell
d92f39df12 Merge branch 'master' into StreamingArray 2016-09-15 17:54:59 -06:00
Christopher Sewell
610f96a831 Adding streaming inclusive scan 2016-09-15 17:46:09 -06:00
Robert Maynard
f81c42b9b4 Replace NULL with nullptr where applicable. 2016-09-01 09:38:25 -04:00
Robert Maynard
51e50d2933 Add DeviceAdapter::CopySubRange to all device adapters.
This allows callers to copy a subsection of an array into another array,
without clearing the contents of the destination array if a resize
is required.
2016-08-24 15:42:51 -04:00
Matt Larsen
2baac9cd8b initial commit of atomic adds 2016-02-10 07:51:31 -08: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
Robert Maynard
9597620a60 Update the name of predicates, and binary functors. 2015-06-22 11:13:27 -04:00
Robert Maynard
10fdb5baf3 Update the Documentation for DeviceAdapter::Copy 2015-06-22 11:13:27 -04:00
Sujin Philip
08f88b1cb9 Add TBB backend. 2015-06-01 13:57:37 -04:00
Robert Maynard
d54aee7eb5 Merge branch 'fix_typo_in_copyright' 2015-05-21 10:32:08 -04:00
Robert Maynard
6b8e7822be The Copyright statement now has all the periods in the correct location. 2015-05-21 10:30:11 -04:00
Robert Maynard
f2b47ffd4a Add ReduceByKey to the DeviceAdapter. 2015-05-21 08:23:28 -04:00
Robert Maynard
be193542ac Introduce StreamCompact with a custom stencil unary predicate. 2015-05-21 08:23:28 -04:00
Robert Maynard
e38caafe37 Adding Reduce with custom operator to the DeviceAdapterAlgorithm. 2015-05-14 15:16:49 -04:00
Robert Maynard
5d9f369d0c Adding ScanInclusive with custom binary operator to DeviceAdapterAlgorithm. 2015-05-14 15:16:49 -04:00
Robert Maynard
9519737b3a Adding Reduce to the DeviceAdapterAlgorithm. 2015-05-14 15:16:49 -04:00
Robert Maynard
d9270e408d Adding a cuda device adapter to vtkm.
Porting the dax device adapter over to vtkm. Unlike the dax version, doesn't
use the thrust::device_vector, but instead uses thrust::system calls so that
we can support multiple thrust based backends.

Also this has Texture Memory support for input array handles. Some more work
will need to be done to ArrayHandle so that everything works when using an
ArrayHandle inplace with texture memory bindings.
2014-12-19 13:47:28 -05:00
Robert Maynard
e2eb901be3 move DeviceAdapterAlgorithm to correct folder as it's namespace 2014-12-18 11:09:15 -05:00