Commit Graph

1280 Commits

Author SHA1 Message Date
Matthew Letter
d3fde1f870 creating a execution object facotry for particles
abstracted out particles into an execution object and a factory that populates said execution object based on its state. removed the facotries dependance on a device adaptor.
2018-05-03 14:45:22 -06:00
Matthew Letter
af250acbfc added PrepareForExecution to compile code base
added prepare for execution function to all the execution object factories that did not have it implemented to compile the code base
2018-05-03 14:45:22 -06:00
Matthew Letter
8f622839b6 added PrepareForExecution() to UnitTestDispatcherBase.cxx
added PrepareForExecution() to UnitTestDispatcherBase.cxx to start resolving all the missing implementations of the new execution object architecture.
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
4649c172c7 Merge topic 'correct_gcc_7_crashes'
f025c218 Suppress conversion warning inside Cell Interpolate code
822d4c61 Marching Cubes test doesn't abuse fall through case statements
dac7ab98 Correct a bad memcpy in ColorTable that gcc 7 found
c6726644 Reformat some test code to stop gcc 7.3 from segfaulting.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1175
2018-05-03 10:54:08 -04:00
Dave Pugmire
6dd82d69b2 Create a new worklet for point transformations. Also provide a unitest. 2018-05-03 10:53:11 -04:00
ayenpure
40fe133d88 Fix compile warnings for Temporal Advection 2018-05-02 13:49:16 -07:00
Li-Ta Lo
d3dbdd596f remove using namespace, specify fully qualified names 2018-05-02 13:53:07 -06:00
Robert Maynard
822d4c61e1 Marching Cubes test doesn't abuse fall through case statements
The fall through case statement was causing numerous warnings
with gcc 7.
2018-05-02 13:32:02 -04:00
Robert Maynard
ac46a4ced7 Remove unused variables from UnitTestWaveletCompressor 2018-05-02 13:31:30 -04:00
Robert Maynard
eb82620539 Correct shadowing define warning from GraphConnectivity 2018-05-02 13:31:30 -04:00
Li-Ta Lo
f655e8f1f1 add overload of Run() for ArrayHandle 2018-05-01 15:48:26 -06:00
Kenneth Moreland
bb54d9d411 Merge topic 'scatter-on-dispatcher'
edc4c85f Move Scatter from Worklet to Dispatcher

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1172
2018-05-01 12:17:32 -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
Li-Ta Lo
6f85397192 Add vtkm::worklet::connectivity namespace
Created vtkm::worklet::connectivity namespace and worklets in the namespace.
2018-04-27 11:32:27 -06:00
Li-Ta Lo
ce27f5fcaa Change signature of ImageConnectivity::Run()
It takes CellSetStructured<2> and DynamicArrayHandle and uses CastAndCall
to resolve data type for pixels. Moved implementation to the RunImpl
function object.
2018-04-27 11:32:27 -06:00
Li-Ta Lo
648b0decfc add installation of header files in CMakeLists.txt 2018-04-27 11:32:27 -06:00
Li-Ta Lo
d94f2cae37 Add ImageConnectivity worklet
ImageConnectivity worklet implements a parallel connected component
labeling algorithm for 2D structured grids/images. For each pixel,
it search for the pixel's 6 neighbors and classify them as the
same connected component if their corresponding "color" field have
the same value.
2018-04-27 11:32:27 -06:00
Kenneth Moreland
edc4c85fd9 Move Scatter from Worklet to Dispatcher
Previously, when a Worklet needed a scatter, the scatter object was
stored in the Worklet object. That was problematic because that means
the Scatter, which is a control object, was shoved into the execution
environment.

To prevent that, move the Scatter into the Dispatcher object. The
worklet still declares a ScatterType alias, but no longer has a
GetScatter method. Instead, the Dispatcher now takes a Scatter object in
its constructor. If using the default scatter (ScatterIdentity), the
default constructor is used. If using another type of Scatter that
requires data to set up its state, then the caller of the worklet needs
to provide that to the dispatcher. For convenience, worklets are
encouraged to have a MakeScatter method to help construct a proper
scatter object.
2018-04-27 00:43:51 -04:00
Robert Maynard
4b9a8143c8 Correct 'may be used uninitialized in this function' warnings in wavelets 2018-04-24 13:27:51 -04:00
ayenpure
5a843600dd Adding missing copyright information.
Adding copyright information to TemporalGridEvaluator which was missing earlier.
2018-04-23 17:05:11 -07:00
ayenpure
2d6d261b61 Fixing template errors for portability
Fixing template errors in integrators.
The code used to build locally, but fail on Kitware test machines.
Fixing templates as they were before any temporal advection changes.
2018-04-23 16:36:51 -07:00
ayenpure
2086655615 Fix CUDA failure in temporal particle advection
- Replacing the pure virtual method with CRTP
2018-04-22 23:46:08 -07:00
ayenpure
3134fef54b Bug fixes out of Particle Advection unit test
- PushOutOfDomain would loop over without exiting indefinately utilizing all max steps.
  It's supposed to execute only once the particle goes out of spatio-temporal boundary.
- Removing the check for the steamlines polyline points to be same as the maxSteps from
  the unit test, as if the particle has already taken some steps, then the polyline
  points written out will always be lower than the total number of steps taken by the
  current node.
2018-04-21 20:32:42 -07:00
ayenpure
617b8668c7 Fixing memory leak in Streamlines
Fixing memory leak introduced bacause of increamenting the num
of steps in the wrong place while generating streamlines
2018-04-20 13:48:54 -07:00
ayenpure
c53d6ec216 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into pathsurfaces 2018-04-18 22:18:34 -07:00
ayenpure
4cf9942d44 Updating temporal advection example
- renaming long directory name to something concise
- Adding Dave's Unit test for particle advection
- Fixing really trivial issues
2018-04-18 22:06:40 -07:00
ayenpure
faf8c8337a Adding Temporal Advection improvements
- Adding code to support taking short steps (minimize boundary errors)
- Adding time of advection to the particle from the Integrator
- API changes for TakeStep
	- TakeStep should only care about the maximum steps as it's a field on a Particle
	- The check for out of temporal and spatial bounds has been moved to the Worklet
- Changing some of the internal APIs for supporting these new features/fixes
- Changing inheritance in the Integrators class to be more obvious than something convoluted
2018-04-18 21:01:08 -07:00
Robert Maynard
84386f28eb Merge topic 'correct_maybe_uninitialized_warnings'
da45e81d Make sure that WaveletTransform doesn't emit maybe-uninitialized warnings
c33bf063 RK4Integrator now properly initializes all variables.
d2001fb5 Suppress strict overflow optimization warnings.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1152
2018-04-17 14:51:34 -04:00
Robert Maynard
da45e81d9b Make sure that WaveletTransform doesn't emit maybe-uninitialized warnings 2018-04-17 14:24:19 -04:00
Robert Maynard
c33bf063f4 RK4Integrator now properly initializes all variables.
Previously the RK4Integrator could compute velocity with uninitialized inputs.
2018-04-17 14:24:19 -04:00
Robert Maynard
d2001fb52e Suppress strict overflow optimization warnings.
This warning is emitted when the compiler performs an optimization, and wants
you to verify that the presumptions it is making are valid. For this case
we can correctly promise the compiler that the values will not overflow and
the optimizations are correct.
2018-04-17 11:48:39 -04:00
ayenpure
2230496459 Code cleansing with temporal particle advection
Bug Fixes in the UniformGridEvaluator
Added Temporal Grid Evaluator for Uniform Grid
Updated Integrator to add temporal integration
Changing the TakeStep method in Particles to only deal with max steps
ideally, particles should be unaware of spatio-temporal constrains
Updating the ParticleAdvectionWorklet file to handle out of spatio-temporal
issues.

Missing: Code to take small steps (AT_SPATIAL_BOUNDARY and AT_TEMPORAL_BOUNDARY).
2018-04-14 16:58:58 -07:00
ayenpure
2c316bc24c Adding comments to Streamlines TakeStep 2018-04-13 16:51:55 -07:00
Utkarsh Ayachit
7fbd020478 FieldHistogram: support using precomputed range
Updated FieldHistogram worklet to support executing the worklet using a
precomputed range. This will be needed for distributed and multiblock
use-cases.
2018-04-12 16:40:18 -04:00
Robert Maynard
73c05c10c7 Suppressions of __host__ warnings shouldn't trigger internal compile errors 2018-04-12 12:04:53 -04:00
Robert Maynard
5100e559c7 Suppress warnings about calling __host__ functions from CUDA 9.0 2018-04-12 10:31:19 -04:00
Robert Maynard
282c515ea8 Suppress warnings about calling __host__ functions from CUDA 8.0 2018-04-12 10:06:57 -04:00
Robert Maynard
8472b64e60 Suppress more CUDA host function from a host/device function warnings 2018-04-05 10:55:43 -04:00
Robert Maynard
cd333bf8dc Remove unneeded semicolon after closing parentheses on a some methods. 2018-04-05 10:55:12 -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
ayenpure
077988aeb4 Adding working temporal interpolation 2018-03-23 00:49:32 -07: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
ayenpure
8ae9c733e8 Adding temporal interpolation files 2018-03-22 18:15:39 -07:00
Kenneth Moreland
a4aa42c012 Avoid "weird" arrays in fields
In some of the tests there was a field that was using a counting array.
This uses an integer as the value type and has a special implicit
storage type. Currently, this is likely to cause problems whenever it
runs into a cast and call of a dynamic array. For now, let's avoid
these.

In the near future we should have expanded virtual method capabilities
that will make it possible to support these atypical arrays.
2018-03-21 13:35:02 -06:00
Robert Maynard
7c54125b66 Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -05:00
Utkarsh Ayachit
66e356f7d9 Merge topic 'add-filters'
86bd81de streamline: handle different storage types for fields.
de4e840e enhance filter API
c255c0eb add `vtkm::cont::ConditionalCastAndCall`
54c2d234 Make it easier to iterator over blocks.
d1a59aad Fixes for CrossProduct and DotProduct.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1100
2018-03-10 09:24:35 -05:00
Matt Larsen
0d671bcb22 adding inverted clip unit tests 2018-03-09 13:51:28 -08:00
Matt Larsen
2daba82188 adding the ability to invert clips 2018-03-08 18:28:08 -08:00
Utkarsh Ayachit
86bd81de3f streamline: handle different storage types for fields.
this is required now that, in theory, streaminlines filter can be
executed treating the coordinate system as the vector field.
2018-03-07 13:42:23 -05:00
Utkarsh Ayachit
de4e840eae enhance filter API
Filters now support executing on a dataset to produce a result dataset
with automatic mapping of fields to the output dataset. Fields to map
can be selected using `vtkm::filter::FieldSelection` class, which provides
constructors to map all or no fields, along with a selection of fields.

This updates all tests to use the new filter API.
2018-03-07 13:42:23 -05:00
Li-Ta Lo
1a13324a9a Merge branch 'master' into connected_component 2018-03-06 16:23:43 -07:00
Li-Ta Lo
e058aaebd9 extend CellSetConnectivity to CellSetUniform and CellSetExplicit 2018-03-06 16:21:32 -07:00
Robert Maynard
dde7c76a9f Worklets can't be in anonymous namespace as CUDA 7.5 doesn't support those. 2018-02-26 16:42:00 -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
a60e378003 CUDA 7.5 doesn't like suppressing warning codes that don't exist
Newer versions of CUDA have no problem suppressing warning codes that don't
exist.
2018-02-26 16:37:57 -05:00
Robert Maynard
ff9dcc4750 Consistently mark variables as static const across all of vtk-m 2018-02-26 16:37:57 -05:00
Robert Maynard
ee69c7a4b7 Remove VS2013 workarounds from VTK-m. 2018-02-23 15:39:39 -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
9bf14b7894 Correct warnings inside worklet::Clip when making array handles 2018-02-16 14:18:00 -05:00
Sujin Philip
f7f08d3db2 Update probe filter
In the code path for probing on to uniform points, the code to compute the points
inside a cell has been made more accurate.
2018-02-06 14:21:01 -05:00
Robert Maynard
d1c25ea127 Merge topic 'correct_scalars_to_colors_range_no_updating'
67e6a5c3 Make sure ScalarsToColors actually updates the Range it stores

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1079
2018-02-02 08:32:06 -05:00
Robert Maynard
67e6a5c36a Make sure ScalarsToColors actually updates the Range it stores 2018-02-01 10:28:38 -05:00
Robert Maynard
022c987182 Correct warnings and errors found with MSVC2017+CUDA9 2018-01-31 15:58:45 -05:00
Sujin Philip
9e466f8cd2 Merge topic 'add-probe'
34bae569 Add Probe worklet and filter
4cd306ea Fix a bug in CellLocator
cf1957ca Add make_VecFromPortalPermute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1064
2018-01-30 15:08:49 -05:00
Sujin Philip
34bae5690d Add Probe worklet and filter 2018-01-30 10:43:18 -05:00
luz.paz
45239449a6 More typos
these need a little  more review.
2018-01-30 06:51:47 -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
b5f71644fe Add IsType to ArrayHandleVirtualCoordinates
Makes the interface compatible with DynamicArrayHandle.
2018-01-25 11:02:52 -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
bdb9c37ec4 update based on issues pointed out by Robert 2018-01-17 11:12:32 -07:00
Robert Maynard
5e0d992057 Suppress host/device warnings when building with cuda 9 2018-01-16 15:42:36 -05:00
Robert Maynard
4f239ed3b9 Correct casting warnings found with new cmake code 2018-01-16 15:42:36 -05:00
Robert Maynard
0660c67fef Merge branch 'master' into vtk-m-cmake_refactor 2018-01-16 15:42:28 -05:00
Robert Maynard
067dad41df Add ScalarsToColors worklet(s)
The ScalarsToColors is the first step in reproducing the color
capability that exists in VTK. The next step after this is to
provide a comparable lookup table.
2018-01-16 13:03:41 -05:00
Li-Ta Lo
7ef956a934 Merge branch 'master' into connected_component 2018-01-11 09:10:37 -07:00
Sujin Philip
70fcd1d1cc Update CoordinateSystem to use the Virtual Array 2018-01-10 10:19:19 -05:00
Robert Maynard
cda854501d Merge topic 'better_FloatingPointReturnType'
a9e64c4b FloatPointReturnType is float if 'T' is < 32bytes instead of being double.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Acked-by: Thomas Otahal <tjotaha@sandia.gov>
Merge-request: !1048
2018-01-08 15:42:18 -05:00
Robert Maynard
75b0efccc9 Correct casting warnings found with new cmake code 2018-01-08 14:00:58 -05:00
Robert Maynard
004bfe7b12 Prefer using existence of targets when looking for TBB/CUDA support 2018-01-08 14:00:57 -05:00
Robert Maynard
b2c03ad858 Unit_tests are built with the correct compiler when cuda is enabled.
Previously all the Unit_tests that shared source files would use cuda
once CUDA set the language on the file.
2018-01-08 14:00:57 -05:00
Kenneth Moreland
fe9594c1d1 Add hint to read source code for help
In trying to give error diagnostics with template definitions of invalid
types, the user encounters some pretty confusing error messages at
first. There is no way to get the compiler to give exactly the
diagnostics we want in a nice readable error message, so we are putting
some verbose instructions as comments in the code. However, a user might
not know to look at the source code since the error happens deep in an
unfamiliar (and complicated) class. Thus, add (yet another) error at the
front that gives a (hopefully) clear indication to look at the source
code for help in understanding the errors.
2018-01-08 10:53:44 -07:00
Kenneth Moreland
c3889a1a67 Give better error reporting when an Invoke parameter is wrong
When one of the parameters to DispatcherBase::Invoke is incorrect, you
get an error in a strange place. It is deep in a call stack using some
heavily templated types rather than where the Invoke is actually called.

Formerly, the code was structured to give a very obfuscated error
message. Try to make this easier on users by first adding helpful hints
in the code around where the error is to explain why the error occured
and helpful advice on how to track down the problem. Second, reconfigure
the static_assert so that the compiler gives a readable error message.
Third, add some auxiliary error messages that provide additional
information about the types and classes involved in the error.
2018-01-08 10:53:43 -07: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
a9e64c4ba8 FloatPointReturnType is float if 'T' is < 32bytes instead of being double.
Previously FloatPointReturnType would always be double for types that
are not float, which caused Int8/Int16 types to promote to double instead
of float.
2018-01-04 13:22:31 -05:00
Li-Ta Lo
a9ed1ecfcf add CMakeLists.txt for header files 2018-01-03 14:52:07 -07:00
Li-Ta Lo
ba3cba64e6 update copyright statements 2018-01-03 14:29:06 -07:00
Li-Ta Lo
aa96874e82 Merge branch 'connected_component' of gitlab.kitware.com:ollielo/vtk-m into connected_component 2018-01-03 11:30:28 -07:00
Li-Ta Lo
746c98e6c8 fix merge conflict with master branch, update to control signature 2018-01-03 11:27:13 -07:00
Li-Ta Lo
2a9439ab1e Merge branch 'master' into connected_component 2018-01-02 17:59:19 -07:00
Li-Ta Lo
cf070581f3 Update UnitTestInnerJoin.cxx 2018-01-02 19:24:10 -05:00
Li-Ta Lo
6b0d73e16c Update UnitTestCellSetDualGraph.cxx 2018-01-02 19:23:32 -05:00
Li-Ta Lo
b4db862cd1 Update UnitTestCellSetConnectivity.cpp 2018-01-02 19:22:54 -05:00
Li-Ta Lo
4c2ef4f89b factor out CellSetConnectivity worklet, cleanup 2018-01-02 16:44:35 -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
39dd8feeac Merge topic 'fix-ExecutionWholeArray-usage'
6b190312 Cleanup includes of ExecutionWholeArray.h
3e10b504 Replace ExecutionWholeArray with WholeArray

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1039
2018-01-02 10:32:43 -05:00
Sujin Philip
6b19031200 Cleanup includes of ExecutionWholeArray.h 2018-01-02 10:30:16 -05:00
Sujin Philip
3e10b504e6 Replace ExecutionWholeArray with WholeArray 2018-01-02 10:30:16 -05:00
Dave Pugmire
18ece6dce9 Better type signatures. 2017-12-29 06:48:39 -05:00
Robert Maynard
24e57556e6 Merge branch 'master' into vtk-m-cmake_refactor
Includes updating to cleanup benchmark code and handle the new MPI option
2017-12-28 14:23:21 -05:00
Dave Pugmire
2537a1cf56 Worklets for cross and dot product. 2017-12-22 15:20:20 -05:00
Li-Ta Lo
2e88f4220a Connected component for triangle mesh 2017-12-22 10:31:02 -07:00
Sujin Philip
334262db16 Fix Field constructors
1. Add option to copy user supplied array in make_ArrayHandle.
2. Replace Field constructors that take user supplied arrays with make_Field.
3. Replace CoordinateSystem constructors that take user supplied arrays with
   make_CoordinateSystem.
2017-12-21 12:48:15 -05:00
Robert Maynard
a6ec3ab093 Merge topic 'enable_all_point_gradient_tests'
a73fc3fd Enable all point gradient worklet tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1031
2017-12-20 08:25:23 -05:00
Robert Maynard
a73fc3fd0a Enable all point gradient worklet tests 2017-12-19 16:31:47 -05:00
Dave Pugmire
c6a4e335d9 Normalize worklet (both in place, and copy). 2017-12-19 11:44:30 -05:00
Matthew Letter
4b058229ce Merge branch 'master' into cmake_refactor 2017-12-08 09:51:48 -07:00
Robert Maynard
5ca31f7072 Merge topic 'dispatcher_base_proper_type_for_sizeof'
d51ddda9 Since sizeof returns std::size_t we should iterate using unsigned integers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1016
2017-12-07 08:12:28 -05:00
Robert Maynard
d51ddda9b6 Since sizeof returns std::size_t we should iterate using unsigned integers 2017-12-06 13:57:05 -05: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
Robert Maynard
f6e18ac452 Remove IntegerSequence.h as we don't need it in vtk-m anymore 2017-11-29 10:55:04 -05:00
Matthew Letter
fac43bd812 Merge branch 'master' into cmake_refactor 2017-11-28 13:36:02 -07:00
Robert Maynard
7f76220427 Redesign the Dispatcher to not need FunctionInterface to convert dynamic types 2017-11-28 11:01:02 -05:00
Manish Mathai
a8c811779a Add timers 2017-11-21 12:02:02 -08:00
Manish Mathai
7c7d37134c Implementation of boundary interval hierarchy 2017-11-14 17:11:38 -08:00
Robert Maynard
5384305d25 Update tests and a single worklet to verify new CastAndCall works 2017-11-08 13:19:05 -05:00
Sujin Philip
8c242cef91 Switch from faux to true virtuals 2017-11-06 15:25:29 -05:00
Robert Maynard
b3a7c69786 MarchingCubes: Now is able to run on Uint8/Int8 types
The speed improvement fix regressed support for non scalar types, this
correct that issue.

The issue was found while trying to bump the VTK-m version inside VTK.
2017-11-02 14:28:44 -04:00
Matthew Letter
24d0e7766e Merge remote-tracking branch 'remotes/origin/master' into cmake_refactor 2017-10-31 16:57:41 -06:00
Robert Maynard
4f03ca319d Merge topic 'better_mc_compile_times'
32148cdb A first pass at improving the compile time of MarchingCubes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !989
2017-10-31 13:18:34 -04:00
Robert Maynard
32148cdb56 A first pass at improving the compile time of MarchingCubes 2017-10-30 08:25:19 -04:00
Sujin Philip
72f47f72c4 Merge topic 'remove-arrayhandle-copyinto'
5842da49 Remove ArrayHandle CopyInto

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !988
2017-10-27 17:41:17 -04: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
Robert Maynard
fb894f56c4 ParticleAdvection GridEvaluators now work when vtkm::FloatDefault is double 2017-10-26 10:19:54 -04:00
Allison Vacanti
40441e78e6 Fix some additional warnings. 2017-10-23 11:48:19 -04:00
Allison Vacanti
b396716f86 Merge topic 'vertexclustering-reducepoints'
8fabece1 Use median point from cluster as representative vertex.
c7bf0c95 Compute PointIdMap while reducing cluster ids.
5dee7c6a Select input point from cluster rather than averaging.
28e76ddb Update vertex clustering benchmarking code.
e3c9e7bb Optimize cell map computation.
d7669650 Use requested grid in VertexClustering worklet.
0472dc11 Fix warning on Cuda.
3f4e17e2 Add field mapping to VertexClustering.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !960
2017-10-11 16:25:30 -04:00
Sujin Philip
02f48cfaaa Fix multiple declaration of DistributeCellData 2017-10-10 14:01:41 -04:00
Allison Vacanti
8fabece187 Use median point from cluster as representative vertex.
Also uses the recently added StableSortIndices worklet to produce the
cell map.
2017-10-10 10:28:51 -04:00
Allison Vacanti
c7bf0c95f4 Compute PointIdMap while reducing cluster ids. 2017-10-10 10:28:51 -04:00
Allison Vacanti
5dee7c6a5d Select input point from cluster rather than averaging.
This is a bit counterintuitive, but choosing a random point from each
cluster rather than averaging them gives a better visual result. The
averages poorly represent an surface that runs through the grid block and
tends to bias the output points towards the center of each block, creating
very noticeable grid artifacts that look blocky.
2017-10-10 10:28:51 -04:00
Allison Vacanti
28e76ddbfd Update vertex clustering benchmarking code.
Reset the timer after each print to make the output more usable.
2017-10-10 10:28:51 -04:00
Allison Vacanti
e3c9e7bbce Optimize cell map computation.
Rather than sorting and reducing the list by key, sorting and uniquing
an index array with an indirection functor is faster.
2017-10-10 10:28:51 -04:00
Allison Vacanti
d766965000 Use requested grid in VertexClustering worklet.
This is to match the default behavior of vtkQuadricClustering. If we
want to add this functionality back, it should go into the filter as
an option that adjusts nDivisions before calling the worklet.
2017-10-10 10:28:51 -04:00
Allison Vacanti
3f4e17e2a2 Add field mapping to VertexClustering. 2017-10-10 10:28:51 -04:00
Allison Vacanti
9c332674ae Remove unused comparison operator. 2017-10-10 10:28:51 -04:00
Kenneth Moreland
e149dcf1c1 Specify device adapter for array copy in worklet tests
Rob noticed a degridation in performance in some worklet tests when
ArrayCopy was added. I hypothesize that this slowdown is doing the array
copy with TBB instead of serial in the serial tests. (There have been
some checks in the existing code to suggest that some operations in TBB
can be slower than serial.) This change forces the array copy to be on
the device for which we are testing.
2017-10-03 14:18:39 -07: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
Allison Vacanti
fd311f5716 Update worklet::Keys to stable sort keys and not modify input.
This ensures that the order of the values presented to the
WorkletReduceByKey functor is consistent.

After this change, the key array used to build the worklet::Keys object
is no longer modified. The sorted keys can be obtained by using permuting
the input keys with Keys::GetSortedValuesMap().
2017-09-28 13:02:33 -04:00
Allison Vacanti
d6b2896ad9 Add StableSortIndices worklet.
This worklet produces an index array that permutes a key array into a
stable sorted order.
2017-09-28 13:02:33 -04:00
Kenneth Moreland
2625ae7866 Update VTK-m source to use new ArrayCopy functionality 2017-09-25 16:54:46 -06: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
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
Li-Ta Lo
2eaeb0e9b1 Merge topic 'kdtree_docs'
00008f11 fixed correctness bug introduced previously
1eaaf342 Merge branch 'master' into kdtree_docs
1d4b43b5 Add documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !936
2017-09-20 10:11:56 -04:00
Li-Ta Lo
00008f1106 fixed correctness bug introduced previously 2017-09-19 13:30:07 -06:00
Kenneth Moreland
2fa3a868bd Merge topic 'dynamic-threshold-call-to-worklet'
bd742fc6 Allow Threshold::Run to work on dynamic cell sets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !925
2017-09-19 10:53:53 -04:00
Li-Ta Lo
1eaaf342ef Merge branch 'master' into kdtree_docs 2017-09-18 13:19:55 -06:00
Li-Ta Lo
1d4b43b540 Add documentation
Add doxygen documentations for public interface of KD-Tree construction and search.
Also fixed several const-correctness issues.
2017-09-18 13:16:37 -06:00
Abhishek Yenpure
7ce3d72dd1 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into fix_advection_error 2017-09-14 14:50:27 -04:00
Abhishek Yenpure
44254f07bf Allocating arrays for worklet execution
In case where the number of steps taken by each particle is explicitly
provided, code to initialize the arrays for steps and statuses for the
particles was missing.
2017-09-14 14:08:34 -04:00
Abhishek Yenpure
1f3f10c0b6 Moving memory allocations/initializations to a single location 2017-09-14 11:16:29 -04:00
Li-Ta Lo
de5f9d1c97 Merge topic 'NDHistogram'
bc1096d8 Update new interface to NDHistogram, NDEntropy worklet and filter
317cff0d Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into NDHistogram
fd30187d Add 'N-dimensional histogram, histogram marginalization and entropy calculation worklets and filters'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !847
2017-09-14 10:42:30 -04:00
Kenneth Moreland
bd742fc6d4 Allow Threshold::Run to work on dynamic cell sets
Added an overloaded version of vtkm::worklet::Threshold::Run that takes
a dynamic cell set instead of a concrete cell set type. This is
implemented by basically moving the CastAndCall from the Threshold
filter to the worklet class. This allows other filters (that might have
similar operations with different predicates) to use the same code. (It
also happens to grately simplify an example for the User's Guide I am
working on.)

Once cell sets use virtual methods, we should be able to collapse code
like this quite a bit anyway.
2017-09-13 15:58:25 -06:00
Patricia Fasel
2052f40719 Merge topic 'cosmo-tools'
e9f9a3d8 remove setting of DeveiceAdapter from cosmotools worklet
cdf84ccb Add sample input
6ca2683f Remove the data file for examples
f3766449 Cosmology halo finder

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !919
2017-09-13 15:30:38 -04:00
Li-Ta Lo
e9f9a3d89f remove setting of DeveiceAdapter from cosmotools worklet 2017-09-12 13:47:11 -06:00
Yenpure
cfb7e7b418 Particle advection changing method inputs 2017-09-10 21:36:08 -04:00
Yenpure
51ae5a0cb6 Additional changes for proper particle advection 2017-09-08 15:50:55 -04:00
Dave Pugmire
e5843882d9 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into streamline_returntype 2017-09-08 14:38:11 -04:00
Yenpure
fca79d21ba Error fixes for particle advection filter 2017-09-08 13:20:43 -04:00
Patricia Kroll Fasel - 090207
6ca2683fca Remove the data file for examples
must find out how this should be done. clang-format on all the worklets.
2017-09-06 11:44:44 -06:00
Patricia Kroll Fasel - 090207
f3766449f2 Cosmology halo finder
Running friend of friends algorithm and then NxN most bound particle
after to find halo center. Cosmology center finder running NxN MBP
algorithm followed by a estimator reducing the problem to MxN MBP
to speed up run.
2017-09-06 11:43:40 -06:00
Kenneth Moreland
856ed92013 Merge topic 'scatter-counting-default-constructor'
6a3ac261 Provide default constructor for ScatterCounting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !911
2017-09-05 11:23:20 -04:00
Robert Maynard
a68413937a Gradient fast paths now works on cellset permutations. 2017-09-04 12:06:21 -04:00
caseywang777
317cff0dd8 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into NDHistogram 2017-09-02 19:13:04 -04:00
caseywang777
fd30187d53 Add 'N-dimensional histogram, histogram marginalization and entropy calculation worklets and filters' 2017-09-02 18:35:21 -04:00
Kenneth Moreland
6a3ac2615c Provide default constructor for ScatterCounting
This allows you to defer its construction. The default constructor
will set up the scatter to have 0 inputs and 0 outputs, so using
it will likely quickly reveal an error.
2017-08-31 16:49:20 -06:00
Kenneth Moreland
16e4e6079c Fix spelling error of canonical
It was being spelled cononical.
2017-08-30 09:23:02 -06:00
Kenneth Moreland
b12a20a599 Fix issue where auto type was not resolving template parameters
Portal reference objects automatically cast to their value, but
that does not necessarily mean that it will cast correctly to
a subclass of that type.
2017-08-29 09:34:32 -07:00
Dave Pugmire
400981815f Remove warnings. 2017-08-29 09:58:25 -04:00
Dave Pugmire
b2de8045cb Cleanup. Add some additional tests for streamlines. 2017-08-29 08:35:29 -04:00
Dave Pugmire
7e69b9606d Fix merges with master. 2017-08-28 16:58:44 -04:00
Dave Pugmire
1c0f721b96 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into streamline_returntype 2017-08-28 15:27:04 -04:00
Dave Pugmire
611c5c43e5 Remove dead code. Remove compiler warnings. 2017-08-28 14:31:50 -04:00
Kenneth Moreland
3471dc27fe Expand usage of AverageByKey
The AverageByKey.h header file had a single function that used the
device adapter algorithm ReduceByKey method to do a simple averaging of
a field. I added a second method that can do an average when given a
vtkm::worklet::Keys object. I expect this to be a common use case as we
implement transforming fields from input to output in many algorithms.
2017-08-24 17:20:21 -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
Kenneth Moreland
1d5a4d470d Update ExternalFaces worklet to use hashes
Our experiments have shown using hashes and then resolving collisions to
be faster than trying to sort by Ids.
2017-08-24 12:11:45 -06:00
Robert Maynard
2e7d9e3c85 Merge topic 'introduce_neighborhood_worklet_type'
99f60c27 Add GameOfLife example to show off WorkletPointNeighborhood3x3x3.
ce803832 Adds WorkletPointNeighborhood and DispatcherPointNeighborhood types.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !864
2017-08-24 13:49:24 -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
Sujin Philip
3a3665ee5e Fix missing DeviceAdapter in dispatchers 2017-08-22 13:00:28 -04: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
Sujin Philip
2141435a19 Refactor KDTree3D worklet 2017-08-17 15:25:08 -04:00
Robert Maynard
a487017fd1 Remove lines that only contain a semi-colon. 2017-08-16 14:31:17 -04:00
ayenpure
2c662457f0 Fix particle advection compile warnings 2017-08-10 22:19:50 -04:00
ayenpure
84f9ec47ee Fix particle advection build warning
-adding code to resolve build warnings for gcc 5+
-change the return object of steps in unit test
2017-08-10 21:32:42 -04:00
ayenpure
82067fc8f3 fix for particle advection build issue 2017-08-10 20:34:05 -04:00
Dave Pugmire
02bab1a6b7 Fix merge issue. 2017-08-10 16:34:39 -04:00
Dave Pugmire
e5a814d952 Merge branch 'pics_unittests' of gitlab.kitware.com:dpugmire/vtk-m into pics_unittests 2017-08-10 16:28:48 -04:00
Dave Pugmire
b23564a526 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into pics_unittests 2017-08-10 16:18:18 -04:00
Abhishek Yenpure
e4116edab8 particle advection tests for rectilinear grid
-added tests for rectilinear grid
-fixing rectilinear grid evaluator for GPUs
2017-08-10 15:14:42 -04:00
Abhishek Yenpure
a3b4ad8b1a particle advection test fixes
-fixes for testing particle advection on the GPU.
-minor fixes for GPU
2017-08-10 13:39:47 -04:00
Thomas Otahal
89b2700298 Merge topic 'external-faces-production'
75517554 Move check for cell variables to it gets executed.
147247e8 Code formatting changes and compiler warning fixes.
a3fd135b Fix errors and warnings on Mac and Windows
347af497 Poly Data for External Faces
aeed7a07 Cell variables for External Faces
ad13e9b4 Merge branch 'master' into external-faces-production
ab25c160 External Faces Uniform and Rectilear grids

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !860
2017-08-09 16:00:01 -04:00
ayenpure
bc259e1523 Particle advection grid evaluators testing fix 2017-08-08 23:03:08 -04:00