Commit Graph

637 Commits

Author SHA1 Message Date
Mark Kim
6e1d3a84f0 First Extrude commit.
how did any of this work?

match other CellSet file layouts.

???

compile in CUDA.

unit tests.

also only serial.

make error message accurate

Well, this compiles and works now.

Did it ever?

use CellShapeTagGeneric

UnitTest matches previous changes.

whoops

Fix linking problems.

Need the same interface

as other ThreadIndices.

add filter test

okay, let's try duplicating CellSetStructure.

okay

inching...

change to wedge in CellSetListTag

Means changing these to support it.

switch back to wedge from generic

compiles and runs

remove ExtrudedType

need vtkm_worklet

vtkm_worklet needs to be included

fix segment count for wedge specialization

need to actually save the index

for the other constructor.

specialize on Explicit

clean up warning

angled brackets not quotes.

formatting
2019-06-20 22:17:24 -04:00
Robert Maynard
512d0431ec Cell and Point locators have correct export visibility
UBSAN found that these execution object had mixed visibility
causing undefined behavior when casting across DSO's.
2019-06-19 08:36:19 -04:00
Robert Maynard
3c85f7f40f Correct undefined behavior from missing export on ErrorMessageBuffer 2019-06-18 13:53:32 -04:00
Dave Pugmire
d4fffe3f2b Merge topic 'add_polyLine'
401b12bd6 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_polyLine
fea18190f Specialized cases for cell-edge functions on polylines.
d310ec3aa return type is void. Call vertex/line methods, then just return.
d6898b805 Fix cell deriv for polylines and remove print statements.
9157004ac Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_polyLine
d6e2e9588 Remove debugging print statements.
b9d109ab3 Fix for CellEdgeFace test. Case is identical to polygon.
d7e793861 Fix compiler warnings. Comment out std::cout usage for testing with cuda.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1677
2019-05-31 16:53:07 -04:00
Robert Maynard
6775685c72 Update ThrustPatches to be aware of issues fixed in thrust 1.9.6 2019-05-31 10:08:47 -04:00
Dave Pugmire
fea18190f4 Specialized cases for cell-edge functions on polylines. 2019-05-29 09:53:09 -04:00
Dave Pugmire
d310ec3aa6 return type is void. Call vertex/line methods, then just return. 2019-05-29 08:18:31 -04:00
Dave Pugmire
d6898b8052 Fix cell deriv for polylines and remove print statements. 2019-05-28 13:25:23 -04:00
Dave Pugmire
d6e2e9588e Remove debugging print statements. 2019-05-22 14:37:06 -04:00
Dave Pugmire
b9d109ab3d Fix for CellEdgeFace test. Case is identical to polygon. 2019-05-22 13:08:12 -04:00
Dave Pugmire
d7e793861b Fix compiler warnings. Comment out std::cout usage for testing with cuda. 2019-05-22 12:40:45 -04:00
Dave Pugmire
83cf50d549 Fixes for polyline parameterization. 2019-05-22 11:42:49 -04:00
Dave Pugmire
489995782f Support for polylines. 2019-05-17 13:35:35 -04:00
Robert Maynard
61e8003793 Make sure all execution side CellLocator objects have explicit destructors 2019-04-26 10:10:21 -04:00
Robert Maynard
9937f51fe1 Merge topic 'thrust_patch_order'
63c931e63 Correct location of ThrustPatches which clang formatter moved

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1653
2019-04-23 17:37:05 -04:00
Robert Maynard
6fafcf01fd correct compile issues caused by clang formatting.
A couple of tests require vtkm/testing/Testing to be the first include
2019-04-23 17:16:26 -04:00
Robert Maynard
63c931e639 Correct location of ThrustPatches which clang formatter moved 2019-04-23 15:02:58 -04:00
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
Robert Maynard
c0a5e16249 Fix vtk-m warnings on static osx builds. 2018-09-13 09:15:25 -04:00
Kenneth Moreland
1acc610799 Merge topic 'array-handle-transform-exec-object-2'
2b0548739 Add ExecutionAndControlObjectBase
62d3b9f4f Correct warning about potential divide by zero
98a0a20fe Allow ArrayHandleTransform to work with ExecObject

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1403
2018-09-11 10:28:13 -04:00
Matthew Letter
c45716cb3b Removed ExecutionObjectBase from ExecutionWholeArray
ExecutionObjectBase no longer needs to be used for ExecutionWholeArray

also fixed `#endif` naming for our conventions
2018-09-10 11:28:46 -06:00
Kenneth Moreland
2b05487398 Add ExecutionAndControlObjectBase
This is a subclass of ExecutionObject and a superset of its
functionality. In addition to having a PrepareForExecution method, it
also has a PrepareForControl method that gets an object appropriate for
the control environment. This is helpful for situations where you need
code to work in both environments, such as the functor in an
ArrayHandleTransform.

Also added several runtime checks for execution objects and execution
and cotnrol objects.
2018-09-08 11:54:28 -06:00
Aaron Knoll
b18a595d16 ColorTable fix for crash on volta. 2018-08-30 11:27:12 -06:00
ayenpure
22ca8bce15 Fixing unit test 2018-08-30 10:19:00 -07:00
ayenpure
08421eb638 Fixes for CellLocatorUniformGrid
- Fixing compiler warnings
- Making code concise
2018-08-30 09:01:04 -07:00
ayenpure
42e2bb7f9a Updating files with copyrights 2018-08-29 19:46:49 -07:00
ayenpure
594d1934d4 Adding CellLocatorUniformGrid
- Adding a cell locator to locate points in a uniform grid
- Adding unit tests for the new cell locator
2018-08-29 19:30:07 -07:00
ayenpure
b56d1789b0 Fixing Point Locator interface.
- Fixing the point locator interface to make it consistent with the CellLocator
  interface
2018-08-29 19:26:37 -07:00
Sujin Philip
259d670ab5 Merge topic 'cuda-per-thread-streams-2'
06dee259f Minimize cuda synchronizations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1288
2018-07-25 15:07:39 -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
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
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
Robert Maynard
38e0e4c33e Mark PointLocatorUniformGrid constructors as host only 2018-07-03 17:41:56 -04:00
Sujin Philip
06dee259f7 Minimize cuda synchronizations
1. Have a per-thread pinned array for cuda errors
2. Check for errors before scheduling new tasks and at explicit sync points
3. Remove explicit synchronizations from most places

Addresses part 2 of #168
2018-07-03 14:19:06 -04:00
Matthew Letter
9bb00ec66d moved the execution object for TwoLevelUniform grid to vrkm::exec 2018-07-02 16:25:48 -06:00
Matthew Letter
db1c9bfeee Change the namespacing of atomic array
moved the execution object to vtkm::exec and AtomicArray to vtkm::cont
2018-07-02 16:25:48 -06:00
Matthew Letter
6b9cb536a8 added new lines at the end of bot recommended files 2018-07-02 16:21:00 -06:00
Matthew Letter
3c9e7f049f updated Atomic array to use new excution object paradigm 2018-07-02 16:21:00 -06:00
Kenneth Moreland
71486f0864 Fix TestingPointLocatorUniformGrid for double precision
There was an error in TestingPointLocatorUniformGrid in which it was
creating arrays of type vtkm::Float32 and passing them to a worklet that
expected vtkm::FloatDefault. This is corrected.
2018-07-01 11:27:35 +02:00
ayenpure
e2dccee099 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into spatialsearch 2018-06-30 11:56:33 -06:00
Allison Vacanti
ec00a0dced Fix doxygen warning in for exec/PointLocatorUniformGrid. 2018-06-29 15:41:33 -04:00
Abhishek Yenpure
ab81c6335b Changing Float64 to FloatDefault 2018-06-28 13:00:33 -07:00
Kenneth Moreland
4459ab9174 Merge branch 'master' into 'pointlocator-general-interface'
# Conflicts:
#   vtkm/cont/PointLocatorUniformGrid.h
2018-06-28 12:51:08 -04:00
Abhishek Yenpure
72d4556f7d Adding changes for Ken's review from GitLab
- Reducing the stack allocation for CUDA for the BIH unit test
- Adding changes from Ken's review
- Suppress ptxas stack size warning for BoundingIntervalHierarchy
2018-06-27 22:40:13 -06:00
Kenneth Moreland
51fd4a117d Fix warning about __host__/__device__ on default constructor
The vtkm::exec::PointLocatorUniformGrid has a default constructor. It
was "helpfully" declared as VTKM_EXEC_CONT, but apparently that is the
wrong thing to do for constructors that are set to default.
2018-06-28 05:05:54 +02:00
Kenneth Moreland
6f75cd008b Fix crash in CUDA compiler
Previously when PointLocatorUniformGrid.h was compiled by the CUDA
compiler, the compiler would crash. Apparently during the ptxas
part of the compiler goes into a crazy recursion and runs out of
stack space. This appears to be a long-standing bug in CUDA
(been there for multiple releases) without a clear reason why it
sometimes rears its ugly head. (See for example
https://devtalk.nvidia.com/default/topic/1028825/cuda-programming-and-performance/-ptxas-died-with-status-0xc00000fd-stack_overflow-/)

The problem appears to be when having a doubly or triply nested
loop over a box of values to check in the uniform array. This
appears to fix the problem by converting that to a single for
loop with some index magic to convert that to 3D indices.
2018-06-27 23:52:48 +02:00
Allison Vacanti
6db40ae496 Newline needed after \file command.
https://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmdfile
2018-06-27 13:59:07 -04:00
Kenneth Moreland
33f1f2dd1d Make sure all source files are listed in CMake 2018-06-27 10:12:40 +02:00
Li-Ta Lo
d8ff2ba78b Update PointLocator.h to add a newline at the end of file. 2018-06-26 15:44:05 -04:00
Li-Ta Lo
9c2fdd5745 infinite loop at ptxas 2018-06-26 13:35:22 -06:00
Li-Ta Lo
b2f16a64fb Merge branch 'master' into pointlocator2 2018-06-25 14:35:19 -06:00
Li-Ta Lo
8df78aedc7 TestingPointLocatorUniformGrid works for serial backend 2018-06-25 14:17:33 -06:00
Li-Ta Lo
c4921c0e7a fixed all most of compiler error, able to print something from point locator on execution side 2018-06-22 17:11:03 -06:00
Li-Ta Lo
b4f7e9467d split control and execution part of point locator 2018-06-22 14:21:07 -06:00
Sujin Philip
50248aec9c Fix implicit conversion loses floating-point precision warning 2018-06-22 13:45:42 -04:00
Shreeraj Jadhav
947496550e constexpr construction for Vec classes
Vec class objects can now be constructed during compile-time
as constant expressions by calling Vec( T, ... ) constructors
or through brace-initialization.
Constant expression using fill constructor and nested vectors
of sizes greater than 4 are not supported yet.
Changes made to WrappedOperators.h for resolving overload
ambiguities in Vec construction and typecasting.
Appropriate test cases were added to UnitTestTypes.cxx.
Addresses issue #199.
2018-06-20 14:15:29 -04:00
Robert Maynard
8276e35cf4 Mark classes that should not be derived from as final. 2018-06-15 10:49:59 -04:00
luz.paz
940c891886 Misc. typos
Found via `codespell` and `grep`
more typos

includes source typo change and a typo that needs further review
follow-up typos


Follow-up typos


Revert a commit
2018-06-14 16:49:11 -04:00
Allison Vacanti
d833d9285f Merge topic 'openmp'
183bcf109 Add initial version of an OpenMP backend.
7b5ad3e80 Expand device scheduler test to check for overlap.
e621b6ba3 Generalize the TBB radix sort implementation.
d60278434 Specialize swap for ArrayPortalValueReference types.
761f8986f Cache inputs to SSI::Unique benchmark.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1099
2018-05-31 16:49:15 -04:00
Allison Vacanti
183bcf109a Add initial version of an OpenMP backend. 2018-05-31 16:47:48 -04:00
Kenneth Moreland
201ea1c578 Fix inconsistency in generated WorkletInvokeFunctorDetail.h
There was a direct edit to WorkletInvokeFunctorDetail.h that was not
reflected in WorkletInvokeFunctorDetail.h.in. This makes the two files
consistent so that future edits will not loose the changes.
2018-05-29 17:39:16 -06:00
Allison Vacanti
93506d25e2 Change function signatures to use 'using' aliases.
Also cleaned up some lingering type typedefs.
2018-05-25 17:18:41 -04:00
Haocheng LIU
fae8409c9c Add float version operations for vtkm::Math Pi()
This commit also removes the old static_cast<vtkm::float32>vtkm::Pi() usages and
fix serveral conversion warnings.
2018-05-21 10:58:15 -04:00
David Thompson
52a1495859 Fix cell measure when using double precision as default. 2018-05-18 14:05:06 -04:00
David Thompson
00c7905afb Rename vtkm::dot() to vtkm::Dot().
This keeps the old name around but prepares it for removal
in the next release.
2018-05-17 08:51:01 -04:00
David Thompson
dd7c17f776 Compute cell measures (arc length, area, volume).
This commit adds a worklet and a filter to compute
signed integral measures of cells.

It also begins the practic of adding a markdown
changelog entry in `doc/changelog`. See the
changelog entry for details.
2018-05-17 08:50:56 -04:00
Kenneth Moreland
0753131a04 Replace ExecutionObjectFactoryBase with ExecutionObjectBase
While making changes to how execution objects work, we had agreed to
name the base object ExecutionObjectBase instead of its original name of
ExecutionObjectFactoryBase. Somehow that change did not make it through.
2018-05-10 17:53:39 -06:00
Sujin Philip
2f92e40503 Suppress false positive cuda warnings
Suppresses "declared but never referenced" warnings.
2018-05-09 13:17:37 -04:00
Utkarsh Ayachit
bd43f4b1fd UnitTestCellDerivative: fix type conversion warning. 2018-05-08 14:52:22 -04:00
Utkarsh Ayachit
1644451715 CellDerivative: fix type conversion warnings 2018-05-08 14:52:22 -04:00
Matthew Letter
0ea68f6c41 removed execution object base from code base
since we no longer use execution object base in the code base it is being removed
2018-05-03 14:45:22 -06:00
Kenneth Moreland
9127029fbb Determine ExecObject type directly from PrepareForExecution
Rather than require all ExecutionObjectFactoryBase classes to declare a
templated ExecObjectType type, get the type of the execution object
directly from the result of the PrepareForExecution method.
2018-05-03 14:45:22 -06:00
Matthew Letter
7e5a55881b changes typechecks for execution objects
In order to make the change from the current way execution obejcts are utilized to the new proposed executionObjectFactory process type checks now has to look for the new execution object factory class to check against.
2018-05-03 14:45:21 -06:00
Robert Maynard
f025c2187b Suppress conversion warning inside Cell Interpolate code
When converting integer fields the interpolate code generates lots
of warnings that we are promoting into floating point space.
The quickest solution is to suppress these conversion warnings
all together for all interpolation functions.
2018-05-02 13:32:02 -04:00
Robert Maynard
06e15e601d Merge topic 'vtkm_vec_constructor_bug'
adcabb03 VTK-m Vec<> constructors are now more conservative.
6267deb6 CellDerivativeFor3DCell has a better version for Vec of Vec fields.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1170
2018-05-01 08:29:45 -04:00
Robert Maynard
b56894dd09 Move VTK-m Cuda backend over to a grid-stride iteration pattern.
This allows for easier host side logic when determining grid and block
sizes, and allows for a smaller library side by moving some logic
into compiled in functions.
2018-04-30 17:29:26 -04:00
Robert Maynard
6267deb67e CellDerivativeFor3DCell has a better version for Vec of Vec fields.
Previously we would compute a 3x3 matrix where each element was a Vec. Using
the jacobain of a single component is sufficient so by using that we safe 2 to
3 times the memory space.

Additionally by moving to doing the derivative as a per component algorithm
we work around the issues found in bug
https://gitlab.kitware.com/vtk/vtk-m/issues/221. In effect when trying to
construct a Vec of Vec from a component of a different floating type e.g.:

  Vec3d x(0.0, 1.0, 2.0);

  Vec3f a = x;
  Vec3x3f b = x;
  Vec3x3f c(x, x, x);

Generates bad values vectors such as b which look like:

b: [[0,0,0],[1,1,1],[2,2,2]]
c: [[0,1,2],[0,1,2],[0,1,2]]
2018-04-27 08:14:34 -04:00
Robert Maynard
1ec478ce62 ColorTable now converts to and from double less often.
Previously we would convert to double to perform some operations instead
of always staying in float space.
2018-04-25 15:35:27 -04:00
Matt Larsen
715141737f Merge topic 'typos'
efdf8543 Misc. Typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !1113
2018-04-06 18:04:46 -04:00
Robert Maynard
0d45c5cff2 Correct warnings found after disabling all warning when CUDA is enabled. 2018-04-04 11:00:12 -04:00
Robert Maynard
8808b41fbd Merge branch 'master' into vtk-m-cmake_refactor 2018-03-29 22:51:26 -04:00
Robert Maynard
944bc3c0d6 Introduce vtkm::cont::ColorTable replacing vtkm::rendering::ColorTable
The new and improved vtkm::cont::ColorTable provides a more feature complete
color table implementation that is modeled after
vtkDiscretizableColorTransferFunction. This class therefore supports different
color spaces ( rgb, lab, hsv, diverging ) and supports execution across all
device adapters.
2018-03-28 16:11:23 -04:00
luz.paz
efdf854306 Misc. Typos
Found via `codespell` and `grep`
2018-03-28 09:45:07 -04:00
Kenneth Moreland
1fe7869211 Resurrect function to get face indices
Due to recent changes to remove static arrays that are not supported on
some devices, the function to return all the local point indices on a
face was removed. That left no way to get the structure of cell faces
short of pulling an internal data structure.

This change resurrects a function to get point indices for a face. The
interface for this method has necessarily changed, so I also changed the
corresponding function for getting edge indices.
2018-03-22 22:37:33 -06:00
Robert Maynard
7c54125b66 Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -05:00
Robert Maynard
601a839d5d VTK-m uses static const/constexpr when supported ( so not on cuda 7.5 )
These changes now allow VTK-m to compile on CUDA 7.5 by using const arrays,
when compiling with CUDA 8+ support we upgrade to static const arrays, and
lastly when CUDA is disabled we fully elevate to static constexpr.
2018-02-26 16:41:29 -05:00
Robert Maynard
505e7aa1ec VTK-m now has defines for the CUDA version even when not using nvcc.
This is needed so so that the CUDA and C++ compiler generate the same code
when scanning a shared header but generating different translation units
2018-02-26 16:38:26 -05:00
Robert Maynard
41d968f68d Cuda ExecutionPolicy when using CUDA 7.5 is aware we use raw pointer now
The failure was caused by not updating CUDA 7.5 code paths when we
removed the usage of ::thrust::cuda::pointer.
2018-02-26 16:37:57 -05:00
Robert Maynard
e630ac5aa4 Merge branch 'master' into vtk-m-cmake_refactor 2018-02-23 14:52:00 -05:00
Robert Maynard
182f4707e7 vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
Robert Maynard
39c4aacce2 Merge topic 'cpu_parallel_radix_sort'
30f6e53c Fixed compiler warning for char type with kxsort
8f75df65 Fix Visual Studio compiler warnings.
d7a98057 Move kxsort.h inside VTKM_THIRDPARTY_PRE_INCLUDE
f53d0789 Removed debug output statements.
7c0b09de Removed Gnu specific __attribute__ macro for unused variables
78bf34dd Merge branch 'cpu_parallel_radix_sort' of https://gitlab.kitware.com/Otahal/vtk-m into cpu_parallel_radix_sort
77389765 Added missing files from Rob's patch.
84de5192 Applied patch from Rob Maynard
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1053
2018-02-15 12:59:44 -05:00
Kenneth Moreland
6a908cc9da Merge topic 'fix-special-jacobian-cases'
43da67f7 Fix Jacobian cases for wedge and pyramid

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1077
2018-02-08 11:56:23 -05:00
Thomas Otahal
9cf12c48ce Merge branch 'master' into cpu_parallel_radix_sort 2018-02-07 10:23:54 -07:00
Sujin Philip
fdfd62d43a Improve WorldCoordinatesToParametricCoordinates
1. Add a 'FastVec' class that copies input vector types to an efficient
   Vec type on the stack. Specializations avoid copies of already efficient
   types.
2. Update 'WorldCoordinatesToParametricCoordinates' functions to utilize the
   'FastVec' class. This should improve performance when the passed in
    vectors are of slow types like 'vtkm::VecFromPortalPermute'.
3. Since most input Vec types will convert to the same 'FastVec' type this
   also reduces the code generations. Some code refactoring was required for
   this.
2018-02-05 15:52:16 -05:00
Robert Maynard
22ea58335a iVTK-m CUDA backend doesn't use thrust::cuda::pointer any more.
This was removed as CUDA 9.0 on MSVC has issues where CUB/Thrust
would fail to compile when given these types.
2018-02-02 08:33:17 -05:00
Kenneth Moreland
43da67f747 Fix Jacobian cases for wedge and pyramid
When the implementation for the cell derivative functions was made, the
special cases for creating the Jacobian for wedge and pyramid cell
shapes was not working. Instead, it just used the hexahedra case for a
degenerate cell. This fixes the issues with the special cases.

There were multiple issues to be fixed. There were some complaints
by the compiler about types. There was a mistake in the pyramid table.
But the biggest issue was a problem with macro expansions. It was
the classic tale of forgetting that you have to encase parameters
in parenthesis to make sure that operator precedence comes out as
expected.
2018-01-31 15:45:12 -07:00
Thomas Otahal
5e72f96b99 CPU parallel radix sorting
Created split implementation. Parallel radix
sort calls moved to vtkm_cont library.

Added key value radix sorts. SortByKey will invoke
radix sort when the key is a fundamental C++ numeric
or character type.

Added fast path for vtkm::SortLess and vtkm::SortGreater
calls to Sort and SortByKey.
2018-01-31 14:08:14 -07:00
Robert Maynard
022c987182 Correct warnings and errors found with MSVC2017+CUDA9 2018-01-31 15:58:45 -05:00
Sujin Philip
5cd37de408 Merge topic 'remove-unused-file'
2afaaa04 Remove unused file vtkm/exec/ImplicitFunction.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1069
2018-01-30 10:03:42 -05:00
Robert Maynard
0c5a087e41 Merge topic 'dont_allow_rvalue_tasks'
ef611239 Don't allow DeviceTaskTypes to construct tasks from rvalues.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1062
2018-01-30 08:37:29 -05:00
luz.paz
80b11afa24 Misc. typos
Found via `codespell -q 3` via downstream VTK
2018-01-30 06:51:47 -05:00
Sujin Philip
2afaaa04d9 Remove unused file vtkm/exec/ImplicitFunction.h 2018-01-29 15:23:49 -05:00
Robert Maynard
ef611239f6 Don't allow DeviceTaskTypes to construct tasks from rvalues. 2018-01-18 13:55:37 -05:00
Robert Maynard
7d7c6ab1ab Don't allow DeviceTaskTypes to construct tasks from rvalues. 2018-01-18 13:51:30 -05:00
Robert Maynard
0660c67fef Merge branch 'master' into vtk-m-cmake_refactor 2018-01-16 15:42:28 -05:00
Robert Maynard
004bfe7b12 Prefer using existence of targets when looking for TBB/CUDA support 2018-01-08 14:00:57 -05:00
Matthew Letter
c3737c728e Merge branch 'master' into increase-worklet-arguments 2018-01-04 12:07:38 -07:00
Matthew Letter
d9c51d650d increased the number of arguments to worklets
increase the number of arguments to worklets that we support to 10 from 20.
2018-01-04 12:06:16 -07:00
Robert Maynard
a81919999a Merge topic 'vtkm_host_device_warnings'
93bc0198 Suppress false positive warnings about calling host device functions.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1042
2018-01-02 14:10:54 -05:00
Robert Maynard
93bc0198fe Suppress false positive warnings about calling host device functions. 2018-01-02 10:40:49 -05:00
Sujin Philip
3e10b504e6 Replace ExecutionWholeArray with WholeArray 2018-01-02 10:30:16 -05:00
Matthew Letter
4b058229ce Merge branch 'master' into cmake_refactor 2017-12-08 09:51:48 -07:00
Sujin Philip
e28309f09b Remove VTKM_EXEC_CONSTANT
If a global static array is declared with VTKM_EXEC_CONSTANT and the code
is compiled by nvcc (for multibackend code) then the array is only accesible
on the GPU. If for some reason a worklet fails on the cuda backend and it is
re-executed on any of the CPU backends, it will continue to fail.

We couldn't find a simple way to declare the array once and have it available
on both CPU and GPU. The approach we are using here is to declare the arrays
as static inside some "Get" function which is marked as VTKM_EXEC_CONT.
2017-12-05 13:49:55 -05:00
Matthew Letter
24d0e7766e Merge remote-tracking branch 'remotes/origin/master' into cmake_refactor 2017-10-31 16:57:41 -06:00
Sujin Philip
5842da4921 Remove ArrayHandle CopyInto
Fixes #170
2017-10-27 17:28:59 -04:00
Robert Maynard
56c7362258 A thought on what CMake 3.9 would mean to VTK-m. 2017-10-27 15:29:51 -04:00
Allison Vacanti
40441e78e6 Fix some additional warnings. 2017-10-23 11:48:19 -04:00
Sujin Philip
41679cb5f9 Add a CellLocator
Implements a two-level uniform grid cell locator
2017-10-10 14:01:41 -04:00
Sujin Philip
9e0650adf2 Update Newton's Method to return solution status 2017-10-10 14:01:41 -04:00
Robert Maynard
fe028d828a Merge topic 'marching_cubes_faster_structured_normals'
1147edb1 MarchingCubes now uses Gradient fast paths when possible.
d7d5da4f More changes to Neighborhood code to make it more easy to use.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !916
2017-10-03 15:44:16 -04:00
Robert Maynard
1147edb192 MarchingCubes now uses Gradient fast paths when possible.
When running on image data we now use central differences to compute the point
gradient
2017-09-25 14:25:28 -04:00
Robert Maynard
fe8b75f7bf Consistenly use nullptr in vtk-m. 2017-09-25 09:57:23 -04:00
Robert Maynard
d7d5da4fa5 More changes to Neighborhood code to make it more easy to use.
These changes allow other worklets to be able to call neighborhood worklets.
2017-09-25 09:03:14 -04:00
Kenneth Moreland
fb6be2819d Merge topic 'doxygen-fixes'
52060f52 Fix many warnings from doxygen

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !951
2017-09-22 14:05:24 -04:00
Robert Maynard
311618a15f Enable highest level of warnings(W4) under MSVC
This will make VTK-m warning level match the one used by VTK. This commit
also resolves the first round of warnings that W4 exposes.
2017-09-22 13:04:28 -04:00
Kenneth Moreland
52060f52c7 Fix many warnings from doxygen
There are still some warnings left:

* Some text in markdown files are incorrectly picked up as
  doxygen commands
* ArrayPortalTransform weirdly inherits from a specialized
  version of itself. It's technically correct C++ code, but
  gives doxygen fits.
2017-09-22 10:29:08 -06: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
Robert Maynard
08e07167b9 Merge topic 'cuda_9_support'
c5232e99 Simplify the implementation of vtkm::ForEach
6069c19f Brigand.hpp now works around CUDA 9 compiler issues.
6a4e91d5 ExecutionPolicy now handles CUDA9 removal of __CUDACC_VER__

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !902
2017-08-31 11:26:28 -04:00
Kenneth Moreland
16e4e6079c Fix spelling error of canonical
It was being spelled cononical.
2017-08-30 09:23:02 -06:00
Kenneth Moreland
8312fe54ab Merge topic 'cononical-face-edge-ids'
1d5a4d47 Update ExternalFaces worklet to use hashes
fc7b90ac Add hash function
b1e6c1e3 Add method for getting a cononical edge id
8e72dc73 Add method for getting a cononical face id

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !900
2017-08-24 19:00:21 -04:00
Robert Maynard
6a4e91d5d1 ExecutionPolicy now handles CUDA9 removal of __CUDACC_VER__ 2017-08-24 12:59:16 -04:00
Robert Maynard
ce80383238 Adds WorkletPointNeighborhood and DispatcherPointNeighborhood types.
VTK-m is now able to run algorithms on structured points that require the
local point neighbors in a highly efficient manner.
2017-08-23 16:42:00 -04:00
Robert Maynard
0cbc3db016 Merge topic 'stolen_arrays_can_still_be_used_as_input'
c385b21a StorageBasic is now treated like users memory after being stolen.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !891
2017-08-22 09:09:58 -04:00
Robert Maynard
c385b21acd StorageBasic is now treated like users memory after being stolen.
Previously once an ArrayHandle was stolen it was placed in an invalid state
where it could not used again by VTK-m. Now instead after being stolen it
is placed into a state where it is identical to memory allocated outside
of VTK-m and passed in.
2017-08-18 08:24:49 -04:00
Kenneth Moreland
b1e6c1e34b Add method for getting a cononical edge id
The cononical edge id is stored in a vtkm::Id2.
2017-08-17 16:07:41 -06:00
Kenneth Moreland
8e72dc738a Add method for getting a cononical face id
The cononical face id is stored in a vtkm::Id3 (independent of the
actual number of points in the face).
2017-08-17 15:48:47 -06:00
Robert Maynard
b9e69217ae Merge topic 'typedef_to_using_round_4'
f6863594 Convert VTK-m over to use 'using' instead of 'typedef'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !885
2017-08-17 16:38:49 -04:00
Sujin Philip
72a6cf4a21 Change cuda calls to use the per-thread stream. 2017-08-17 11:03:02 -04:00
Robert Maynard
f68635941e Convert VTK-m over to use 'using' instead of 'typedef' 2017-08-17 10:47:25 -04:00
Robert Maynard
08d4b3cf36 Merge topic 'clang_tidy'
b85cdd90 Convert VTK-m over to use 'using' instead of 'typedef'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !836
2017-08-08 16:26:10 -04:00
Robert Maynard
b85cdd9080 Convert VTK-m over to use 'using' instead of 'typedef' 2017-08-07 14:05:43 -04:00
Sujin Philip
6ce8218d09 Implement CellToPoint for CellSetPermutation 2017-08-02 15:19:06 -04:00
Kenneth Moreland
897ec9ff5e Test and fix issues with WholeCellSetIn with structured grids 2017-07-28 15:02:05 -06:00
Kenneth Moreland
03b6f62d05 Add a test for the WholeCellSetIn argument
All types of cell sets should have a consistent interface. This is
tested (and fixed) for explicit and permutation cell sets. However, an
unfixed bug that has been identified is that permutation cell sets only
work for point to cell topologies. All others are not supported
correctly.
2017-07-28 13:46:37 -06:00
David C. Lonie
fb2d36be1e Refactor VecRectilinearPointCoordinates.
See #163.
2017-07-07 13:49:35 -04:00
Kenneth Moreland
731bb64a0b Make .in files match new formatting
More corrections for the autoformatter and .in files.
2017-05-31 09:37:29 -06:00
Kenneth Moreland
071c792148 Merge topic 'indent-generated'
b03a61da Make .in files match new formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !784
2017-05-28 10:28:54 -04:00
Kenneth Moreland
b03a61da5d Make .in files match new formatting
The automatic formatter formatted the result of the .in files, but not
the .in files themselves. This caused the .in file check to fail.
2017-05-27 09:46:32 -06: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
Robert Maynard
6ed4bc786f Permuted structured cellsets produce VecRectilinearPointCoordinates
Previously when you permuted a structured cellset you would get a permuted
point coordinates. This would cause the Cell operations to take non
optimal paths.
2017-05-23 10:49:19 -04:00
Robert Maynard
6da48cf3c1 Remove unneeded methods from the Connectivity classes. 2017-05-23 10:49:19 -04:00
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
Robert Maynard
57ab48fe8e Replace occurrences of NULL with nullptr. 2017-05-04 10:50:57 -04:00
Robert Maynard
022c36fa4f Add vtkm::exec::TaskBase, and rename WorkletInvokeFunctor to TaskSingular
Previously WorkletInvokeFunctor inherited from vtkm::exec::FunctorBase,
which is also the base class for all users Worklets and for all functors
based to DeviceAdapter::Schedule.

This is done for a few reasons. The first is that we reduce the
minimum size of user worklets. Previously the users worklet would hold
a reference to the error message, and so would the wrapper class added
when calling DeviceAdapter::Schedule. Now we only have the users worklet
holding a reference.

Second, by refactoring to have two base classes we can better improve
the documentation on what responsibilities FunctorBase.h has, compared
to TaskBase.
2017-05-02 16:38:43 -04:00
Sujin Philip
e9898cc5cf Merge topic 'virtual-methods'
4049b5b2 Add ClipWithImplicitFunction Filter
82d02e46 Modify ImplicitFunctions to use Virtual Methods
968960c1 Add Virtual Methods Framework

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !750
2017-05-02 16:12:04 -04:00
Sujin Philip
82d02e46ef Modify ImplicitFunctions to use Virtual Methods 2017-05-01 16:55:59 -04:00
Robert Maynard
93a5662a7b Merge topic 'correct_missing_cuda_exec_include'
cc08589d Make sure ExecutionPolicy.h includes all headers it uses

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !756
2017-04-27 13:00:44 -04:00
Robert Maynard
cc08589df6 Make sure ExecutionPolicy.h includes all headers it uses 2017-04-24 13:34:39 -04:00
Robert Maynard
355eea887c Get the vtkm cont cuda object to compile properly. 2017-04-05 15:45:10 -07:00
Robert Maynard
5566afdd8d Allow MarchingCubes to handle multiple iso-contour values. 2017-03-16 11:49:20 -04:00
Sujin Philip
b455636bcd Move BaseComponentOf to vtkm::BaseComponent 2017-03-07 14:46:55 -05:00
Kenneth Moreland
297c1b0709 Add InputDomainTag to Invocation 2017-03-03 20:20:35 -07:00
Kenneth Moreland
dcbbb72784 Merge branch 'master' into external-face-more-generic
Update exception methods to new names.
2017-02-08 17:10:17 -07:00
Robert Maynard
9148bea396 Corrects ignorable warnings with msvc and cuda enabled.
These constant value warnings are ignorable as we are trying
to throw an assert.
2017-02-02 10:09:34 -05:00
Kenneth Moreland
629271bceb Make sure all ArrayPortals have a Set method.
The current design for ArrayPortalVirtual makes it a requirement for all
array portals (that it wraps) to have Set defined. Thus, make sure Set is
defined for all ArrayPortal. Where Set is invalid, an assert is thrown if
something calls it at runtime.
2017-01-31 15:46:39 -05:00
Kenneth Moreland
53679dfc9c Update ExternalFaces to support mixed face types
Previously, ExternalFaces really only supported tetrahedral meshes that
have only triangular faces. These changes support all mixes of cells and
their faces.
2017-01-26 13:35:46 -07:00
Andrew Bauer
7b165842cd Fixing documentation typo 2017-01-25 10:41:09 -05:00
Kenneth Moreland
ffa3b167b5 Add ValueCount tag to WorkletReduceByKey 2017-01-17 15:53:10 -07:00
Kenneth Moreland
58eb8f168d Add WorkletReduceByKey and dispatcher
And the basic type for a reduce by key worklet and its associated
adapter. Right now the worklet only supports passing in keys. Values
come next.
2017-01-17 15:53:06 -07:00
Robert Maynard
1052a71523 ConnectivityPermuted explicitly suppress cuda host/device warnings
The class can emit false positive warnings when being compiled with
cuda but SMP backends.
2017-01-02 11:38:05 -05:00
Kenneth Moreland
55c159d6f0 Check error codes from CUDA functions
Most functions in the CUDA runtime API return an error code that must be
checked to determine whether the operation completed successfully. Most
operations in VTK-m just called the function and assumed it completed
correctly, which could lead to further errors. This change wraps most
CUDA calls in a VTKM_CUDA_CALL macro that checks the error code and
throws an exception if the call fails.
2016-12-14 10:43:44 -07:00
Robert Maynard
d1336c7f84 CellDerivativeFor2DCell now creates Space2D of the correct type.
Previously vtkm::Vec<> fields would construct Space2D types incorrectly
2016-12-12 13:26:16 -05:00
Robert Maynard
134f24496b Add a point gradient worklet. 2016-12-12 13:26:16 -05:00
Robert Maynard
06af2fbcbf Make it easier to construct ThreadIndices by hand.
In some cases it is necessary to construct ThreadIndices to manually
use vtkm::exec::Fetch. This now makes it possible.
2016-12-12 13:26:16 -05:00
Robert Maynard
60843cbab8 Allow people to get the portal from ExecutionWholeArray.
This is required when doing some optimizations to PointGradient.
2016-12-12 13:26:16 -05:00
Robert Maynard
e462d34c60 ExecutionWholeArray now has consistent ValueType defines. 2016-12-12 13:26:16 -05:00
Robert Maynard
9f2b680594 WholeCellSetIn now uses the proper fetch tag. 2016-12-12 13:26:16 -05:00
Kenneth Moreland
50e0d05c3e Merge topic 'cell-face-edge'
eb7ea792 Add VTKM_EXEC_CONT to make_VecC
16970b57 Update ExternalFaces to use common face tables
91f98835 Add CellEdge functions
5ab43f8d Add CellFace functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !631
2016-12-10 10:12:01 -05:00
Kenneth Moreland
2e05c1dd03 Support derivatives of vectors
The cell derivative/gradient functions were all designed with scalars in
mind. Although the field type is templated and you could pass in a
vector type for the field, many of these classes would perform the
computation incorrectly. These changes specifically support derivatives
of vector types.
2016-12-05 23:04:35 -07:00
Kenneth Moreland
91f9883599 Add CellEdge functions
These provide the general ability to get the edges for each cell type.
2016-12-05 22:48:44 -07:00
Kenneth Moreland
5ab43f8d9e Add CellFace functions
These provide the general ability to get the faces for each cell type.
2016-12-05 22:48:44 -07:00
Kenneth Moreland
3f9a1edb7b Change CellShapeTag*:Id type to vtkm::UInt8
The shape array in CellSetExplicit was changed a while ago to be of type
vtkm::UInt8. However, the shape types remained at vtkm::IdComponent. I
can think of no reason why they should not be the same type.
2016-11-22 17:12:54 -07:00
Kenneth Moreland
b3d0e1f99b Move VecFromPortal classes to vtkm package
These Vec-like objects can be generally usable in both the control and
execution environments.
2016-11-22 17:04:55 -07: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
Robert Maynard
8861beda4b Merge topic 'add_vector_cell_gradient'
8dadf560 Add in support for vector fields to Gradient worklet.
d53f43fb CellDerivaties now support computing the derivatives of vtkm::Vec fields.
b4378c85 Allow vtkm::Matrix to support T values which are vtkm::Vec.
9caabf97 vtkm::Vec now supports +=, -=, *=, and /=.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !608
2016-11-15 23:39:10 -05:00
Robert Maynard
d53f43fb48 CellDerivaties now support computing the derivatives of vtkm::Vec fields. 2016-11-15 18:54:53 -05:00
Robert Maynard
632d2a5211 Thrust 1.8.3 uses raw_reference_cast instead of a direct assignment operator
This usage of raw_referenc_cast returns a const PortalValue which is than
assigned too. So to work around the problem we need to mark operator= on
the class as const.
2016-11-15 17:03:59 -05:00
Robert Maynard
7c07afffba Reduce the compilation size of the gradient computations. 2016-11-11 14:36:51 -05:00
Christopher Sewell
93d7956daf Attempt 13 to resolve Windows compiler warning with streaming storage 2016-10-21 16:08:13 -06:00
Christopher Sewell
05975a2325 Attempt 3 to resolve Windows compiler warning with streaming storage 2016-10-20 10:32:30 -06:00
Christopher Sewell
72d9783c38 Merge remote-tracking branch 'upstream/master' into StreamingArray 2016-10-17 17:51:23 -06:00
Robert Maynard
3e09b2cebc VecFromPortal::CopyTo can now handle const value Portals. 2016-10-12 13:28:36 -04:00
Christopher Sewell
d92f39df12 Merge branch 'master' into StreamingArray 2016-09-15 17:54:59 -06:00
Robert Maynard
c2769b81e6 Move over from boost/random to c++11 random. 2016-09-08 17:10:39 -04:00
Robert Maynard
310f1bc0a5 Correct missing std::time includes that vtkm::Math was hiding. 2016-09-02 14:44:30 -04:00
Robert Maynard
f81c42b9b4 Replace NULL with nullptr where applicable. 2016-09-01 09:38:25 -04:00
Robert Maynard
12810165bb Switch over to c++11 type_traits. 2016-08-31 16:11:26 -04:00
Kenneth Moreland
f8442903d8 Replace TryAllTypes with trying exemplar tests
There were many tests that created code paths for every base and Vec
type that VTK-m supports (up to 4 components). Although this is
admirable, it is also excessive, and our compile times for the tests are
very long.

To shorten compile times, remove the TryAllTypes method. Replace it with
a version of TryTypes that uses a default list of "exemplar" set of
integers, floats, and Vecs.
2016-08-24 16:02:18 -06:00
Christopher Sewell
330bdb9ff3 Attempting to eliminate warnings 2016-08-18 18:39:21 -06:00