Commit Graph

4853 Commits

Author SHA1 Message Date
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
Robert Maynard
1e1cf21024 Merge topic 'better_stealarray_api'
674fe1fbf StealArray now returns the array and free function as a Pair.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1664
2019-05-06 17:46:24 -04:00
Robert Maynard
d1ce4a0bca Fix the default launch sizes for Tesla hardware.
The 8x8x8 is a better launch strategy for most VTK-m kernels.
The current problem is that a couple of VTK-m kernels use a
high number of registers and this number of threads combines to
require too many registers.

What we should do in the longer run is have more controls over
kernel launches on a per kernel basis. This will require VTK-m
to extract the number of registers being used by each kernel
2019-05-06 16:12:15 -04:00
Robert Maynard
7fdf5ec2e4 Merge topic 'gcc_485_fixes'
41b8236a2 For GCC 4.8.4 'half' shadows a global variable with that name
770912f99 Correct compiler issues found with GCC 4.8.5 + CUDA 9.2 on summit
b248b2c93 Correct unused-parameter warnings from defaulted methods.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1666
2019-05-03 08:35:58 -04:00
Robert Maynard
41b8236a25 For GCC 4.8.4 'half' shadows a global variable with that name 2019-05-02 10:27:48 -04:00
Robert Maynard
770912f991 Correct compiler issues found with GCC 4.8.5 + CUDA 9.2 on summit 2019-05-02 10:27:48 -04:00
Robert Maynard
b248b2c939 Correct unused-parameter warnings from defaulted methods.
GCC 4.8.5 warns about defaulted methods when parameters have names.
2019-05-02 10:27:48 -04:00
Nickolas Davis
af0460baa8 Merge topic 'min-and-max-operator-tests'
45c92a050 added missing MinAndMax BinaryOperator tests, updated formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1662
2019-05-01 14:36:24 -04:00
Robert Maynard
674fe1fbf2 StealArray now returns the array and free function as a Pair.
This helps reduces bugs when the callers ask to steal arrays
without getting the free function, or ask for the free function
after stealing the array.
2019-05-01 09:42:57 -04:00
Robert Maynard
75bf9d361c Merge topic 'testing_device_adapter_remove_array_manager_execution_usage'
065d11783 Testing Device Adapter now uses ArrayHandle for all device transfers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1651
2019-05-01 08:22:10 -04:00
Robert Maynard
a896f77988 Merge topic 'warnings_gcc_64'
3dda0ab2d Correct unused-parameter warnings from defaulted methods.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1663
2019-05-01 08:19:30 -04:00
Robert Maynard
065d117838 Testing Device Adapter now uses ArrayHandle for all device transfers
The consistent API for control to execution memory transfers is
the ArrayHandle class. Previously the tests would verify memory
transfer by calling the ArrayManagerExecution class directly. This
is problematic as the class isn't used by ArrayHandle<T, StorageBasic>.
2019-04-30 13:50:08 -04:00
Robert Maynard
3dda0ab2d6 Correct unused-parameter warnings from defaulted methods.
GCC 6 warns about defaulted methods when parameters have names.
2019-04-30 13:12:32 -04:00
nadavi
45c92a0509 added missing MinAndMax BinaryOperator tests, updated formatting 2019-04-30 09:43:17 -06:00
Robert Maynard
a3df54017b Merge topic 'correct_leaks_found_by_asan'
27426b7bc Fix warnings found with clang-8 inside the OpenMP device adapter.
cec9af64b Update the lsan suppression to capture tbb leaks.
8ef2c4be7 TransferInfo doesn't leak when holding VirtualObjectTransferShareWithControl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1661
2019-04-30 08:17:38 -04:00
Robert Maynard
f3c038f6e0 Merge topic 'mark_more_methods_as_control_side_only'
d468784f0 Correct more host/device warnings from methods that should be host only

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1660
2019-04-29 17:12:18 -04:00
Robert Maynard
27426b7bcc Fix warnings found with clang-8 inside the OpenMP device adapter. 2019-04-29 17:05:10 -04:00
Robert Maynard
8ef2c4be72 TransferInfo doesn't leak when holding VirtualObjectTransferShareWithControl
When TransferInfo is given memory from VirtualObjectTransferShareWithControl
it doesn't have a bound function ptr for the destruction. In those cases
we need to make sure the HostCopyOfDevice is properly deleted, otherwise
we will cause a memory leak.
2019-04-29 15:51:19 -04:00
Robert Maynard
33a30299d7 Merge topic 'more_minor_style_and_export_corrections'
bdabfbe11 Make sure ArrayPortalUniformPointCoordinates constructor is explicit
b3d951b50 vtkm::Range Include function now requires half as many min/max calls
ddaa0df26 ArrayHandleVirtualCoordinates now calls the proper parent constructor
61e800379 Make sure all execution side CellLocator objects have explicit destructors
307898ff6 Cleanup the CellLocatorBoundingIntervalHierarchy.cxx style.
0f31c69f3 Remove unnecessary constructor from ParameterContainer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1657
2019-04-29 14:17:55 -04:00
Robert Maynard
d468784f00 Correct more host/device warnings from methods that should be host only 2019-04-29 13:15:42 -04:00
Robert Maynard
967581cf16 Merge branch 'upstream-taotuple' into update_tao_cuda_pragmas
* upstream-taotuple:
  taotuple 2019-04-24 (57001975)
2019-04-29 09:12:58 -04:00
Robert Maynard
bdabfbe116 Make sure ArrayPortalUniformPointCoordinates constructor is explicit
We have had problems in the past with host/device default constructors
2019-04-26 10:23:59 -04:00
Robert Maynard
b3d951b501 vtkm::Range Include function now requires half as many min/max calls 2019-04-26 10:21:36 -04:00
Robert Maynard
ddaa0df261 ArrayHandleVirtualCoordinates now calls the proper parent constructor
Previously it was calling the ArrayHandle<T,StorageTagVirtual>
constructor and not the ArrayHandleVirtual constructor which
generated a warning with some compilers
2019-04-26 10:11:04 -04:00
Robert Maynard
61e8003793 Make sure all execution side CellLocator objects have explicit destructors 2019-04-26 10:10:21 -04:00
Sujin Philip
ee2999d19b Some classes should be exported 2019-04-25 09:50:49 -04:00
Robert Maynard
307898ff65 Cleanup the CellLocatorBoundingIntervalHierarchy.cxx style. 2019-04-24 10:13:35 -04:00
Robert Maynard
0f31c69f32 Remove unnecessary constructor from ParameterContainer 2019-04-24 10:12:43 -04:00
Robert Maynard
9937f51fe1 Merge topic 'thrust_patch_order'
63c931e63 Correct location of ThrustPatches which clang formatter moved

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1653
2019-04-23 17:37:05 -04:00
Robert Maynard
a36d321501 Merge topic 'cuda_device_tag_unit_test_errors'
6fafcf01f correct compile issues caused by clang formatting.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1655
2019-04-23 17:36:44 -04:00
Robert Maynard
6fafcf01fd correct compile issues caused by clang formatting.
A couple of tests require vtkm/testing/Testing to be the first include
2019-04-23 17:16:26 -04:00
Kenneth Moreland
90dd8a0ef7 Correct clang formatting in Math.h.in
There is a small section in the code generated from Math.h.in that is
subject to clang formatting. A recent change reformatted that bit of
Math.h, so we need to update Math.h.in accordingly.
2019-04-23 13:28:35 -07:00
Robert Maynard
63c931e639 Correct location of ThrustPatches which clang formatter moved 2019-04-23 15:02:58 -04:00
Robert Maynard
bd544754a4 Merge topic 'no_odr_violation_on_cuda_tag'
ff687016e For VTK-m libs all includes of DeviceAdapterTagCuda happen from cuda files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1648
2019-04-23 14:40:38 -04:00
Robert Maynard
030b03e470 Remove unneeded diy build include directory
The diy build configured files are all located by the include
from the root vtkm include directory, so this include isn't needed
2019-04-22 15:00:30 -04:00
Robert Maynard
ff687016ee For VTK-m libs all includes of DeviceAdapterTagCuda happen from cuda files
It is very easy to cause ODR violations with DeviceAdapterTagCuda.
If you include that header from a C++ file and a CUDA file inside
the same program we an ODR violation. The reasons is that the C++
versions will say the tag is invalid, and the CUDA will say the
tag is valid.

The solution to this is that any compilation unit that includes
DeviceAdapterTagCuda from a version of VTK-m that has CUDA enabled
must be invoked by the cuda compiler.
2019-04-22 10:39:54 -04:00
Sujin Philip
13ef17eaa7 Remove thread_local from RuntimeDeviceNames
Older Mac compilers that are still supported by VTK don't support
`thread_local`.
2019-04-19 16:03:48 -04:00
Robert Maynard
ce3b42806b Merge topic 'remove_device_adapter_error'
d8cc067ca Remove DeviceAdapterError as it isn't needed any more.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1649
2019-04-19 08:09:30 -04:00
Steven Walton
249c6bfbb2 Maybe right? 2019-04-18 21:22:50 -07:00
Robert Maynard
d8cc067caa Remove DeviceAdapterError as it isn't needed any more.
Fixes #277

DeviceAdapterError existed to make sure that the default device adapter
template was being handled properly. Since the default device adapter doesn't
exist, and nothing is templated over it we can now remove DeviceAdapterError.
2019-04-18 15:09:57 -04:00
Robert Maynard
21c84798c7 FieldIn/Out/InOut documentation updated to fact they aren't templated
Fixes #366
2019-04-18 13:23:20 -04:00
Robert Maynard
2c026508b3 Merge topic 'correct_openmp_timeouts'
9c2920072 UnitTestBoundingIntervalHierarchy handles systems under load better
671c1df5c Timer logs the proper device name when called with an invalid device
d3d66a331 GameOfLife example always uses the proper device adapter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1645
2019-04-18 08:05:12 -04:00
Steven Walton
e61b91edb3 Moving to home 2019-04-17 20:13:36 -07:00
Robert Maynard
9c29200723 UnitTestBoundingIntervalHierarchy handles systems under load better
The UnitTestBoundingIntervalHierarchy has historically had problems
when the machine is already under-load when the algorithm is executed.
By limiting the number of openMP threads the test uses we can
reduce the amount of CPU time slicing that this test causes.
2019-04-17 16:16:08 -04:00
Robert Maynard
671c1df5c9 Timer logs the proper device name when called with an invalid device 2019-04-17 16:01:15 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
6c5c197a37 Merge topic 'support_cuda_scheduling_parameters_via_runtime'
047b64651 VTK-m now provides better scheduling parameters controls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1643
2019-04-17 10:04:19 -04:00
Robert Maynard
047b646517 VTK-m now provides better scheduling parameters controls
VTK-m now offers a more GPU aware set of defaults for kernel scheduling.
When VTK-m first launches a kernel we do system introspection and determine
what GPU's are on the machine and than match this information to a preset
table of values. The implementation is designed in a way that allows for
VTK-m to offer both specific presets for a given GPU ( V100 ) or for
an entire generation of cards ( Pascal ).

Currently VTK-m offers preset tables for the following GPU's:
- Tesla V100
- Tesla P100

If the hardware doesn't match a specific GPU card we than try to find the
nearest know hardware generation and use those defaults. Currently we offer
defaults for
- Older than Pascal Hardware
- Pascal Hardware
- Volta+ Hardware

Some users have workloads that don't align with the defaults provided by
VTK-m. When that is the cause, it is possible to override the defaults
by binding a custom function to `vtkm::cont::cuda::InitScheduleParameters`.
As shown below:

```cpp
  ScheduleParameters CustomScheduleValues(char const* name,
                                          int major,
                                          int minor,
                                          int multiProcessorCount,
                                          int maxThreadsPerMultiProcessor,
                                          int maxThreadsPerBlock)
  {

    ScheduleParameters params  {
        64 * multiProcessorCount,  //1d blocks
        64,                        //1d threads per block
        64 * multiProcessorCount,  //2d blocks
        { 8, 8, 1 },               //2d threads per block
        64 * multiProcessorCount,  //3d blocks
        { 4, 4, 4 } };             //3d threads per block
    return params;
  }
  vtkm::cont::cuda::InitScheduleParameters(&CustomScheduleValues);
```
2019-04-17 08:32:16 -04:00
Steven Walton
0bf10a0f7c Removed hanging comment and function that wasn't used where complained about whitespace 2019-04-16 17:25:41 -07:00
Steven Walton
6dbd9bb3f1 Adding global offsets 2019-04-16 17:18:24 -07:00
Robert Maynard
da1fb63258 Merge topic 'remove_default_device_macros'
ff30684c8 Removes the default device macros from VTK-m

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1641
2019-04-15 10:24:41 -04:00
Robert Maynard
ff30684c8e Removes the default device macros from VTK-m
Fixes #116
2019-04-15 08:15:36 -04:00
Robert Maynard
e54cbe85a8 contourtree_augmented doesn't call abort in VTK-m worklets 2019-04-12 13:26:30 -04:00
Robert Maynard
a5dbe1ece3 Merge topic 'bitfields'
661fb64de AtomicInterfaceControl functions are marked with VTKM_SUPPRESS_EXEC_WARNINGS
0c70f9b9a Add BitFieldIn/Out/InOut worklet signature tags.
a66510e81 Add ArrayHandleBitField, a boolean-valued AH backed by a BitField.
56cc5c3d3 Add support for BitFields.
d01b97382 Allow VTKM_SUPPRESS_EXEC_WARNINGS to be used inside macros.
2f2ca9370 Add bit operations FindFirstSetBit and CountSetBits to Math.h.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1629
2019-04-11 12:32:03 -04:00
Robert Maynard
0e847f2cb8 Merge topic 'remove_cellset_need_of_default_device'
46843ff4e CellSetExplicit has no dependency on default vtk-m device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1636
2019-04-11 10:40:10 -04:00
Robert Maynard
661fb64de8 AtomicInterfaceControl functions are marked with VTKM_SUPPRESS_EXEC_WARNINGS 2019-04-11 10:01:32 -04:00
Allison Vacanti
0c70f9b9ac Add BitFieldIn/Out/InOut worklet signature tags.
These provide an appropriate BitPortal for use in worklets.
2019-04-11 08:27:17 -04:00
Allison Vacanti
a66510e819 Add ArrayHandleBitField, a boolean-valued AH backed by a BitField. 2019-04-11 08:27:17 -04:00
Allison Vacanti
56cc5c3d3a Add support for BitFields.
BitFields are:
- Stored in memory using a contiguous buffer of bits.
- Accessible via portals, a la ArrayHandle.
- Portals operate on individual bits or words.
- Operations may be atomic for safe use from concurrent kernels.

The new BitFieldToUnorderedSet device algorithm produces an ArrayHandle
containing the indices of all set bits, in no particular order.

The new AtomicInterface classes provide an abstraction into bitwise
atomic operations across control and execution environments and are used
to implement the BitPortals.
2019-04-11 08:27:17 -04:00
Allison Vacanti
d01b973821 Allow VTKM_SUPPRESS_EXEC_WARNINGS to be used inside macros. 2019-04-11 08:27:17 -04:00
Allison Vacanti
2f2ca93709 Add bit operations FindFirstSetBit and CountSetBits to Math.h. 2019-04-11 08:27:17 -04:00
Robert Maynard
9cf1dc1883 Merge topic 'cuda_reduce_handle_pair_output'
89ec4aae2 Reduction on CUDA handles different input and output types better

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1638
2019-04-10 19:17:23 -04:00
Sujin Philip
4a20c8fabd Merge topic 'remove-SimplePolymorphicContainer'
b391acf4c Remove SimplePolymorphicContainer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1634
2019-04-10 16:18:47 -04:00
Robert Maynard
1d980ed147 Thrust Patches tried to apply CUDA 10.1 patches to CUDA 10.0 2019-04-10 14:46:56 -04:00
Robert Maynard
89ec4aae2f Reduction on CUDA handles different input and output types better
When reducing an input type that differs from the output type
you need to write a custom binary operator that also implements
how to do the unary transformation.
2019-04-10 14:44:44 -04:00
Robert Maynard
46843ff4ee CellSetExplicit has no dependency on default vtk-m device
The default vtk-m device is an outdated concept and this is the
first step of removing it from VTK-m.
2019-04-10 14:28:30 -04:00
Sujin Philip
b391acf4c0 Remove SimplePolymorphicContainer
The last place remaining where it is being used is DynamicCellSet, which can
instead use `vtkm::cont::CellSet` as it itself is polymorphic.
2019-04-10 14:00:39 -04:00
Robert Maynard
f05940aaca ThrustPatches now only patches fixes for relevant cuda versions
Rather than always patch Thrust functions, we now only patch
based on the Thrust version.
2019-04-10 11:18:42 -04:00
Robert Maynard
20d6201a98 Suppress thrust::mr::stateless_resource_allocator host/device warnings 2019-04-10 09:46:34 -04:00
Robert Maynard
ece078b82f Merge topic 'clang_warnings'
0130088b8 Suppress more self-assign-overloaded warnings found by clang
fa5455854 UnitTestArrayPortalValueReference doesn't warn when compiled with appleclang
5cc0d03f6 Merge branch 'upstream-diy' into clang_warnings
dbd3781d5 diy 2019-04-09 (f7a68da4)
5c2f2ebce suppress warnings found by Wself-assign-overloaded
77426f044 Correct casting long to long long warning from clang.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1635
2019-04-09 15:54:57 -04:00
Robert Maynard
0130088b86 Suppress more self-assign-overloaded warnings found by clang 2019-04-09 14:09:54 -04:00
Robert Maynard
fa54558542 UnitTestArrayPortalValueReference doesn't warn when compiled with appleclang 2019-04-09 12:26:22 -04:00
Diy Upstream
dbd3781d5c diy 2019-04-09 (f7a68da4)
Code extracted from:

    https://gitlab.kitware.com/third-party/diy2.git

at commit f7a68da4fbe93ae7a8699b66f125a98ace842998 (for/vtk-m).
2019-04-09 11:42:54 -04:00
Robert Maynard
5cc0d03f64 Merge branch 'upstream-diy' into clang_warnings
* upstream-diy:
  diy 2019-04-09 (f7a68da4)
2019-04-09 11:42:54 -04:00
Robert Maynard
5c2f2ebce9 suppress warnings found by Wself-assign-overloaded 2019-04-09 11:42:45 -04:00
Robert Maynard
77426f0447 Correct casting long to long long warning from clang. 2019-04-09 11:42:45 -04:00
Sujin Philip
e7b26f5c88 Merge topic 'bugfixes-ArrayHandleVirtual'
dae779b9f ArrayHandleVirtual bugfixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1632
2019-04-09 08:36:12 -04:00
Sujin Philip
2bbf501c53 Fix a bug in MakeTestDataset
In Make3DExplicitDataSetZoo, only 25 cells are added, but the variable `nCells`
is set to 27.
2019-04-08 16:41:56 -04:00
Sujin Philip
dae779b9f8 ArrayHandleVirtual bugfixes
After the change to `ArrayHandleVirtual` where it became a subclass of
`vtkm::cont::ArrayHandle`, a few extra changes are required.

1. Functions with `ArrayHandleVirtual` as parameters will not be callable
with the superclass `ArrayHandle`. This is fixed by changing the argument
types to the superclass.
2. Add Serialization classes specializations for the superclass, as "is-a"
relation is not considered for class template parameters.
2019-04-08 15:42:53 -04:00
Robert Maynard
364bdce530 Correctly override the proper PrepareForExecution method 2019-04-05 17:14:46 -04:00
Robert Maynard
68bf5b6153 Merge topic 'correct_clang_as_cuda_compiler_warnings'
58884a729 Fix warnings found when cuda is the cuda host compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1630
2019-04-05 16:02:28 -04:00
Robert Maynard
58884a7299 Fix warnings found when cuda is the cuda host compiler 2019-04-05 15:40:03 -04:00
Robert Maynard
107edaff75 Merge topic 'move_device_adapter_tag_to_vtkm_cont'
1d20ae4f7 Move DeviceAdapterTag to vtkm/cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1624
2019-04-05 08:03:53 -04:00
Robert Maynard
34dd533179 Merge topic 'refactor_celllocator_prepareforexec'
30aedf287 Refactor the design of CellLocator::PrepareForExecution

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1627
2019-04-05 08:03:32 -04:00
Kenneth Moreland
e43770a376 Update pyexpander input files to work with python 3
Python 3 does not use xrange anymore. Use the range function instead.
2019-04-04 11:20:56 -06:00
Robert Maynard
30aedf287f Refactor the design of CellLocator::PrepareForExecution
The try execute functor now doesn't need to be a member of the
class. This helps with the separation of concerns.
2019-04-04 13:17:49 -04:00
Robert Maynard
1d20ae4f7b Move DeviceAdapterTag to vtkm/cont 2019-04-04 11:58:51 -04:00
Robert Maynard
6306ca66ce Merge topic 'refactor_cast_and_call_location'
72cb6343b Move vtkm::cont::CastAndCall into a header in vtkm/cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1622
2019-04-04 10:05:22 -04:00
Robert Maynard
96cb87c50a Merge topic 'make_cellset_api_consistent'
18f3b0dcc Document all the free functions for VariantArrayHandle
5180d6a73 DynamicCellSet has the same free function support as VariantArrayHandle
8f545662d CellSet uses NewInstance to be consistent with the rest of VTK-m

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1620
2019-04-04 09:36:05 -04:00
Robert Maynard
7f612502ac Merge topic 'remove_unneeded_cont_exec_markup'
f1056affa Move select functions to host only to remove host/device suppressions
4f2156dfa Thrust detail::aligned_reinterpret_cast doesn't warn now
f4840618c Make sure ThrustPatches is included before thrust.
b2bbd66e6 Merge branch 'upstream-taotuple' into update_taoo
4ec6fc812 taotuple 2019-04-03 (8e70fa8a)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1607
2019-04-04 09:32:04 -04:00
Robert Maynard
18f3b0dccc Document all the free functions for VariantArrayHandle 2019-04-03 18:10:31 -04:00
Robert Maynard
5180d6a733 DynamicCellSet has the same free function support as VariantArrayHandle 2019-04-03 18:10:31 -04:00
Robert Maynard
8f545662d7 CellSet uses NewInstance to be consistent with the rest of VTK-m 2019-04-03 18:10:31 -04:00
Robert Maynard
813484d9b1 Merge topic 'remove_arrayhandlevirtual_cast_and_call'
3dd4d292f Remove unneeded code from ArrayHandleVirtual

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1623
2019-04-03 16:08:20 -04:00
Sujin Philip
e408537608 Merge topic 'update-CellLocatorTwoLevelUniformGrid'
566e220ea Suppress dashboard warnings
f20d7e788 Document the changes that are part of this MR.
f78e763be Add CellLocatorGeneral
c6bead838 Rename CellLocatorTwoLevelUniformGrid to CellLocatorUniformBins
ee838b829 Stylistic changes to CellLocators to match VTK-m

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1615
2019-04-03 15:56:27 -04:00
Robert Maynard
3dd4d292f5 Remove unneeded code from ArrayHandleVirtual
The CastAndCall for ArrayHandleVirtual was always a bad idea.
The ArrayHandleVirtual is not considered a dynamic type by the
dispatch engine so it would never have tried to use this specialization.
2019-04-03 14:50:04 -04:00
Robert Maynard
72cb6343b8 Move vtkm::cont::CastAndCall into a header in vtkm/cont
Since CastAndCall is meant to be a user callable function,
we should make sure it is part of the vtkm cont headers
2019-04-03 14:15:26 -04:00
Robert Maynard
f1056affa7 Move select functions to host only to remove host/device suppressions
We previously had to mark the make_FunctionInterface function as
host/device as it could be used in either place. The ramifications
of this is that each time we launched a worklet any input parameter
had to either suppress cuda exceptions, or had to rely on the
DispatcherBase to suppress the warnings.

By making make_FunctionInterface only host callable ( as it is ),
we can remove all of our unneccesary suppression logic and better
expose real issues with code that is marked host/device but can't
be due to calling things such as std::abort
2019-04-03 12:48:33 -04:00
Robert Maynard
4f2156dfaf Thrust detail::aligned_reinterpret_cast doesn't warn now
We specialize aligned_reinterpret_cast inside vtk-m to fix the
issues related to missing __host__ __device__ markups on the
function.
2019-04-03 12:48:33 -04:00
Sujin Philip
f78e763be4 Add CellLocatorGeneral
A general purpose `CellLocator` that should work with any type of dataset.
Internally, it tries to chose one of the existing cell locators that would be
optimal for the input data.

Also removes `CellLocatorHelper`.
2019-04-03 10:22:05 -04:00
Sujin Philip
c6bead8388 Rename CellLocatorTwoLevelUniformGrid to CellLocatorUniformBins
Also make it a concrete sub-class of vtkm::cont::CellLocator
Fixes issue #251
2019-04-03 10:21:56 -04:00
Robert Maynard
f4840618cf Make sure ThrustPatches is included before thrust. 2019-04-03 08:51:05 -04:00
Robert Maynard
b2bbd66e60 Merge branch 'upstream-taotuple' into update_taoo
* upstream-taotuple:
  taotuple 2019-04-03 (8e70fa8a)
2019-04-03 08:50:47 -04:00
Robert Maynard
aef087fc00 Merge topic 'remove_runtime_device_tracker_from_try_execute'
2d477fd53 Remove ability to pass a runtime device tracker to TryExecute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1616
2019-04-02 14:43:16 -04:00
Kenneth Moreland
04254dbd25 Merge topic 'specialize-worklet-for-device'
4e34feecb Add ability to specialize worklet for device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1608
2019-04-02 12:08:01 -04:00
Sujin Philip
ee838b8296 Stylistic changes to CellLocators to match VTK-m 2019-04-02 11:21:12 -04:00
Robert Maynard
2d477fd531 Remove ability to pass a runtime device tracker to TryExecute
Since runtime device trackers are single instance per thread
the ability to pass them around to other functions is unneeded.
2019-04-02 10:44:30 -04:00
Dave Pugmire
84b3b52355 Merge topic 'rectGridEval_precisionFix'
3bb79a2e4 Add use of 'this->' to adhere to VTK-m coding standards.
611b93e62 Use FloatDefault.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Abhishek Yenpure <abhishek@uoregon.edu>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1618
2019-04-02 10:11:11 -04:00
Robert Maynard
f350517de2 Merge topic 'less_vtkm_cont_files_bring_in_cuda_device'
18ff6681f Less vtkm_cont cxx files bring in the cuda device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1612
2019-04-01 12:02:55 -04:00
Kenneth Moreland
4e34feecb4 Add ability to specialize worklet for device
This adds an ExecutionSignature tag named Device that passes the
DeviceAdapterTag as an argument to the worklet's operator(). This allows
worklets to specialize their code based on the device.
2019-04-01 10:01:54 -06:00
Robert Maynard
e787d52afc Merge branch 'optionparser-to-third-party' into 'master'
Wrap third party optionparser.h in vtkm/cont/internal/OptionParser.h

See merge request vtk/vtk-m!1593
2019-04-01 10:56:01 -04:00
Dave Pugmire
3bb79a2e4f Add use of 'this->' to adhere to VTK-m coding standards. 2019-04-01 10:00:35 -04:00
Dave Pugmire
611b93e621 Use FloatDefault. 2019-04-01 09:31:17 -04:00
Robert Maynard
18ff6681fb Less vtkm_cont cxx files bring in the cuda device
When you have CUDA enabled we need to make sure that all worklet
launches come from a cuda file otherwise we will generate ODR
violations.
2019-04-01 08:21:07 -04:00
Robert Maynard
9c9c4d2ad9 remove unneeded includes in the vtkm/filter 2019-03-29 17:21:26 -04:00
Kenneth Moreland
9f55c5efcc Merge topic 'connected-components-field-name'
d25db19c8 Fix inconsistencies in connected components filters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !1613
2019-03-29 11:30:47 -04:00
Robert Maynard
de280d6a1c Merge topic 'fix_non_vtkm_style_includes'
b9e0e541b VTK-m once again uses consistent include style

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1611
2019-03-29 11:02:52 -04:00
Kenneth Moreland
d25db19c87 Fix inconsistencies in connected components filters
The connected components filters had some simple issues that were
inconsistent with the operation of other filters.

  * Set the output to the OutputFieldName defined in the filter rather
    than hardcoding it to "component". The default value is still
    "component", but now you can change it.
  * Make sure the output field association is correct. The field
    association for CellSetConnectivity is always cell and the field
    association for ImageConnectivity is always point.
  * Check that the field association for the input field of
    ImageConnectivity is point. The filter will fail if it is not.
  * Make both filters inherit from FilterCell instead of FilterField.
    The superclasses are similar but the latter allows the user to set the
    active cell set correctly.
  * Properly get the cell set specified by GetActiveCellSetIndex.
    Previously it was set to the active coordinates, which is wrong.
2019-03-28 18:35:46 -06:00
Robert Maynard
b9e0e541b8 VTK-m once again uses consistent include style 2019-03-28 14:12:08 -04:00
Allison Vacanti
319a85270e Merge topic 'fix_hostdevice_on_default'
2fa5b95e8 Fix warnings about __host__ / __device__ on defaulted methods.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1605
2019-03-28 13:34:13 -04:00
Allison Vacanti
2fa5b95e8d Fix warnings about __host__ / __device__ on defaulted methods.
CellInterpolationHelper.h(43): warning #2913-D: __device__ annotation is
ignored on a function("~CellInterpolationHelper") that is explicitly
defaulted on its first declaration.
2019-03-28 10:40:58 -04:00
Robert Maynard
bf2b3ab70d Filters properly use the active cell set not the first cell set. 2019-03-28 09:02:25 -04:00
Kenneth Moreland
7993c2b353 Merge topic 'parse-some-options-in-initialize'
31b30dbd9 Update arguments to benchmarks
b0303c96e Allow Initialize to parse only some arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1603
2019-03-27 12:43:58 -04:00
Allison Vacanti
68abfccd7e Merge topic 'cuda10.1'
0581b368f Fix issues with importing installed vtkm::cuda after refactor.
ed4374b05 diy 2019-03-13 (e8e68c7c)
b85dcf229 Add more vtkm_cont compilation units to device_sources.
9014de0eb Suppress new host/device warnings for cuda 10.1.
04a464cc4 Update cuda detection to create vtkm::cuda as an interface library.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1582
2019-03-27 12:12:02 -04:00
Sujin Philip
34a49234cb Merge topic 'fix-cellset-permutation'
048cbda5e Simplify CellSetPermutation PointToCell

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1599
2019-03-27 08:28:48 -04:00
Kenneth Moreland
7237c46898 Wrap third party optionparser.h in vtkm/cont/internal/OptionParser.h
Previously we just took the optionparser.h file and stuck it right in
our source code. That was problematic for a variety of reasons.

1. It incorrectly assigned our license to external code.
2. It made lots of unnecessary changes to the original source (like
reformatting).
3. It made it near impossible to track patches we make and updates to
the original software.

Instead, use the third-party system to track changes to optionparser.h
in a different repository and then pull that into ours.
2019-03-26 15:47:17 -06:00
Kenneth Moreland
184fe79298 Merge branch 'upstream-optionparser' into optionparser-to-third-party
* upstream-optionparser:
  optionparser 2018-05-07 (eaca634d)
2019-03-26 15:35:55 -06:00
Kenneth Moreland
2c10b57ced Add update script for optionparser third party library 2019-03-26 15:34:20 -06:00
Dave Pugmire
43edb07247 Merge topic 'temporal_particleadvection_filter'
c0b150a77 Merge branch 'temporal_particleadvection_filter' of gitlab.kitware.com:dpugmire/vtk-m into temporal_particleadvection_filter
b211bef81 Modify method names to clarify intent.
283ad7800 Cleanup.
04487965e Create a pathline filter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1602
2019-03-26 16:05:24 -04:00
Diy Upstream
ed4374b05d diy 2019-03-13 (e8e68c7c)
Code extracted from:

    https://gitlab.kitware.com/third-party/diy2.git

at commit e8e68c7cd2f362e706f11542a3408baa039de5e8 (for/vtk-m).
2019-03-26 14:53:42 -04:00
Allison Vacanti
b85dcf2294 Add more vtkm_cont compilation units to device_sources.
These depend on DeviceAdapterTagCuda::IsEnabled being correctly
set at compile time.
2019-03-26 14:53:42 -04:00
Allison Vacanti
9014de0ebf Suppress new host/device warnings for cuda 10.1. 2019-03-26 14:53:42 -04:00
Kenneth Moreland
b0303c96ed Allow Initialize to parse only some arguments
When a library requires reading some command line arguments through a
function like Initialize, it is typical that it will parse through
arguments it supports and then remove those arguments from argc and argv
so that the remaining arguments can be parsed by the calling program.
VTK-m's initialize did not do that, so add that functionality.
2019-03-26 12:04:18 -06:00
Sujin Philip
048cbda5e1 Simplify CellSetPermutation PointToCell
These changes are required to enable 'CellSetPermutaion' of custom cell-set
types like 'vtkmCellSetExplicit' and 'vtkmCellSetSingleType' in VTK.
2019-03-26 13:07:11 -04:00
Dave Pugmire
b211bef814 Modify method names to clarify intent. 2019-03-26 11:53:40 -04:00
Robert Maynard
d1a957bf5c Merge topic 'refactor_runtime_device_tracker'
838cb4337 Redesign RuntimeDeviceTracker and RuntimeDeviceInformation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1600
2019-03-26 10:08:31 -04:00
Dave Pugmire
283ad78007 Cleanup. 2019-03-26 09:48:17 -04:00
Robert Maynard
838cb43375 Redesign RuntimeDeviceTracker and RuntimeDeviceInformation
The RuntimeDeviceTracker had grown organically to handle multiple
different roles inside VTK-m. Now that we have device tags
that can be passed around at runtime, large portions of
the RuntimeDeviceTracker API aren't needed.

Additionally the RuntimeDeviceTracker had a dependency on knowing
the names of each device, and this wasn't possible
as that information was part of its self. Now we have moved that
information into RuntimeDeviceInformation and have broken
the recursion.
2019-03-26 08:36:18 -04:00
Allison Vacanti
ad15ae1553 Merge topic 'Variant_As'
e1f5c4dd9 Modify VariantAH::AsVirtual to cast to new ValueType if needed.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1585
2019-03-25 16:39:39 -04:00
Dave Pugmire
f96568103e Merge topic 'rename_ghost_zone_filters'
e968af9c8 zone --> cell
83e81c5e0 Rename ghost cell filters.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1601
2019-03-25 16:14:45 -04:00
Dave Pugmire
04487965e1 Create a pathline filter. 2019-03-25 16:10:58 -04:00
Abhishek Yenpure
02af238c69 Merge topic 'temporal_particle_advect'
525317249 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into temporal_particle_advect
2c1d3ee51 Updating example with new interfaces
cb8ea7dff Adding missing APIs
a7510a3c0 Fixing out of seq init warning
f3f2469b8 Adding direct constructor and vtkm::Lerp
2daf18956 Updating copyright for Unit Test
eca618e10 Fixing typos
be80dcc1a Adding changes for temporal advection, and adding test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dave Pugmire <dpugmire@gmail.com>
Merge-request: !1590
2019-03-25 13:47:36 -04:00
Allison Vacanti
e1f5c4dd9b Modify VariantAH::AsVirtual to cast to new ValueType if needed.
E.g:

```
    ArrayHandle<Float64> doubleArray;
    VariantArrayHandle varHandle{doubleArray};
    ArrayHandleVirtual<Float32> = varHandle.AsVirtual<Float32>();
```

If there is a loss in range and/or precision, a warning is logged. If
the ValueTypes are Vecs with mismatched widths, an ErrorBadType is thrown.
Internally, an ArrayHandleCast is used between the VariantArrayHandle's
stored array and the ArrayHandleVirtual.
2019-03-25 11:39:45 -04:00
Dave Pugmire
e968af9c82 zone --> cell 2019-03-25 09:11:02 -04:00
Dave Pugmire
83e81c5e0b Rename ghost cell filters. 2019-03-25 09:08:16 -04:00
Li-Ta Lo
84351eff6d Merge branch 'master' into connected_component 2019-03-24 10:13:32 -06:00
Robert Maynard
256e0c3c11 Merge topic 'rename_to_GetRuntimeDeviceTracker'
ae11e115a RuntimeDeviceTracker: Remove `Global` from names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1592
2019-03-24 08:17:02 -04:00
ayenpure
5253172492 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into temporal_particle_advect 2019-03-23 21:52:51 -07:00
Kenneth Moreland
b8d9040a39 Merge topic 'rename-ghost-cell-classification'
b81b2f817 Make CellClassification more clear

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dave Pugmire <dpugmire@gmail.com>
Merge-request: !1597
2019-03-23 12:39:06 -04:00
Sujin Philip
96f4a17e4f Merge topic 'improve-cellset-api'
a09bb9eca Add a new test for CellSet API
8868fb989 Improve CellSet API

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1589
2019-03-22 12:52:31 -04:00
Kenneth Moreland
b81b2f817f Make CellClassification more clear
Previously, the CellClassification enum was stored in a header file
named GhostCell.h, which made it hard to find and obscured its purpose.
Moved it to an appropriately named file. Also, renamed the DUPLICATE
field to GHOST to make its intention more clear.
2019-03-22 10:49:06 -06:00
Robert Maynard
ae11e115a0 RuntimeDeviceTracker: Remove Global from names 2019-03-22 08:53:26 -07:00
Sujin Philip
a09bb9eca3 Add a new test for CellSet API 2019-03-22 09:35:57 -04:00