Commit Graph

328 Commits

Author SHA1 Message Date
Allison Vacanti
183bcf109a Add initial version of an OpenMP backend. 2018-05-31 16:47:48 -04:00
Allison Vacanti
93506d25e2 Change function signatures to use 'using' aliases.
Also cleaned up some lingering type typedefs.
2018-05-25 17:18:41 -04:00
Haocheng LIU
fae8409c9c Add float version operations for vtkm::Math Pi()
This commit also removes the old static_cast<vtkm::float32>vtkm::Pi() usages and
fix serveral conversion warnings.
2018-05-21 10:58:15 -04:00
David Thompson
52a1495859 Fix cell measure when using double precision as default. 2018-05-18 14:05:06 -04:00
David Thompson
00c7905afb Rename vtkm::dot() to vtkm::Dot().
This keeps the old name around but prepares it for removal
in the next release.
2018-05-17 08:51:01 -04:00
David Thompson
dd7c17f776 Compute cell measures (arc length, area, volume).
This commit adds a worklet and a filter to compute
signed integral measures of cells.

It also begins the practic of adding a markdown
changelog entry in `doc/changelog`. See the
changelog entry for details.
2018-05-17 08:50:56 -04:00
Kenneth Moreland
0753131a04 Replace ExecutionObjectFactoryBase with ExecutionObjectBase
While making changes to how execution objects work, we had agreed to
name the base object ExecutionObjectBase instead of its original name of
ExecutionObjectFactoryBase. Somehow that change did not make it through.
2018-05-10 17:53:39 -06:00
Sujin Philip
2f92e40503 Suppress false positive cuda warnings
Suppresses "declared but never referenced" warnings.
2018-05-09 13:17:37 -04:00
Utkarsh Ayachit
bd43f4b1fd UnitTestCellDerivative: fix type conversion warning. 2018-05-08 14:52:22 -04:00
Utkarsh Ayachit
1644451715 CellDerivative: fix type conversion warnings 2018-05-08 14:52:22 -04:00
Matthew Letter
0ea68f6c41 removed execution object base from code base
since we no longer use execution object base in the code base it is being removed
2018-05-03 14:45:22 -06:00
Kenneth Moreland
9127029fbb Determine ExecObject type directly from PrepareForExecution
Rather than require all ExecutionObjectFactoryBase classes to declare a
templated ExecObjectType type, get the type of the execution object
directly from the result of the PrepareForExecution method.
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
f025c2187b Suppress conversion warning inside Cell Interpolate code
When converting integer fields the interpolate code generates lots
of warnings that we are promoting into floating point space.
The quickest solution is to suppress these conversion warnings
all together for all interpolation functions.
2018-05-02 13:32:02 -04:00
Robert Maynard
06e15e601d Merge topic 'vtkm_vec_constructor_bug'
adcabb03 VTK-m Vec<> constructors are now more conservative.
6267deb6 CellDerivativeFor3DCell has a better version for Vec of Vec fields.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1170
2018-05-01 08:29:45 -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
Robert Maynard
6267deb67e CellDerivativeFor3DCell has a better version for Vec of Vec fields.
Previously we would compute a 3x3 matrix where each element was a Vec. Using
the jacobain of a single component is sufficient so by using that we safe 2 to
3 times the memory space.

Additionally by moving to doing the derivative as a per component algorithm
we work around the issues found in bug
https://gitlab.kitware.com/vtk/vtk-m/issues/221. In effect when trying to
construct a Vec of Vec from a component of a different floating type e.g.:

  Vec3d x(0.0, 1.0, 2.0);

  Vec3f a = x;
  Vec3x3f b = x;
  Vec3x3f c(x, x, x);

Generates bad values vectors such as b which look like:

b: [[0,0,0],[1,1,1],[2,2,2]]
c: [[0,1,2],[0,1,2],[0,1,2]]
2018-04-27 08:14:34 -04:00
Robert Maynard
1ec478ce62 ColorTable now converts to and from double less often.
Previously we would convert to double to perform some operations instead
of always staying in float space.
2018-04-25 15:35:27 -04:00
Matt Larsen
715141737f Merge topic 'typos'
efdf8543 Misc. Typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !1113
2018-04-06 18:04:46 -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
luz.paz
efdf854306 Misc. Typos
Found via `codespell` and `grep`
2018-03-28 09:45:07 -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
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
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
Robert Maynard
022c987182 Correct warnings and errors found with MSVC2017+CUDA9 2018-01-31 15:58:45 -05: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
Robert Maynard
7d7c6ab1ab Don't allow DeviceTaskTypes to construct tasks from rvalues. 2018-01-18 13:51:30 -05:00
Robert Maynard
0660c67fef Merge branch 'master' into vtk-m-cmake_refactor 2018-01-16 15:42:28 -05:00
Robert Maynard
004bfe7b12 Prefer using existence of targets when looking for TBB/CUDA support 2018-01-08 14:00:57 -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