Commit Graph

1019 Commits

Author SHA1 Message Date
Dave Pugmire
18ece6dce9 Better type signatures. 2017-12-29 06:48:39 -05:00
Dave Pugmire
2537a1cf56 Worklets for cross and dot product. 2017-12-22 15:20:20 -05: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
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
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
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
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