Commit Graph

298 Commits

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