Commit Graph

280 Commits

Author SHA1 Message Date
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
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
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
Sujin Philip
5842da4921 Remove ArrayHandle CopyInto
Fixes #170
2017-10-27 17:28:59 -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