Commit Graph

4905 Commits

Author SHA1 Message Date
Kenneth Moreland
eaf87e4519 Remove special ArrayHandleMultiplexer template case
There was a special case for ArrayHandleMultiplexer where if you gave it
just one type it would treat that as a value type rather than an array
to support and instead provide a default list of types. However, GCC 4.8
is having trouble compiling the code to create the default list, the
semantics are confusing, and the more I think about it the less likely I
think we will need this functionality. So, just getting rid of that.
2019-07-30 14:48:35 -06:00
ayenpure
29506fa53f Fixing spatial bounds for Temporal Grid Evaluator 2019-07-30 13:58:36 -06:00
ayenpure
1c9c70f74e Merge branch '2DLocators' of gitlab.kitware.com:ayenpure/vtk-m into 2DLocators 2019-07-30 09:21:33 -06:00
ayenpure
cb01e982c4 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into 2DLocators 2019-07-30 09:20:42 -06:00
Kenneth Moreland
01176efbdf Provide implementation of aligned_union
Although it is mostly C++11 compliant, GCC 4.8 does not have an
implementation of std::aligned_union. We cannot drop this compiler, so
provide our own implementation in that case.
2019-07-29 17:09:27 -06:00
Abhishek Yenpure
8b38af067c Changing LCS helpers to use vtkm Math functions 2019-07-29 14:27:07 -07:00
Abhishek Yenpure
cc7bf944be Adding fixes to the LCS filter 2019-07-29 13:05:29 -07:00
Abhishek Dilip Yenpure (-EXP)
f8862d6442 More additions to the LCS filter 2019-07-29 10:50:54 -06:00
ayenpure
b2f9f7e7e6 Adding LCS filter and worklets
- From repo https://gitlab.kitware.com/ayenpure/ftle
2019-07-29 09:03:59 -06:00
Kenneth Moreland
88c5c0a65e Merge topic 'array-handle-multiplexer'
d80a8125c Sprinkle noexcept goodness on Variant and ArrayPortalMultiplexer
a96a13cf3 Use large case statements to CastAndCall variants
866e1d7d5 Update comparison for virtual and multiplexer arrays
5416cbeb7 Add ArrayHandleMultiplexer testing to BenchmarkFieldAlgorithms
d45106452 Add changedoc for ArrayHandleMultiplexer
0aa15c97c Fix 'Failed to specialize alias template' error from Visual Studio
7b72e31df Fixes for CUDA
5e2385352 Create ArrayHandleMultiplexer
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1726
2019-07-26 17:20:13 -04:00
Dave Pugmire
703e4c254c Stream surface worklet 2019-07-26 11:20:12 -04:00
Peter Hristov
7196145605 Exposed the edges intersected by Marching Cubes.
Exposed the indices of the interpolated edges by the Marching Cubes worklet to the Marching Cubes filter. This way users have direct access to them to do further processing of the isosurface mesh. For example labeling the triangles based on which connected component they belong to. This is useful because inferring the edge directly from the vertices of the triangles of the MC output data set can be amgious due to numerical error.
2019-07-25 18:28:38 -07:00
Kenneth Moreland
d80a8125cc Sprinkle noexcept goodness on Variant and ArrayPortalMultiplexer
Allow Variant copy constructor/operators and its CastAndCall to operate
in noexcept methods. This can help the compiler make optimizations.
2019-07-25 15:25:29 -06:00
Allison Vacanti
bff75de48c Use std::is_integral<T>::value instead of is_int<>{}.
NVCC doesn't seem to handle the construction + implicit conversion
well. Explicitly specifying the value fixes this.
2019-07-23 11:38:37 -04:00
Kenneth Moreland
a96a13cf33 Use large case statements to CastAndCall variants
Previously, templates were used in the implementation of CastAndCall to
find the type and call the underlying function. The templates checked
one type at a time.

However, compilers were not always great at optimizing a 15-call deep
stack with an if statement at each one. Instead, use a case statement in
a single function block. This requires providing separate code for each
number of types. Currently, up to 20 are created (with pyexpander). If
there are more than that, then the template recurses.
2019-07-22 14:37:17 -06:00
Abhishek Dilip Yenpure (-EXP)
65cff4a4a8 Removing constexpr from if conditions 2019-07-22 09:03:08 -06:00
Kenneth Moreland
866e1d7d5b Update comparison for virtual and multiplexer arrays
Previously the "dynamic" array was taken from a VariantArrayHandle.
However, the VariantArrayHandle will actually cast to a basic array, so
the comparison is not particularly fair. Change that to an
ArrayHandleVirtual so that it is actually calling through a virtual
method.

Also make 2 versions of the multiplexer test. The first version has an
array that is at the 1st index and the second is at the last index. This
tests whether the compiled code has to do lots of actual comparisons to
get to the last index.
2019-07-22 08:36:28 -06:00
Kenneth Moreland
0aa15c97ce Fix 'Failed to specialize alias template' error from Visual Studio
The code was working fine on all the dashboards except for the Visual
Studio 2015 compiles on delve. It gave an error like:

ArrayHandleMultiplexer.h(398): error C2938: 'ArrayHandleToStorageTag<unknown-type>' : Failed to specialize alias template

A StackOverflow article (https://stackoverflow.com/questions/43411542/
metaprogramming-failed-to-specialize-alias-template) suggests that this
is a bug in older versions of Visual Studio. Although fixed in more
recent versions, we might have to support older versions.
2019-07-22 08:36:28 -06:00
Kenneth Moreland
7b72e31dfb Fixes for CUDA 2019-07-22 08:36:28 -06:00
Kenneth Moreland
5e23853521 Create ArrayHandleMultiplexer 2019-07-22 08:36:28 -06:00
Kenneth Moreland
827613263a Avoid touching ListTag internals
Currently, ListTags are implemented by having a subtype name list set to
a brigand::list. However, there is always a chance this will change. To
make things more explicit, create a vtkm::internal::ListTagToBrigandList
to make it clear what the resulting type should be (and provide some
potential future-proofing).

Also add a convenient vtkm::ListTagApply that allows you to  easily
instantiate a template with the list of types in a ListTag.
2019-07-22 08:36:28 -06:00
Kenneth Moreland
58d3123370 Add Variant
vtkm::internal::Variant is a simplified version of C++17's std::variant
or boost's variant. It is a template that takes a list of types. The
Variant may be set to any one of those types. A CastAndCall allows you
to call a functor with the appropriately cast type.
2019-07-22 08:36:28 -06:00
Kenneth Moreland
468ee61cac Merge topic 'write-to-array-handle-cast'
6592e5288 Fix IsWritableArrayHandle for portals that exist but cannot be written
0e15a1116 Enable writing to ArrayHandleCast
6d37ce945 Remove invalid PortalType

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1731
2019-07-22 10:34:54 -04:00
Kenneth Moreland
6592e52880 Fix IsWritableArrayHandle for portals that exist but cannot be written
Previously, IsWriteableArrayHandle just checked to see if an
ArrayHandle's portal has a ValueType of void* because we had coded the
special read-only array handles to have fake portals for writing.
However, we recently removed that because it was more trouble than it
was worth. Now IsWritableArrayHandle checks for the existance of the Set
method. If it does not exist, then the portal is considered read-only.

Also corrected spelling (writeable -> writable).
2019-07-19 20:33:58 -06:00
Allison Vacanti
694d1e113d Add methods to BoundaryState to query specific offsets.
The existing functionality worked on radii, but it's helpful to
know if a specific sample location will be in bounds, too.
2019-07-19 15:09:57 -04:00
ayenpure
2909565675 Adding updates 2019-07-18 10:25:47 -06:00
Kenneth Moreland
0e15a1116c Enable writing to ArrayHandleCast
Previously, `ArrayHandleCast` was considered a read-only array handle.
However, it is trivial to reverse the cast (now that `ArrayHandleTransform`
supports an inverse transform). So now you can write to a cast array
(assuming the underlying array is writable).

One trivial consequence of this change is that you can no longer make a
cast that cannot be reversed. For example, it was possible to cast a simple
scalar to a `Vec` even though it is not possible to convert a `Vec` to a
scalar value. This was of dubious correctness (it is more of a construction
than a cast) and is easy to recreate with `ArrayHandleTransform`.
2019-07-17 18:40:45 -06:00
Kenneth Moreland
6d37ce9453 Remove invalid PortalType
Several ArrayHandles (actuall Storage implementations) had a fake portal
type that only defined invalid value types and no Get/Set methods. The
idea was to quickly identify when using a read-only array for writing.
However, this was more trouble than it was worth as the compiler just
gives  an incomprehensible error and it is hard to track down the actual
value.

Now actually define some type even if it is never used.
2019-07-17 18:39:00 -06:00
Robert Maynard
8d3310fe55 Merge topic 'namespace_lodepng'
46a1df6c1 DecodePNG uses the namespaced lodepng from thirdparty/
26e50065a Merge branch 'upstream-lodepng' into namespace_lodepng
43e0185b2 lodepng 2019-07-17 (82328a33)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !1728
2019-07-17 16:07:15 -04:00
Kenneth Moreland
79909ecf12 Merge topic 'add_mesh_quality'
b622c7962 Fixed index out of bounds error for the cell counts array
4d61066e9 Removed all modifications in the internal device adapter algorithm header files.
06ac9f721 Revised version of the original mesh quality merge request
e54001367 Added few lines of code missing from cuda device adapter header
3dd34d251 Added custom CopyIf function
417dbcea7 Removed all modifications in the internal device adapter algorithm header files.
50cb805ce Fixed cuda device adapter alg
8c070caa0 Added few lines of code missing from cuda device adapter header
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1714
2019-07-17 15:42:22 -04:00
Robert Maynard
46a1df6c18 DecodePNG uses the namespaced lodepng from thirdparty/ 2019-07-17 14:21:33 -04:00
Robert Maynard
26e50065ab Merge branch 'upstream-lodepng' into namespace_lodepng
* upstream-lodepng:
  lodepng 2019-07-17 (82328a33)
2019-07-17 14:21:13 -04:00
Allison Vacanti
c2772ad857 Merge topic 'unroll_omp_reduce'
41894a97b Unroll reduction loops for non-integral types on OpenMP.
e30cb0872 Fix OpenMP for gcc-9 backwards incompatibility.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1724
2019-07-17 09:50:41 -04:00
Hank
6b65f1e2dd Merge topic 'open_nonexistent_file'
2fc7cb02a remove unused variable
5064854a0 Add error message with bad file open

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1722
2019-07-16 17:42:34 -04:00
Allison Vacanti
41894a97b3 Unroll reduction loops for non-integral types on OpenMP. 2019-07-16 14:47:41 -04:00
Allison Vacanti
e30cb08725 Fix OpenMP for gcc-9 backwards incompatibility.
For details, see

https://www.gnu.org/software/gcc/gcc-9/porting_to.html
2019-07-16 14:47:31 -04:00
Hank Childs
2fc7cb02a3 remove unused variable 2019-07-16 10:58:40 -07:00
Robert Maynard
c80c1d09c0 Merge topic 'refactor_vtkm_buildsystem_to_provide_better_consumer_experience'
28484fc6a Update examples and benchmarks to use new VTK-m CMake helper function
ea50e82aa Move VTK-m CMake testing wrappers to the testing folder
0b7dd7c38 Add CMake vtkm_add_target_information() to make using vtk-m easier
e934e2273 vtkm_library WRAP_FOR_CUDA renamed to clarify the intent of the property
a2e6660fd Remove unused vtkm_compile_as_cuda CMake function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !1718
2019-07-16 08:46:22 -04:00
Abhishek Yenpure
ede98e8fdf Updates to Grid Evaluator and Integrators 2019-07-15 09:54:48 -07:00
Abhishek Yenpure
1e4884ec15 Adding VisIt like boundary condition handling 2019-07-15 09:10:22 -07:00
Hank Childs
5064854a0d Add error message with bad file open 2019-07-12 18:19:48 -07:00
Abhishek Yenpure
c2fa0467c1 Adding support for evaluating 2D meshes.
- Adding support for evaluating 2D meshes using Rectilinear Grids
- Adding support for particle advection for 2D meshes
2019-07-11 10:45:30 -07:00
Li-Ta Lo
2c6061d37f Merge topic 'locate-points-on-boundary'
461f87dbc Fix issues with PointLocatorUniformGrid not finding all points
e473cb4bb Fix PointLocatorUniformGrid for points on boundary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !1720
2019-07-11 10:48:49 -04:00
Kenneth Moreland
461f87dbc8 Fix issues with PointLocatorUniformGrid not finding all points
There was a known issue where PointLocatorUniformGrid would quickly quit
once it found a point. Instead, look at one more level of bins just in
case there is a closer one near the boundary. (Still not guaranteed, but
likely.)

Also, fix a typo that caused some bins in the y and z direction to not
be searched.
2019-07-10 09:52:49 -06:00
Kenneth Moreland
e473cb4bbc Fix PointLocatorUniformGrid for points on boundary
When creating the search structures in PointLocatorUniformGrid, a point
outside the boundary would be given an invalid bin id. These points
could never be found. Generally, this is not a big deal for points
outside of the boundary, but it could be a problem for points on the
boundary. A point on the boundary could be taken as outside the
boundary. Since the boundary is chosen from limits of the points, some
will almost always be on the boundary.

Fix this problem by clamping all points to the nearest valid bin. This
could cause a problem if the user has selected a boundary excluding a
lot of points. All those points could be grouped to the same edge bins,
but that is probably not a great idea anyway.
2019-07-10 08:35:45 -06:00
Robert Maynard
ea50e82aac Move VTK-m CMake testing wrappers to the testing folder
The VTK-m testing infrastructure isn't public facing so it doesn't
need to be installed or clutter the main VTKmWrappers file.

At the same time I have refactored the code to make it clearer
to understand, and remove unused options.
2019-07-09 13:32:23 -04:00
Robert Maynard
e934e2273c vtkm_library WRAP_FOR_CUDA renamed to clarify the intent of the property
We want the option name to be clear that it might be applicable for
more than just CUDA. If VTK-m ever supported something like SYCL
it would not be clear that those sources should go in `WRAP_FOR_CUDA`.
2019-07-09 13:04:07 -04:00
Brent Lessley
b622c79625 Fixed index out of bounds error for the cell counts array 2019-07-04 15:34:26 -07:00
Brent Lessley
4d61066e9c Removed all modifications in the internal device adapter algorithm header files. 2019-07-03 11:12:19 -07:00
Dave Pugmire
fc69b9c1bc Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into polyLinePathGeom 2019-07-03 10:47:13 -04:00
Dave Pugmire
b866b31f48 Fix cuda compile error. 2019-07-03 08:40:50 -04:00
Brent Lessley
06ac9f7219 Revised version of the original mesh quality merge request 2019-07-02 22:35:54 -07:00
Brent Lessley
e540013679 Added few lines of code missing from cuda device adapter header 2019-07-02 22:35:54 -07:00
Brent Lessley
3dd34d251e Added custom CopyIf function 2019-07-02 22:35:54 -07:00
Brent Lessley
417dbcea7f Removed all modifications in the internal device adapter algorithm header files. 2019-07-02 22:35:54 -07:00
Brent Lessley
50cb805ceb Fixed cuda device adapter alg 2019-07-02 22:35:47 -07:00
Brent Lessley
8c070caa01 Added few lines of code missing from cuda device adapter header 2019-07-02 22:33:48 -07:00
Brent Lessley
e0f0e4d673 Added custom CopyIf function 2019-07-02 22:33:23 -07:00
Dave Pugmire
023e6bb625 Remove redundant code for computing w. 2019-07-02 18:53:32 -04:00
Dave Pugmire
e74a0800bd Move helper worklets from the detail namespace into the Tube class. 2019-07-02 16:49:48 -04:00
Dave Pugmire
2dad0301e3 Handle polylines with only 1 point. Add testing for linear polylines. 2019-07-02 14:34:37 -04:00
Robert Maynard
9213038aa2 Make sure all vtkm/cont .hxx files have header guards
Make it easier for consumer to only include hxx files a single
time.
2019-07-01 14:03:40 -04:00
Allison Vacanti
938a116dc2 Fix brace initialization of std::atomic for gcc 4.8. 2019-07-01 10:15:19 -04:00
Dave Pugmire
2e53de81fa Raise error when bad data are encountered. 2019-06-27 09:11:04 -04:00
Brent Lessley
d370674d2b Removed all modifications in the internal device adapter algorithm header files. 2019-06-27 01:35:00 -07:00
Brent Lessley
10da5e13e5 Merge remote-tracking branch 'vtkm/master' 2019-06-26 21:58:55 -07:00
Mark Kim
8dbb1c4de3 Merge branch 'master' of gitlab.kitware.com:m-kim/vtk-m into advdatamodel 2019-06-26 19:37:47 -04:00
Mark Kim
f3f71eb141 Don't need this. 2019-06-26 19:37:35 -04:00
Dave Pugmire
baf4f81753 fix compiler warning. 2019-06-26 16:42:50 -04:00
Dave Pugmire
725a222e6d Fix bug in FindValidSegment. 2019-06-26 13:52:59 -04:00
Dave Pugmire
1000ecb25b Fix cuda build issues. 2019-06-26 13:17:01 -04:00
Dave Pugmire
23c03f19ce Fix compiler warnings. 2019-06-26 10:23:13 -04:00
Dave Pugmire
9132e75ac8 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into polyLinePathGeom 2019-06-26 09:55:46 -04:00
Dave Pugmire
48d0606769 Add capping, unit tests and remove debugging info. 2019-06-26 09:51:06 -04:00
Robert Maynard
0eac06f5b0 Merge topic 'diy_export_mpi_req'
bbb391226 VTKmTestInstall properly propagates compiler flags
86df1d27b Update VTKmMPI to handle CMake 3.13+
118583dea Test compilations against installed VTK-m work with CUDA enabled
8f1589c96 Correct license on FindMPI.cmake
74d713c77 Install compilation tests are enabled when examples are disabled
fb6235e0e VTK-m and DIY now properly export MPI requirements.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1712
2019-06-26 08:31:33 -04:00
Brent Lessley
7001563eda Resolved merge conflict with remote master 2019-06-25 23:18:13 -07:00
Allison Vacanti
920ef9b3b9 Merge topic 'bit_algorithms'
f370857c1 Add CountSetBits and Fill device algorithms.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1696
2019-06-25 15:42:16 -04:00
Allison Vacanti
f370857c15 Add CountSetBits and Fill device algorithms. 2019-06-25 11:30:39 -04:00
Mark Kim
9ebcf5c610 Fix warning about attributes
-Wattributes "type attributes ignored
after type is already defined"
2019-06-25 11:01:59 -04:00
Mark Kim
699b57191f Merge branch 'master' of gitlab.kitware.com:m-kim/vtk-m into advdatamodel 2019-06-25 10:36:47 -04:00
Mark Kim
a5027d74d2 clean up warnings.
In clang and vc++
2019-06-24 22:10:32 -04:00
Dave Pugmire
4ff15790ed Add start/end capping and use triangles for cells. 2019-06-24 17:57:43 -04:00
Mark Kim
a941f0aea3 pass arrayhandle to ArrayHandleExtrudeCoords
which passes directly to storage to avoid a copy.
2019-06-24 15:15:20 -04:00
Robert Maynard
fb6235e0e9 VTK-m and DIY now properly export MPI requirements.
Previously an installed version of VTK-m wasn't relocatable as
it had system MPI paths. Additionally the installed vtkm_diy target
would depend on MPI but not `find_package(MPI)`
2019-06-24 14:48:01 -04:00
Mark Kim
8a3528d700 consolidate some files
ArrayPortalExtrude and ArrayPortalExtrudePlane
merged into StorageExtrude.h
2019-06-22 00:48:12 -04:00
Mark Kim
c47ee35fd1 better c++ encapsulation. 2019-06-21 23:01:03 -04:00
Mark Kim
9aa1a3f378 Need to specialize DeduceCellSet
on 2D CellSetStructured.
2019-06-21 21:48:26 -04:00
Mark Kim
b9448131d5 Fix visual studio error. 2019-06-21 20:51:44 -04:00
Mark Kim
fc479aa02c fix warnings 2019-06-21 14:39:23 -04:00
Mark Kim
876727d81f tbb testing needs vtkm_worklet
as library
2019-06-21 14:37:22 -04:00
Mark Kim
771c7cb7b3 fix warnings 2019-06-21 12:11:36 -04:00
Mark Kim
978fc2b9c2 Copyright notices. 2019-06-21 11:35:46 -04:00
Dave Pugmire
b348522d17 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into polyLinePathGeom 2019-06-21 09:46:45 -04:00
Dave Pugmire
92348e28fd Implementation for tube filter. 2019-06-21 09:45:37 -04:00
Robert Maynard
83bc8d7596 Merge topic 'dont_launch_zero_size_cuda_tasks'
1ea386222 cuda copy functions don't launch on length zero arrays

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1708
2019-06-21 08:57:49 -04:00
Brent Lessley
f3785594af Merge remote-tracking branch 'vtkm/master' 2019-06-21 00:51:46 -07:00
Mark Kim
cffd3873fc Merge branch 'advdatamodel' 2019-06-20 22:20:44 -04:00
Mark Kim
6e1d3a84f0 First Extrude commit.
how did any of this work?

match other CellSet file layouts.

???

compile in CUDA.

unit tests.

also only serial.

make error message accurate

Well, this compiles and works now.

Did it ever?

use CellShapeTagGeneric

UnitTest matches previous changes.

whoops

Fix linking problems.

Need the same interface

as other ThreadIndices.

add filter test

okay, let's try duplicating CellSetStructure.

okay

inching...

change to wedge in CellSetListTag

Means changing these to support it.

switch back to wedge from generic

compiles and runs

remove ExtrudedType

need vtkm_worklet

vtkm_worklet needs to be included

fix segment count for wedge specialization

need to actually save the index

for the other constructor.

specialize on Explicit

clean up warning

angled brackets not quotes.

formatting
2019-06-20 22:17:24 -04:00
Robert Maynard
1ea386222e cuda copy functions don't launch on length zero arrays 2019-06-20 16:54:23 -04:00
Robert Maynard
5e5e1638ac Merge branch 'add_lodepng_thirdparty' into 'master'
Add lodepng thirdparty

See merge request vtk/vtk-m!1704
2019-06-20 15:49:31 -04:00
Robert Maynard
68cb906ae3 Merge topic 'correct_ubsan_undefined_behavior'
512d0431e Cell and Point locators have correct export visibility
c7f827581 Correct signed to unsigned warning conversion found by clang-8
c28797845 Gradient's ComputeDivergence is now properly initialized

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1705
2019-06-19 14:41:58 -04:00
Robert Maynard
33d4f6958f Merge branch 'upstream-lodepng' into add_lodepng_thirdparty
* upstream-lodepng:
  lodepng 2019-06-16 (430268ba)
2019-06-19 14:40:00 -04:00
Robert Maynard
23aeff054e vtkm_rendering now uses vtkm/thirdparty/lodepng
Previously it used a version of the decode routines from lodepng
inside the decode functionality.
2019-06-19 14:39:46 -04:00
Robert Maynard
8153246381 Add lodepng as a vtk-m thirdparty library. 2019-06-19 14:39:46 -04:00
Robert Maynard
8d4611387a Simplify Timer now that RuntimeDeviceTracker handles 'any' device. 2019-06-19 10:50:44 -04:00
Robert Maynard
171fdffd0e Make sure vtkm_cont links to vtkm_loguru when logging enabled 2019-06-19 09:52:43 -04:00
Robert Maynard
512d0431ec Cell and Point locators have correct export visibility
UBSAN found that these execution object had mixed visibility
causing undefined behavior when casting across DSO's.
2019-06-19 08:36:19 -04:00
Robert Maynard
c7f8275818 Correct signed to unsigned warning conversion found by clang-8 2019-06-19 08:36:19 -04:00
Robert Maynard
c287978455 Gradient's ComputeDivergence is now properly initialized
UBSAN detected that the value wasn't properly initialized causing
reading from it to be undefined behavior.
2019-06-19 08:36:19 -04:00
Robert Maynard
e8f3b1233d Merge topic 'correct_undefined_behavior_in_TaskTiling'
3c85f7f40 Correct undefined behavior from missing export on ErrorMessageBuffer
e298e05bc Test will now fail if programs such as UBSAN output "runtime error"
feb66f970 Make VTK-m use consistent symbol visibility for benchmarks
b43d61533 Make VTK-m use consistent symbol visibility for tests.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1699
2019-06-19 08:32:51 -04:00
Robert Maynard
6734ddcec2 Merge topic 'log_cuda_version_worklet_are_launched_with'
8aaf922aa Introduce a log level that details kernel launch parameters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1672
2019-06-19 08:32:27 -04:00
Robert Maynard
d4932c49d1 Merge topic 'cleanup_thirdparty_related_code'
9dc8b06df Cleanup logic surrounding the usage of vtkm thirdparty libraries
7454242e5 Cleanup unnecessary thirdparty exclusions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1703
2019-06-18 17:35:45 -04:00
Robert Maynard
9dc8b06dfb Cleanup logic surrounding the usage of vtkm thirdparty libraries 2019-06-18 16:08:42 -04:00
Robert Maynard
8aaf922aa4 Introduce a log level that details kernel launch parameters 2019-06-18 15:01:07 -04:00
Robert Maynard
3c85f7f40f Correct undefined behavior from missing export on ErrorMessageBuffer 2019-06-18 13:53:32 -04:00
Dave Pugmire
03e7b77fc9 Initial modifications for tube filter. 2019-06-18 10:38:41 -04:00
Allison Vacanti
ffa7821ad8 Merge topic 'wavelet_perf_log'
41bfd5503 Log wavelet generator performance.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1700
2019-06-17 11:16:09 -04:00
Allison Vacanti
41bfd5503a Log wavelet generator performance. 2019-06-14 15:30:23 -04:00
Allison Vacanti
dff7c40d0c Provide better error messages when misusing a BitPortalConst. 2019-06-14 15:26:55 -04:00
Brent Lessley
6d008dff2f Merge remote-tracking branch 'vtkm/master' 2019-06-13 12:06:08 -07:00
Allison Vacanti
990b0241a3 Merge topic 'update_loguru'
1002c038e Merge branch 'upstream-loguru' into update_loguru
0624ac777 loguru 2019-03-21 (862ed46e)
331c2d569 Update to latest loguru for MSVC fixes.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1687
2019-06-13 13:10:05 -04:00
Robert Maynard
354b0843e8 Merge topic 'split_sharp_edge_assertion_issue_373'
a9e6a919d Correct a subtle difference in the SplitSharp multiple pass algorithm
0f61808da SplitSharpEdges worklet does more algorithm execution on the device.
20fa341a2 SplitSharpEdgesFilter test now checks against a structured dataset
99865f47d Update Wavelet worklet to support a runtime device adapter id

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1693
2019-06-13 10:54:40 -04:00
Robert Maynard
a9e6a919d5 Correct a subtle difference in the SplitSharp multiple pass algorithm
Fixes #373
The SplitSharp algorithm has two passes that have the same algorithm,
but does different work with the final computed state. The issue was
that in the original implementation the two algorithms differed slightly.
This refactors the code to have a single implementation of the algorithm,
to avoid this form of issue going forward.
2019-06-12 18:05:06 -04:00
Kenneth Moreland
c9ab3b626d Merge topic 'reader-use-logging'
fbbc18590 Use logging to output status of VTKDataSetReaderBase

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1689
2019-06-12 16:06:35 -04:00
Kenneth Moreland
2641f2fdd2 Merge topic 'test-equal-recursive-types'
2e0f4dd37 Fix floating point error in test
b766d9a92 Improve support of testing recursive types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1691
2019-06-12 12:44:52 -04:00
Kenneth Moreland
fbbc185901 Use logging to output status of VTKDataSetReaderBase
The original implementation predates the logging and so just outputted
error and warning messages to stderr. Changed these to the more
appropriate logging mechanism.
2019-06-12 09:40:54 -06:00
Allison Vacanti
1002c038e7 Merge branch 'upstream-loguru' into update_loguru
* upstream-loguru:
  loguru 2019-03-21 (862ed46e)
2019-06-12 10:08:02 -04:00
Allison Vacanti
331c2d5690 Update to latest loguru for MSVC fixes. 2019-06-12 10:07:51 -04:00
Allison Vacanti
9e02635ea9 Fix type name in debug message. 2019-06-12 09:56:25 -04:00
Robert Maynard
0f61808da9 SplitSharpEdges worklet does more algorithm execution on the device.
The construction of the point id mapping can be done on the device,
and not the host.
2019-06-12 09:22:24 -04:00
Robert Maynard
20fa341a2b SplitSharpEdgesFilter test now checks against a structured dataset 2019-06-12 09:22:24 -04:00
Robert Maynard
99865f47d1 Update Wavelet worklet to support a runtime device adapter id 2019-06-12 09:22:24 -04:00
Robert Maynard
b7dc1ddccc Merge topic 'remove_unused_private_field'
e7b08ffd2 Remove unused private field.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1692
2019-06-12 09:12:41 -04:00
Kenneth Moreland
2e0f4dd376 Fix floating point error in test
The UnitTestCudaArrayHandleFancy was failing because it was
was calling TestValue in a worklet and comparing that to
a value that was generated by calling TestValue on the host.
Because these were called on different architecture, it is
possible that they will not be bit-wise exact. Add a little
bit of tolerance to the check to avoid false failures for
this reason.
2019-06-11 15:57:12 -06:00
Nick Thompson
e7b08ffd2c Remove unused private field. 2019-06-11 17:47:43 -04:00
Kenneth Moreland
b766d9a92a Improve support of testing recursive types
Base templated types like Vec, Matrix, and Pair can now be recursively
nested and used in testing methods like test_equal and TryTypes.
2019-06-11 09:51:44 -06:00
Kenneth Moreland
ba25ba2781 Merge topic 'has-vec-traits'
053d5a059 Add HasVecTraits

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1690
2019-06-11 10:13:20 -04:00
Kenneth Moreland
1aa971a0a3 Merge topic 'bounds-matrix-vtkm-namespace'
a3783ef51 Move Bounds and Matrix operators to vtkm namespace

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1688
2019-06-11 09:50:31 -04:00
Kenneth Moreland
053d5a0591 Add HasVecTraits
HasVecTraits<T> is a template that will resolve to std::true_type if
VecTraits<T> is properly defined and std::false_type otherwise. This is
helpful when defining classes and methods that use VecTraits but you
still want them to compile if VecTraits does not exist.
2019-06-06 15:28:47 -06:00
Kenneth Moreland
a3783ef514 Move Bounds and Matrix operators to vtkm namespace
This helps with ADL lookup.
2019-06-06 12:48:30 -06:00
Kenneth Moreland
e3cc3eecb4 Merge branch 'upstream-taotuple' into msvc-cuda-fixes
* upstream-taotuple:
  taotuple 2019-06-05 (990962ae)
2019-06-05 12:02:44 -06:00
Kenneth Moreland
f11702ae92 Fix for rogue definition of PASCAL macro 2019-06-05 10:09:49 -06:00
Kenneth Moreland
03ea0bab0a Use __pragma on MSVC
All C++11 compilers support _Pragma to insert pragmas inline into code
and within macros. All compilers, that is, except for visual studio
because Microsoft has to be contrarian and make life miserable for all
programmers. Instead, you have to use __pragma with visual studio.
2019-06-05 10:04:56 -06:00
Robert Maynard
b80a3789f0 Remove unneeded methods from warpscalar and warpvector filters 2019-06-03 13:53:31 -04:00
Dave Pugmire
d4fffe3f2b Merge topic 'add_polyLine'
401b12bd6 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_polyLine
fea18190f Specialized cases for cell-edge functions on polylines.
d310ec3aa return type is void. Call vertex/line methods, then just return.
d6898b805 Fix cell deriv for polylines and remove print statements.
9157004ac Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_polyLine
d6e2e9588 Remove debugging print statements.
b9d109ab3 Fix for CellEdgeFace test. Case is identical to polygon.
d7e793861 Fix compiler warnings. Comment out std::cout usage for testing with cuda.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1677
2019-05-31 16:53:07 -04:00
Robert Maynard
7b343fbc1d Merge topic 'update_to_support_thrust_1.9.6_release'
6775685c7 Update ThrustPatches to be aware of issues fixed in thrust 1.9.6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1683
2019-05-31 16:06:53 -04:00
Robert Maynard
6775685c72 Update ThrustPatches to be aware of issues fixed in thrust 1.9.6 2019-05-31 10:08:47 -04:00
Matt Larsen
ae3687cb8f Merge topic 'ExtractStructured'
42a3602ed Had missed a few unused variables when fixing rebase issues.
63a4e696c vim retabed and removed trailing whitespaces form Unit Test
e0000f35f Should be working now
63165904c Merged with the pull (reword)
5cc1de297 Clearing out unused variables
c7bd79e78 Extract Structured with Offset
56598ebfa Maybe closer
5feadd166 Pushing for Abhishek (Don't merge)
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1644
2019-05-30 20:23:08 -04:00
Steven Walton
42a3602ed6 Had missed a few unused variables when fixing rebase issues. 2019-05-30 15:09:02 -07:00
Steven Walton
63a4e696cb vim retabed and removed trailing whitespaces form Unit Test 2019-05-30 12:52:29 -07:00
Steven Walton
e0000f35f5 Should be working now
Did a bad rebase to fix old commit message. Propagated merge conflicts
through so things got really confusing. Code looks to be back to normal
now though.
2019-05-30 12:48:20 -07:00
Steven Walton
5cc1de2973 Clearing out unused variables 2019-05-30 11:13:46 -07:00
Steven Walton
c7bd79e789 Extract Structured with Offset
Added code for giving ExtractStructured an offset value. Unit tests
three different 3D cases and a 3D case.
2019-05-30 11:13:29 -07:00
Steven Walton
56598ebfa5 Maybe closer 2019-05-30 11:13:17 -07:00
Steven Walton
5feadd1661 Pushing for Abhishek (Don't merge) 2019-05-30 11:13:05 -07:00
Steven Walton
cf61a645ea Getting there with ES 2019-05-30 11:12:47 -07:00
Steven Walton
358d3cf683 Maybe right? 2019-05-30 11:12:26 -07:00
Steven Walton
779b60e9fd Merged and forgot to pull from do reformat 2019-05-30 11:11:08 -07:00
Robert Maynard
ae6999e534 Merge topic 'cmake_dont_presume_cuda_compiler_is_always_nvcc'
2a7ef3011 CMake: Don't presume the cuda compilers is always NVCC.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1682
2019-05-29 14:58:08 -04:00
Dave Pugmire
401b12bd6f Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_polyLine 2019-05-29 12:59:14 -04:00
Dave Pugmire
fea18190f4 Specialized cases for cell-edge functions on polylines. 2019-05-29 09:53:09 -04:00
Robert Maynard
2a7ef30116 CMake: Don't presume the cuda compilers is always NVCC. 2019-05-29 09:24:01 -04:00
Dave Pugmire
d310ec3aa6 return type is void. Call vertex/line methods, then just return. 2019-05-29 08:18:31 -04:00
Steven Walton
c268f36e03 Clearing out unused variables 2019-05-28 11:21:17 -07:00
Dave Pugmire
d6898b8052 Fix cell deriv for polylines and remove print statements. 2019-05-28 13:25:23 -04:00
Steven Walton
21726038c5 IncludeOffset was defaulting to true when it should default to false 2019-05-25 17:32:50 -07:00
Steven Walton
62edf4e85f Extract Structured with Offset
Added code for giving ExtractStructured an offset value. Unit tests
three different 3D cases and a 3D case.
2019-05-24 17:15:28 -07:00
Robert Maynard
095e288383 Merge topic 'better_scoped_rt_dt'
bcaf7d9be ScopedRuntimeDeviceTracker have better controls of setting devices.
4212d0c04 RuntimeDeviceInformation now says the AnyTag exists.
fa03dc664 ScopedRuntimeDeviceTracker requires a device to execute on when constructed.
4020f5198 RuntimeDeviceTracker can't be copied and is only accessible via reference.
e9482018e ScopedRuntimeDeviceTracker has the same API as RuntimeDeviceTracker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1676
2019-05-24 16:45:22 -04:00
Dave Pugmire
9157004ac4 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_polyLine 2019-05-24 15:06:30 -04:00
Robert Maynard
425fcd89bf Merge topic 'use_the_magic_inline_keyword_to_fix_cuda_issues'
3a4bffe53 Make sure methods that are used by multiple TU's are inline.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1680
2019-05-23 16:41:28 -04:00
Robert Maynard
3a4bffe538 Make sure methods that are used by multiple TU's are inline.
These methods need to be marked inline as they are used by multiple
TU's. When they aren't marked as inline we see random failures in
downstream VTK-m users generally when CUDA is enabled due to ODR
violations.
2019-05-22 15:24:57 -04:00
Dave Pugmire
d6e2e9588e Remove debugging print statements. 2019-05-22 14:37:06 -04:00
Dave Pugmire
b9d109ab3d Fix for CellEdgeFace test. Case is identical to polygon. 2019-05-22 13:08:12 -04:00
Dave Pugmire
d7e793861b Fix compiler warnings. Comment out std::cout usage for testing with cuda. 2019-05-22 12:40:45 -04:00
Dave Pugmire
83cf50d549 Fixes for polyline parameterization. 2019-05-22 11:42:49 -04:00
Robert Maynard
bcaf7d9beb ScopedRuntimeDeviceTracker have better controls of setting devices.
The ScopedRuntimeDeviceTracker now can force, enable, or disable
devices. Additionally the ScopedRuntimeDeviceTracker and the
RuntimeDeviceTracker handle the DeviceAdapterTagAny robustly
across all methods.
2019-05-21 15:32:10 -04:00
Robert Maynard
4212d0c04f RuntimeDeviceInformation now says the AnyTag exists. 2019-05-21 15:15:06 -04:00
Robert Maynard
fa03dc664a ScopedRuntimeDeviceTracker requires a device to execute on when constructed.
To simplify using the ScopedRuntimeDeviceTracker it now takes the
device id you want to run on during construction.
2019-05-21 11:17:37 -04:00
Robert Maynard
2041091e72 Move vtkm:: operators from global namespace to vtkm namespace
Fixes #361
The Vec, Range, and Pair free function operators are all now in
the vtk-m namespace to help with ADL lookup.
2019-05-20 14:16:32 -04:00
Robert Maynard
4020f51988 RuntimeDeviceTracker can't be copied and is only accessible via reference.
As the RuntimeDeviceTracker is a per thread construct we now make
it explicit that you can only get a reference to the per-thread
version and can't copy it.
2019-05-20 11:43:05 -04:00
Dave Pugmire
489995782f Support for polylines. 2019-05-17 13:35:35 -04:00
Robert Maynard
7f487b1e25 Merge topic 'dispatcher_reduce-by-key_use_scheduling_range'
63fe0f096 DispatcherReduceByKey uses the scheduling_range like all other dispatchers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1674
2019-05-16 15:28:46 -04:00
Robert Maynard
2771497728 Merge topic 'handle_dynamic_cellset_gracefully'
1b62901e9 Empty DynamicCellSet doesn't segfault on certain queries.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1675
2019-05-16 09:11:13 -04:00
Robert Maynard
4674af7442 Merge topic 'support_clang-cl'
7184648c4 Add support for clang-cl compilation on windows
b8f5d582d Merge branch 'upstream-diy' into support_clang-cl
58ad3ca36 diy 2019-05-14 (41fd7af6)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1671
2019-05-16 08:31:58 -04:00
Robert Maynard
1b62901e96 Empty DynamicCellSet doesn't segfault on certain queries.
Fixes #370
2019-05-16 08:29:17 -04:00
Robert Maynard
e9482018ee ScopedRuntimeDeviceTracker has the same API as RuntimeDeviceTracker 2019-05-15 17:26:31 -04:00
Robert Maynard
63fe0f0965 DispatcherReduceByKey uses the scheduling_range like all other dispatchers 2019-05-15 14:27:51 -04:00
Robert Maynard
18a0cd35b0 vtkm::worklet::Invoker now supports scatter types
Fixes #297
2019-05-15 11:04:14 -04:00
Robert Maynard
afc3f5304e Remove unneeded ScatterType as it was the default 2019-05-15 10:46:47 -04:00
Robert Maynard
a1ea509f87 All scatter types now inherit from a common base
This is required for vtkm::worklet::Invoker to launch worklets
with a non default scatter type.
2019-05-15 10:17:45 -04:00
Robert Maynard
77378993f8 DispatcherBase: Simplify remove_cvref and remove_pointer_and_decay.
designed easier to use remove_cvref and remove_pointer_and_decay
functions for the DispatcherBase.
2019-05-15 09:37:56 -04:00
Robert Maynard
b8f5d582d6 Merge branch 'upstream-diy' into support_clang-cl
* upstream-diy:
  diy 2019-05-14 (41fd7af6)
2019-05-14 11:47:02 -04:00
Sujin Philip
bd626dac79 Merge topic 'improve-reader'
b74ab327d Improve VTK DataSet Reader

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1670
2019-05-14 07:02:16 -04:00
Sujin Philip
b74ab327dc Improve VTK DataSet Reader
1. Support reading Tensors (Vec<T, 9>)
2. Support reading files having `METADATA`.
2019-05-13 15:26:15 -04:00
Robert Maynard
80e5f274a3 Update update-common.sh to the SHA1: b094fcba
This update allows for the update-common script to be run from
any directory
2019-05-13 15:17:23 -04:00
Steven Walton
4c0e55ffe9 Maybe closer 2019-05-08 20:50:55 -07:00
Robert Maynard
fa3722bfa3 FindFirstSetBit now correctly compiles with the Intel compiler
Fixes https://gitlab.kitware.com/paraview/paraview/issues/18993
2019-05-08 15:48:58 -04:00
Steven Walton
166255acfa Pushing for Abhishek (Don't merge) 2019-05-07 16:19:52 -07:00
Robert Maynard
850aa44be4 Merge topic 'cuda_hpc_defaults'
d1ce4a0bc Fix the default launch sizes for Tesla hardware.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1667
2019-05-07 14:40:48 -04:00
Steven Walton
7d77059339 Getting there with ES 2019-05-06 17:48:07 -07:00