Commit Graph

420 Commits

Author SHA1 Message Date
Robert Maynard
ff687016ee For VTK-m libs all includes of DeviceAdapterTagCuda happen from cuda files
It is very easy to cause ODR violations with DeviceAdapterTagCuda.
If you include that header from a C++ file and a CUDA file inside
the same program we an ODR violation. The reasons is that the C++
versions will say the tag is invalid, and the CUDA will say the
tag is valid.

The solution to this is that any compilation unit that includes
DeviceAdapterTagCuda from a version of VTK-m that has CUDA enabled
must be invoked by the cuda compiler.
2019-04-22 10:39:54 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
ff30684c8e Removes the default device macros from VTK-m
Fixes #116
2019-04-15 08:15:36 -04:00
Robert Maynard
1d980ed147 Thrust Patches tried to apply CUDA 10.1 patches to CUDA 10.0 2019-04-10 14:46:56 -04:00
Robert Maynard
f05940aaca ThrustPatches now only patches fixes for relevant cuda versions
Rather than always patch Thrust functions, we now only patch
based on the Thrust version.
2019-04-10 11:18:42 -04:00
Robert Maynard
20d6201a98 Suppress thrust::mr::stateless_resource_allocator host/device warnings 2019-04-10 09:46:34 -04:00
Robert Maynard
58884a7299 Fix warnings found when cuda is the cuda host compiler 2019-04-05 15:40:03 -04:00
Kenneth Moreland
e43770a376 Update pyexpander input files to work with python 3
Python 3 does not use xrange anymore. Use the range function instead.
2019-04-04 11:20:56 -06:00
Robert Maynard
4f2156dfaf Thrust detail::aligned_reinterpret_cast doesn't warn now
We specialize aligned_reinterpret_cast inside vtk-m to fix the
issues related to missing __host__ __device__ markups on the
function.
2019-04-03 12:48:33 -04:00
Robert Maynard
f4840618cf Make sure ThrustPatches is included before thrust. 2019-04-03 08:51:05 -04:00
Kenneth Moreland
04254dbd25 Merge topic 'specialize-worklet-for-device'
4e34feecb Add ability to specialize worklet for device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1608
2019-04-02 12:08:01 -04:00
Kenneth Moreland
4e34feecb4 Add ability to specialize worklet for device
This adds an ExecutionSignature tag named Device that passes the
DeviceAdapterTag as an argument to the worklet's operator(). This allows
worklets to specialize their code based on the device.
2019-04-01 10:01:54 -06:00
Dave Pugmire
3bb79a2e4f Add use of 'this->' to adhere to VTK-m coding standards. 2019-04-01 10:00:35 -04:00
Dave Pugmire
611b93e621 Use FloatDefault. 2019-04-01 09:31:17 -04:00
Robert Maynard
b9e0e541b8 VTK-m once again uses consistent include style 2019-03-28 14:12:08 -04:00
Sujin Philip
178da6c0dc Make PointLocatorUniformGrid default constructible
plus some style changes to match VTK-m style.
2019-03-18 16:34:49 -04:00
Dave Pugmire
9b9742f436 Merge branch 'no-recurse-bih' of https://gitlab.kitware.com/kmorel/vtk-m into gridEval 2019-03-15 13:05:39 -04:00
Kenneth Moreland
8127093a2f Add CellLocator to name of BoundingIntervalHierarchy
This will help identify the nature of this object as well as find cell
locator implementations.
2019-03-14 16:13:59 -06:00
Kenneth Moreland
c008df90cc Non-recursive method to find cells in BoundingIntervalHierarchyExec
CUDA devices have problems with recursive algorithms that have no well-
defined depth because the stack on a CUDA device tends to be pretty
short. Fix the problem for BoundingIntervalHierarchyExec by changing to
a state-machine based algorithm that follows the hierarchy up and down.
2019-03-14 15:52:55 -06:00
Kenneth Moreland
c463bbec93 Add parent index to BIH tree
This will help us traverse back up the tree without a call stack (which
is causing issues on CUDA).
2019-03-14 15:52:47 -06:00
Dave Pugmire
533f2e5eb3 Cleanup. 2019-03-14 09:39:56 -04:00
Dave Pugmire
722d4262e1 extend stacksize 2019-03-13 08:17:54 -04:00
Dave Pugmire
2eca1d7a1d Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into gridEval 2019-03-04 14:34:11 -05:00
Kenneth Moreland
191d6e5580 Add Mask capabilities to worklets
Mask objects allow you to specify which output values should be
generated when a worklet is run. That is, the Mask allows you to skip
the invocation of a worklet for any number of outputs.
2019-02-25 08:58:39 -07:00
Kenneth Moreland
1ca55ac319 Add specialized operators for ArrayPortalValueReference
The ArrayPortalValueReference is supposed to behave just like the value
it encapsulates and does so by automatically converting to the base type
when necessary. However, when it is possible to convert that to
something else, it is possible to get errors about ambiguous overloads.
To avoid these, add specialized versions of the operators to specify
which ones should be used.

Also consolidated the CUDA version of an ArrayPortalValueReference to the
standard one. The two implementations were equivalent and we would like
changes to apply to both.
2019-02-20 13:33:55 -07:00
Dave Pugmire
314ebd3dc6 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into gridEval 2019-02-18 14:38:37 -05:00
Dave Pugmire
5a63b19c2b Fixes for uniform cell locator for points right on the boundary. Also added some tests for boundary points. 2019-02-01 08:43:54 -05:00
Dave Pugmire
529b7c2178 Fix issue with points on the boundary. 2019-01-31 11:08:02 -05:00
Dave Pugmire
9974cb064a Fix source file inclusion and copyright test failures. 2019-01-31 08:57:00 -05:00
Robert Maynard
5508d17c31 Merge topic 'correct_broken_install'
24e71d251 VTK-m yet again has properly installed headers.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1525
2019-01-24 14:59:41 -05:00
Robert Maynard
24e71d251b VTK-m yet again has properly installed headers.
Fixes the install issues mentioned in #342
2019-01-24 14:26:40 -05:00
Allison Vacanti
03fc7b66d0 Add VTKM_CUDA_DEVICE_PASS preprocessing definition.
This is only set while compiling device code, and is useful
for code that needs different implementations on devices (e.g.
they call CUDA device intrinsics, etc).
2019-01-24 11:23:45 -05:00
Robert Maynard
d6f66d17a3 Testing run methods now take argc/argv to init logging/runtime device
`vtkm::cont::testing` now initializes with logging enabled and support
for device being passed on the command line, `vtkm::testing` only
enables logging.
2019-01-17 13:16:27 -06:00
Robert Maynard
4ec5bae02d Remove VTK-m TestBuild infrastructure
The purpose of the TestBuild infrastructure was to confirm that
VTK-m didn't have any lexical issues when it was a pure header
only project. As we now move to have more compiled components
the need for this form of testing is mitigated. Combined
with the issue of TestBuilds causing MSVC issues, we should
just remove this infrastructure.
2019-01-16 10:04:33 -06:00
Abhishek Yenpure
afd0409189 Merge topic 'code_sprint_locator_fixes'
9b56d41fe Fixing Rectilinear Grid Cell Locator
10e9d47dc Removing std::out print statement from test
34c7b57d8 Merge branch 'code_sprint_locator_fixes' of gitlab.kitware.com:ayenpure/vtk-m into code_sprint_locator_fixes
62ee1a2c8 Updates to the Cell Locators
7eb0de5b7 Merge branch 'code_sprint_locator_fixes' of gitlab.kitware.com:ayenpure/vtk-m into code_sprint_locator_fixes
866b0798d Resolving type warnings
c062f2e26 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into code_sprint_locator_fixes
797c83891 Adding default constructor and removing wrong comment
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1395
2019-01-09 16:23:17 -05:00
ayenpure
9b56d41fe0 Fixing Rectilinear Grid Cell Locator
- Using exec portal in cont environment made the tests to fail
  on the GPUs.
2019-01-07 18:11:35 -08:00
ayenpure
62ee1a2c8a Updates to the Cell Locators
- Adding updates to uniform grid cell locator
  - adding OpenMP test, updating copyrights
- Adding rectilinear grid cell locator
  - adding unit tests for serial, tbb, OpenMP, and cuda
- Updating CMakeLists to honor the alphabetical ordering
2019-01-06 17:18:23 -08:00
Robert Maynard
20d02fdec2 Support pointers in vtkm::exec::Fetch classes 2018-12-27 13:19:40 -05:00
Allison Vacanti
58509f647e Store return value after parameters.
This allows execution signatures like

using ExecutionSignature = _1(_1, ...)

to work as expected.
2018-12-21 11:37:45 -05:00
Kenneth Moreland
1766f213ea Merge topic 'dynamic-neighborhood-size'
82536092c Rename boundary classes
e008aff27 Change neighborhood parameter from layer to radius
7f627380b Fix Marching Cubes regression test
01a9e8541 Change WorkletPointNeighborhood to specify neighborhood at runtime

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1457
2018-12-04 16:02:46 -05:00
Sujin Philip
6d81bc8b06 Implement extents support
Adds a variable `GlobalPointIndexStart` to `CellSetStructured`.
Adding this to the cell-set, instead of the coordinate system, enables this
feature for different types of datasets like uniform grid, rectilinear, etc.,
with this one change.
The extents can be computed using `GlobalPointIndexStart` and `PointDimensions`.
2018-12-03 15:56:45 -05:00
Kenneth Moreland
82536092cc Rename boundary classes
Did a bit of renaming of the support classes used for
WorkletPointNeighborhood. First, the OnBoundary tag is changed to
Boundary to match other tags and reflect some changes in the resulting
methods. Also moved the BoundaryState and Neighborhood classes from
vtkm::exec::arg to vtkm::exec to be more accessible. Finally, the
Neighborhood class name was changed to FieldNeighborhood to be more
specific on what role this class plays with neighborhood.
2018-12-03 12:45:23 -07:00
Kenneth Moreland
e008aff27b Change neighborhood parameter from layer to radius
It was determined that the word "radius" more clearly described how the
size of the neighborhood is determined.
2018-12-03 12:45:23 -07:00
Kenneth Moreland
01a9e85416 Change WorkletPointNeighborhood to specify neighborhood at runtime
Previously, WorkletPointNeighborhood had a template argument to select
the size of the neighborhood. This change removes that template
argument. Instead, the vtkm::exec::arg::BoundaryState methods now take
in a size parameter when determining when it overlaps the boundary.

If in the future we want to add the ability to select the neighborhood
size at compile-time (for performance reasons), I suggest adding this
template argument to the OnBoundary tag for ExecutionSignature.
2018-12-03 12:45:23 -07:00
ayenpure
c062f2e26c Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into code_sprint_locator_fixes 2018-12-03 07:44:31 -08:00
Kenneth Moreland
3e3baad6f8 Add better queries to vtkm::exec::arg::BoundaryState
Previously, vtkm::exec::arg::BoundaryState only provided methods that
said whether or not the neighborhood extened past the boundary of a
mesh. That is fine for a 3x3x3 neighborhood, which can only extend over
the boundary by one. However, that is problematic for larger
neighborhoods where you may need to know how far neighborhood extends
over the boundary.

This changes allows you to query how far the neighborhood extends within
the constrains of the boundary.
2018-11-13 22:45:06 -06:00
luz.paz
d5beb69ec1 Misc. typos
Found via `codespell`
2018-10-04 10:30:33 -04:00
Robert Maynard
fc6fcee8fd Merge topic 'support_connectivity_with_no_default_constructor'
d1d8756dc ThreadIndicesTopologyMap supports types without a default constructor

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1410
2018-09-18 11:49:32 -04:00
Robert Maynard
2c218dd958 Merge topic 'osx_static_warnings'
c0a5e1624 Fix vtk-m warnings on static osx builds.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1408
2018-09-13 15:46:37 -04:00
Robert Maynard
d1d8756dc9 ThreadIndicesTopologyMap supports types without a default constructor
Previously IndicesFromType had to support the default constructor
2018-09-13 09:40:28 -04:00