Commit Graph

5311 Commits

Author SHA1 Message Date
Robert Maynard
084b4d760e Document some of the VTK-m coding style such as single line loops
The auto code formatting doesn't capture the entire VTK-m style
and developers should know the style before they open a merge request
and get a billion warnings.
2018-08-15 13:39:47 -04:00
Haocheng LIU
f9f0119447 Update vec-initializer-lists changelog to cover constexpr change
The changelog is updated to replace initializer list changes with
variadic constructors and constexpr changes.

On OSX and Linux:
| Type |Constructed with| Compile time  | Run Time
|-----|---|---|---|
|scalar(1~4)    | ()  | Yes  |   |
|scalar(1~4)    | {}  | Yes  |   |
|scalar(>4)    | () | Yes |  |
|scalar(>4)    |  {} |  |  Yes |
|nested type(1~4)     |  () |  Yes |   |
|nested type(1~4)     |  {} |  Yes |   |
|nested type(>4)     | ()  | ERROR  |  ERROR|
|nested type(>4)     |  {} |   | Yes |
Only on windows with a compiler older than Visual Studio 2017
version 15.0 is vec with size>4 constructed at compile time.
2018-08-15 09:30:35 -04:00
Kenneth Moreland
6de7bdacaf Merge topic 'lagrangian_filter'
52549c85d Warning fixes to UnitTestLagrangianFilter.cxx
a99da2dff Added a Unit test for Lagrangian filter
3364d1c4e Lagrangian filter, example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1351
2018-08-14 17:49:45 -04:00
Robert Maynard
34966212c7 Merge topic 'make_brigand_cuda_future_capable'
e3ef8ed52 Make BRIGAND_COMP_CUDA_9PLUS capture all future versions of cuda

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1364
2018-08-14 15:34:09 -04:00
Robert Maynard
20a62ae560 Merge topic 'use_better_runtime_device_representation'
28e0eb9da Replace FindDeviceAdapterTagAndCall with TryExecuteOnDevice

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1356
2018-08-14 14:59:36 -04:00
Haocheng LIU
38c7e9fd7e Merge topic 'disable-UnitTestBoundingIntervalHierarchy-test'
39f791e6e Disable the UnitTestBoundingIntervalHierarchy test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1362
2018-08-14 10:03:18 -04:00
Sudhanshu Sane
52549c85d0 Warning fixes to UnitTestLagrangianFilter.cxx 2018-08-13 23:05:24 -07:00
Sudhanshu Sane
a99da2dff0 Added a Unit test for Lagrangian filter 2018-08-13 14:53:41 -07:00
Sudhanshu Sane
3364d1c4e0 Lagrangian filter, example
The added files provide support for Lagrangian analysis of velocity fields of time-varying data. Examples show how to use the filter to generate data and a second example demonstrates consuming generated information to calculate new particle trajectories.
2018-08-13 14:53:41 -07:00
Haocheng LIU
39f791e6ee Disable the UnitTestBoundingIntervalHierarchy test 2018-08-10 14:19:06 -04:00
Robert Maynard
e3ef8ed52c Make BRIGAND_COMP_CUDA_9PLUS capture all future versions of cuda 2018-08-09 15:12:24 -04:00
Allison Vacanti
a891e6d90a Merge topic 'cuda_array_handles_on_cuda8_reprise'
f6da09214 Use CUDA_ARCH instead of CUDACC to guard device-only code.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1361
2018-08-09 12:48:19 -04:00
Allison Vacanti
f6da092146 Use CUDA_ARCH instead of CUDACC to guard device-only code.
CUDACC is defined when compiling host code under nvcc, while
CUDA_ARCH is only defined for host code.
2018-08-09 11:57:05 -04:00
Allison Vacanti
727ebee197 Merge topic 'cuda_array_handles_on_cuda8'
2c079b96d Make AtomicArrays work on CUDA 8.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1357
2018-08-09 10:34:10 -04:00
Robert Maynard
91e3764cde Merge topic 'openmp_test_logic_works_when_tests_disabled'
c332dbd0a Only add the rules to run openmp tests serially when testing is enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !1358
2018-08-08 15:54:05 -04:00
Robert Maynard
c332dbd0a1 Only add the rules to run openmp tests serially when testing is enabled 2018-08-08 15:46:32 -04:00
Allison Vacanti
2c079b96dd Make AtomicArrays work on CUDA 8.
CUDA 8.0 is erroring out in the cuda AtomicArray implementation:

https://open.cdash.org/viewBuildError.php?buildid=5489156

This patch fixes the error. See comments in source for more info.
2018-08-08 15:26:32 -04:00
Robert Maynard
28e0eb9da6 Replace FindDeviceAdapterTagAndCall with TryExecuteOnDevice
Also add a throwFailedRuntimeDeviceTransfer that throws a nicely
detailed message on why a something couldn't be transfered to
the requested device adapter.
2018-08-08 14:53:28 -04:00
Robert Maynard
a3fe97709c Merge topic 'openmp_tests_run_serial'
48cc2f661 Make sure VTK-m runs all OpenMP tests serially.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1354
2018-08-08 13:10:15 -04:00
Robert Maynard
c4fa66aff4 Merge topic 'better_runtime_device_representation'
554bc3d36 At runtime TryExecute supports a specific deviceId to execute on.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1334
2018-08-08 12:41:32 -04:00
Robert Maynard
48cc2f661a Make sure VTK-m runs all OpenMP tests serially.
Fixes issue #276.
OpenMP tests when run in parallel exhibit negative scaling as we
have N openMP processes each spawning N threads. We speculate that
this causes excessive context switching and swapping and reduces
performance.
2018-08-08 10:01:18 -04:00
Robert Maynard
89b6eb45d3 Merge topic 'misc-typos'
7f9b54a31 Misc. typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1353
2018-08-08 08:27:27 -04:00
luz.paz
7f9b54a31a Misc. typos
Found via `codespell -q 3`
2018-08-07 17:50:41 -04:00
Robert Maynard
554bc3d369 At runtime TryExecute supports a specific deviceId to execute on.
Instead of always using the first enabled device, now TryExecute
can be told which device at runtime to use.
2018-08-07 17:22:18 -04:00
Haocheng LIU
c1e462f61d Merge topic 'Add-more-unittests-openmp'
282a2bf8f Add more unit tests for OpenMP DeviceAdapter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1352
2018-08-07 12:19:45 -04:00
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
6990b605b0 The multi backend example now doesn't share data between blocks
This should allow for multiple different devices.
2018-07-31 15:02:41 -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