Commit Graph

1093 Commits

Author SHA1 Message Date
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
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