Commit Graph

5085 Commits

Author SHA1 Message Date
Haocheng LIU
282a2bf8f3 Add more unit tests for OpenMP DeviceAdapter 2018-08-07 11:32:21 -04:00
Haocheng LIU
ccc985748d Merge topic 'use-std-call_once-to-construct-singletons'
ce9cd8072 Use std::call_once to construct singeltons

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1350
2018-08-06 17:11:19 -04:00
Haocheng LIU
ce9cd8072a Use std::call_once to construct singeltons
By using `call_once` from C++11, we can simplify the logic in code
where we are querying same value variables from multiple threads.
2018-08-06 16:36:03 -04:00
Robert Maynard
b9082cd803 Merge topic 'bool_reduction'
353397569 Remove usages of std::vector from OpenMP reduction algorithm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1347
2018-08-06 14:50:34 -04:00
Robert Maynard
448245bf44 Merge topic 'bool_vectraits'
f5d23396b Add bool to supported types for VecTraits

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1349
2018-08-06 13:27:56 -04:00
Robert Maynard
f5d23396b6 Add bool to supported types for VecTraits 2018-08-06 13:10:05 -04:00
Robert Maynard
3533975694 Remove usages of std::vector from OpenMP reduction algorithm
The OpenMP Device Reduction algorithm previously used a std::vector<T>
to store the reduction results of each thread. This caused problems
when T=bool as the types became a proxy type which isn't usable
with vtkm BinaryOperators.

Additionally by fixing this issue in the FunctorsOpenMP we
can remove a workaround in FunctorsGeneral that caused
compile failures when using complex BinaryOperators
such as MinAndMax.
2018-08-06 13:08:33 -04:00
Haocheng LIU
c00bf941a5 Merge topic 'replace-random_shuffle-shuffle'
1fcbca3ee Replace std::random_shuffle with std::shuffle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1346
2018-08-03 08:45:07 -04:00
Haocheng LIU
1fcbca3eed Replace std::random_shuffle with std::shuffle
std::random_shuffle is deprecated in C++14 because it's using std::rand
which uses a non uniform distribution and the underlying algorithm is
unspecified. Using std::shuffle can provide a reliable result in a 64
bit version.
2018-08-02 12:15:58 -04:00
Haocheng LIU
0a3e53716a Merge topic 'Use-thread_local-in-GetGlobalRuntimeDeviceTracker'
c95db1fc7 Use thread_local in GetGlobalRuntimeDeviceTracker if possible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1345
2018-08-02 09:09:17 -04:00
Haocheng LIU
c95db1fc78 Use thread_local in GetGlobalRuntimeDeviceTracker if possible
It will reduce the cost of getting the thread runtime device tracker,
and will have a better runtime overhead if user constructs a lot of
short lived threads that use VTK-m.
2018-08-01 15:51:24 -04:00
Robert Maynard
53d50015f3 Merge topic 'unitialized_warnings'
40b71f69e Fix nvcc warnings on using __device__ on defaulted constructors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1343
2018-07-31 13:48:12 -04:00
Robert Maynard
40b71f69e9 Fix nvcc warnings on using __device__ on defaulted constructors 2018-07-31 11:15:43 -04:00
Matt Larsen
60f727b467 Merge topic 'fix/bvh_warning'
e42ea9e83 fixing bvh warning with gcc8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1341
2018-07-30 19:13:22 -04:00
mclarsen
e42ea9e830 fixing bvh warning with gcc8 2018-07-30 12:56:12 -07:00
Robert Maynard
d29b3e3870 Merge topic 'unitialized_warnings'
a5bcba2b4 Fix GCC 7 uninitialized warnings in ArrayPortalUniformPointCoordinates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1340
2018-07-30 14:47:39 -04:00
Robert Maynard
a5bcba2b4e Fix GCC 7 uninitialized warnings in ArrayPortalUniformPointCoordinates 2018-07-30 11:59:13 -04:00
Kenneth Moreland
38725d2d79 Merge topic 'update-revision-instructions'
37bf9fadd Add some instructions for fixing common git problems

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1338
2018-07-30 11:17:16 -04:00
Kenneth Moreland
37bf9fadd7 Add some instructions for fixing common git problems
This includes updated to the latest master. To help with that,
I added an alias to SetupForDevelopment.sh to update the
master branch regardless of what branch you are on.
2018-07-27 11:23:00 -06:00
Kenneth Moreland
00478e3b13 Merge topic 'windows-example-error'
49ae7d5e7 Add header file for std::isstype

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Sebastien Jourdain <sebastien.jourdain@kitware.com>
Merge-request: !1337
2018-07-27 10:47:07 -04:00
Kenneth Moreland
49ae7d5e7d Add header file for std::isstype
This function might get defined through other headers, but it was not
being defined with visual studio.
2018-07-26 16:33:16 -06:00
Haocheng LIU
060b4f469c Merge topic 'fix-a-typo-WarpScalar'
21a1da570 Fix a typo in WarpScalar filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1336
2018-07-26 17:06:10 -04:00
Haocheng LIU
21a1da570f Fix a typo in WarpScalar filter 2018-07-26 13:53:44 -04:00
Sujin Philip
259d670ab5 Merge topic 'cuda-per-thread-streams-2'
06dee259f Minimize cuda synchronizations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1288
2018-07-25 15:07:39 -04:00
Robert Maynard
92e2063d66 Merge topic 'arrayhandle_basic_support_more_devices'
4ca4c1741 DeviceAdapterTagTestAlgorithmGeneral Id is positive value.
b51c77376 Allow ArrayHandleBasicImpl to work when we add new devices

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1333
2018-07-25 14:29:23 -04:00
Robert Maynard
4ca4c17415 DeviceAdapterTagTestAlgorithmGeneral Id is positive value.
All valid devices must use a positive integer value as the
RuntimeTracker and VirtualObject consider all negative values
to be errors.
2018-07-25 14:09:00 -04:00
Robert Maynard
b51c773766 Allow ArrayHandleBasicImpl to work when we add new devices
Previously ArrayHandleBasicImpl had no support for OpenMP since
we forgot to update the implementation. This version will
work when adding new devices without any changes.
2018-07-25 12:57:27 -04:00
Robert Maynard
42af1d09c2 Merge topic 'ExecutionArrayInterfaceBasic_explicitly_constructs_DeviceAdapterIds'
e031e6496 ExecutionArrayInterfaceBasic<T> explicitly construct DeviceAdapterId objects
86b9ab996 Refactor ExecutionArrayInterfaceBasic to use inheriting constructors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1330
2018-07-25 12:53:59 -04:00
Robert Maynard
24d3aa0428 Merge topic 'everyone_treat_deviceAdapterId_as_real_type'
14824bd42 Make sure people always treat DeviceAdapterId as a proper type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1332
2018-07-25 12:05:05 -04:00
Robert Maynard
e031e64967 ExecutionArrayInterfaceBasic<T> explicitly construct DeviceAdapterId objects
Rather than implicitly presume the `VTKM_DEVICE_ADAPTER_` macros can
convert to DeviceAdapterId.
2018-07-25 12:04:30 -04:00
Robert Maynard
86b9ab9969 Refactor ExecutionArrayInterfaceBasic to use inheriting constructors 2018-07-25 12:03:48 -04:00
Robert Maynard
14824bd42e Make sure people always treat DeviceAdapterId as a proper type 2018-07-25 11:00:06 -04:00
Robert Maynard
75b49b54f2 Merge topic 'remove_openmp_device_dependency_on_serial_device'
36be8f97a DeviceAdapterAlgorithmOpenMP doesn't depend on the serial device.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1331
2018-07-25 10:59:07 -04:00
Robert Maynard
36be8f97a1 DeviceAdapterAlgorithmOpenMP doesn't depend on the serial device.
It should be possible to build VTK-m without the serial device
adapter enabled, and therefore the OpenMP device shouldn't
rely on it.
2018-07-25 10:37:04 -04:00
Matthew Letter
51e6f07550 Merge topic 'patch-1'
79b28ead4 Update change-execution-object-creation.md
51cd5da84 Update change-execution-object-creation.md
47f317943 Add new file change-execution-object-creation.md

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1325
2018-07-24 14:21:45 -04:00
Matthew Letter
79b28ead47 Update change-execution-object-creation.md 2018-07-24 13:58:00 -04:00
Robert Maynard
f6b0c6a7a6 Merge topic 'remove_DeviceAdapterTagCheck'
f6789d9cf Remove DeviceAdapterTagCheck with DeviceAdapterTraits

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1329
2018-07-24 11:12:09 -04:00
Robert Maynard
f6789d9cfd Remove DeviceAdapterTagCheck with DeviceAdapterTraits
The DeviceAdapterTraits already contains if the device adapter is
valid, and therefore DeviceAdapterTagCheck is redundant.
2018-07-24 08:16:48 -04:00
Robert Maynard
552eee9a23 Merge topic 'enable_openmp_worklet_tests'
2c6ca906f Enable building the worklets when OpenMP is enabled.
d595abf90 WrappedBinaryOperator now supports std::vector<bool>::reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1327
2018-07-24 08:08:07 -04:00
Matt Larsen
ca70ff0d9d Merge topic 'fix_triangulator_exe'
a07ca2efc add RunTriangulator to device sources so it can run with cuda

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1328
2018-07-24 00:25:05 -04:00
mclarsen
a07ca2efcc add RunTriangulator to device sources so it can run with cuda 2018-07-23 19:54:10 -07:00
Sujin Philip
3332fdb885 Merge topic 'update-findtbb'
8126699dc Update FindTBB.cmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1326
2018-07-23 16:25:39 -04:00
Robert Maynard
2c6ca906f1 Enable building the worklets when OpenMP is enabled. 2018-07-23 14:33:03 -04:00
Robert Maynard
d595abf907 WrappedBinaryOperator now supports std::vector<bool>::reference 2018-07-23 14:24:19 -04:00
Sujin Philip
8126699dc9 Update FindTBB.cmake
Add support for gcc4.7 version of the ibrary. Based on the changes from VTK's
FindTBB.cmake file.
2018-07-23 14:08:44 -04:00
Matthew Letter
51cd5da84b Update change-execution-object-creation.md 2018-07-19 16:28:13 -04:00
Matthew Letter
47f317943a Add new file change-execution-object-creation.md 2018-07-19 16:26:52 -04:00
Robert Maynard
8a44d0a5ae Merge topic 'vtkm_cont_less_device_sources'
d7660a556 vtkm_cont listed non-device sources as device-source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1324
2018-07-19 15:57:02 -04:00
Robert Maynard
4772317f07 Merge topic 'correct_reverse_connectivity_atomic_usage'
d3326a37a ReverseConnectivityBuilder now uses the new vtkm::cont::AtomicArray

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !1323
2018-07-19 15:55:56 -04:00
Robert Maynard
d3326a37a6 ReverseConnectivityBuilder now uses the new vtkm::cont::AtomicArray
Fixes Issue #270
2018-07-19 13:39:47 -04:00