Commit Graph

4272 Commits

Author SHA1 Message Date
Kenneth Moreland
e9591621b3 Find threads library in external build
In certain circumstances (currently, when logging is enabled), VTK-m
libraries depend on the threading library. However, when the VTK-m
package was included from an external project, it did not automatically
find the threads package. This change makes the Threads library loaded
when the VTK-m package is found.
2019-02-27 14:03:10 -07:00
Matt Larsen
5e2e0d9ff1 Merge topic 'bvh/remove_device_template'
b03fec9a3 bvh device adpater banishment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1559
2019-02-25 21:33:55 -05:00
mclarsen
b03fec9a31 bvh device adpater banishment 2019-02-25 15:27:42 -08:00
Kenneth Moreland
f010a6931f Merge topic 'mask-worklets'
191d6e558 Add Mask capabilities to worklets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1528
2019-02-25 18:23:59 -05:00
Haocheng LIU
634f523d92 Merge benchmark executables into a device dependent shared library
VTK-m has been updated to replace old per device benchmark executables with a device
dependent shared library so that it's able to accept a device adapter at runtime through
the "--device=" argument.
2019-02-25 12:26:47 -05:00
Kenneth Moreland
191d6e5580 Add Mask capabilities to worklets
Mask objects allow you to specify which output values should be
generated when a worklet is run. That is, the Mask allows you to skip
the invocation of a worklet for any number of outputs.
2019-02-25 08:58:39 -07:00
Kenneth Moreland
c27a33669b Merge topic 'portal-value-reference-operators'
af4aef991 Add missing %= operator to ArrayPortalValueReference
9e02cd33a Declare ArrayPortalValueReference::operator= as const
b141f7515 Add more operator= to ArrayPortalValueReference
c8db70ae8 Fix warning about automatic conversions loosing precision
ddc6c91e3 Fix error about constexpr not available on CUDA device
1ca55ac31 Add specialized operators for ArrayPortalValueReference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1542
2019-02-24 12:19:32 -05:00
Kenneth Moreland
af4aef9913 Add missing %= operator to ArrayPortalValueReference 2019-02-22 17:11:11 -07:00
mclarsen
8a38717c38 have make_shared call default constructor 2019-02-22 08:49:42 -08:00
mclarsen
3fae21fa7d no pointers 2019-02-22 08:22:29 -08:00
mclarsen
4cd4637c18 ray tracing now using shared pointers for intersectors 2019-02-22 08:06:04 -08:00
Kenneth Moreland
9e02cd33af Declare ArrayPortalValueReference::operator= as const
Declaring operator= as const seems a little weird because we are
changing the value. But remember that ArrayPortalReference is only a
reference class. The reference itself does not change, just the thing
that it is referencing. So declaring as const is correct and necessary
so that you can set the value of a reference returned from a function
(which is a right hand side value).
2019-02-21 08:39:21 -07:00
Kenneth Moreland
b141f75150 Add more operator= to ArrayPortalValueReference
Forward arguments to assignment operator in ArrayPoetalValueReference
better.
2019-02-20 13:33:55 -07:00
Kenneth Moreland
c8db70ae8c Fix warning about automatic conversions loosing precision 2019-02-20 13:33:55 -07:00
Kenneth Moreland
ddc6c91e37 Fix error about constexpr not available on CUDA device
For some reason, these changes caused one of the CUDA compilers to
create an error about a variable declared constexpr not being available
on the device. That sounds like a bug in nvcc as the constexpr should
just be evaluated rather than stored in some part of memory. At any
rate, changing the constexpr to a preprocessing macro solves the
problem.
2019-02-20 13:33:55 -07:00
Kenneth Moreland
1ca55ac319 Add specialized operators for ArrayPortalValueReference
The ArrayPortalValueReference is supposed to behave just like the value
it encapsulates and does so by automatically converting to the base type
when necessary. However, when it is possible to convert that to
something else, it is possible to get errors about ambiguous overloads.
To avoid these, add specialized versions of the operators to specify
which ones should be used.

Also consolidated the CUDA version of an ArrayPortalValueReference to the
standard one. The two implementations were equivalent and we would like
changes to apply to both.
2019-02-20 13:33:55 -07:00
mclarsen
bccb00df29 allow extract structured to output rectilinear coordinates 2019-02-19 08:11:09 -08:00
Ben Boeckel
e266dcb34f Merge branch 'upstream-taotuple' into fix-undef-errors
* upstream-taotuple:
  taotuple 2019-02-14 (b8ca98d2)
2019-02-14 16:29:33 -05:00
Ben Boeckel
5b71c34675 brigand: fix intel check
This matches the check that CMake uses to detect the Intel compiler. It
also avoids warnings with `-Wundef`.
2019-02-14 16:26:14 -05:00
Haocheng LIU
542bb36594 Merge branch 'upstream-loguru' into revert-loguru-strdup-fix
* upstream-loguru:
  loguru 2019-02-12 (6ab123ef)
2019-02-12 09:03:55 -05:00
Haocheng LIU
858c788244 Merge topic 'free-annotations-in-View'
d19524016 Refactor View class and fix its memory leak

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1546
2019-02-12 08:58:00 -05:00
Haocheng LIU
d195240165 Refactor View class and fix its memory leak 2019-02-11 16:32:27 -05:00
Haocheng LIU
e3e63ff605 Merge branch 'upstream-loguru' into fix-loguru-memory-leak
* upstream-loguru:
  loguru 2019-02-11 (2569911a)
2019-02-11 13:18:19 -05:00
Robert Maynard
4b0d56e7d0 Add Copyright to diy/serialization.h 2019-02-11 08:31:14 -05:00
Dave Pugmire
b59df302e5 Merge topic 'AddGhostZone2'
bebbd92e3 Filter for adding ghost zones.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1540
2019-02-09 16:27:16 -05:00
Robert Maynard
451bff6f14 vtkmdiy: Use the new mangled VTKM_DIY_ defines 2019-02-08 14:31:34 -05:00
Robert Maynard
7d307b96ce Merge branch 'upstream-diy' into diy_conditional_serialization
* upstream-diy:
  diy 2019-02-08 (72a201e1)
2019-02-08 14:25:51 -05:00
Robert Maynard
74acc2a7bb vtkmdiy: Support only including the serialization headers of diy 2019-02-08 11:40:59 -05:00
Dave Pugmire
bebbd92e32 Filter for adding ghost zones. 2019-02-07 15:26:20 -05:00
Haocheng LIU
6e6968d97f Fix diy include and Timer construction errors in examples 2019-02-06 15:28:09 -05:00
Robert Maynard
ad98d818ce VTK-m now doesn't clobber external DIY installations
Fixes #334
2019-02-05 13:05:14 -05:00
Haocheng LIU
0696ae135e Merge topic 'asynchronize-timer'
415252c66 Introduce asynchronous and device independent timer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Haocheng LIU <haocheng.liu@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1530
2019-02-05 12:02:59 -05:00
Haocheng LIU
415252c662 Introduce asynchronous and device independent timer
The timer class now is asynchronous and device independent. it's using an
similiar API as vtkOpenGLRenderTimer with Start(), Stop(), Reset(), Ready(),
and GetElapsedTime() function. For convenience and backward compability, Each
Start() function call will call Reset() internally and each GetElapsedTime()
function call will call Stop() function if it hasn't been called yet for keeping
backward compatibility purpose.

Bascially it can be used in two modes:

* Create a Timer without any device info. vtkm::cont::Timer time;

  * It would enable timers for all enabled devices on the machine. Users can get a
specific elapsed time by passing a device id into the GetElapsedtime function.
If no device is provided, it would pick the maximum of all timer results - the
logic behind this decision is that if cuda is disabled, openmp, serial and tbb
roughly give the same results; if cuda is enabled it's safe to return the
maximum elapsed time since users are more interested in the device execution
time rather than the kernal launch time. The Ready function can be handy here
to query the status of the timer.

* Create a Timer with a device id. vtkm::cont::Timer time((vtkm::cont::DeviceAdapterTagCuda()));

  * It works as the old timer that times for a specific device id.
2019-02-05 12:01:56 -05:00
Robert Maynard
d0a70946b8 Simplify the DeviceAdapterRuntimeDetectorCuda to not do a kernel launch.
The kernel launch component of the runtime device adapter is fairly
pointless. If the hardware supports CUDA we should expect that
VTK-m has the correct kernel versions.

Plus in the original version if the CUDA device was being used
and the kernel launch returns cudaErrorDevicesUnavailable it
was never possible to restore CUDA support. Now what happens
is that the runtime tracker is marked as failed, but the
calling code can always go back and trying the device again.
2019-02-04 13:27:20 -05:00
Haocheng LIU
6107f548b1 Link pthread when logging is enabled 2019-01-30 16:34:58 -05:00
Robert Maynard
bcb347bf97 Merge topic 'test_vtkm_install'
9580b1921 Introduces SourceInInstall which verifies that VTK-m install its headers
c501500e1 Install missing headers found by VTKmCheckSourceInInstall
baaa47af4 Reduce verbosity of VTKmCheckCopyright
545a2ce91 VTKmCheckSourceInBuild now shows all missing files in a directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !1532
2019-01-29 17:27:09 -05:00
Robert Maynard
c501500e1d Install missing headers found by VTKmCheckSourceInInstall 2019-01-29 14:46:27 -05:00
Kenneth Moreland
fb0ad1a13d Reduce the number of precompiled Keys instantiations
Previously, we precompiled just about any version of Keys that you could
be expected to use. This caused the time to compile Keys to be
unnecessarily long.

This reduces the compilation to types that are actually likely to be
used as keys. Also removed the less likely to be used build methods.
2019-01-28 15:44:37 -05:00
Kenneth Moreland
6ea55f838b Merge topic 'vtkm_worklet-library'
55570a16a Add most common implementations of Keys templates to library
887f79c6f Make a vtkm_worklet library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1520
2019-01-26 21:08:21 -05:00
mclarsen
7584593700 adding missing headers to the install 2019-01-26 08:32:05 -08:00
Robert Maynard
ce4076dd96 Merge topic 'faster_worklet_builds'
002bd3419 Improve the compile time of WorkletMap* unit tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1527
2019-01-25 10:19:24 -05:00
Robert Maynard
002bd34197 Improve the compile time of WorkletMap* unit tests
By restricting the possible variant types we can dramatically
improve compile time performance.
2019-01-25 08:23:02 -05:00
Kenneth Moreland
55570a16ad Add most common implementations of Keys templates to library
Also moved the Keys<>::SortType outside to KeysSortType. The problem
with having it inside the Keys class was that there was a different
object created for every instances of Keys.
2019-01-24 13:18:10 -07:00
Robert Maynard
5508d17c31 Merge topic 'correct_broken_install'
24e71d251 VTK-m yet again has properly installed headers.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1525
2019-01-24 14:59:41 -05:00
Robert Maynard
223a711f2b Merge topic 'ErrorBadType_IsDeviceIndependent'
80b7f8f18 ErrorBadType should be a device independent exception

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1524
2019-01-24 14:43:06 -05:00
Robert Maynard
24e71d251b VTK-m yet again has properly installed headers.
Fixes the install issues mentioned in #342
2019-01-24 14:26:40 -05:00
Allison Vacanti
4ddcfbc66d Merge topic 'openmp_task_namespace'
91a1c7e2d Fix typo in openmp and tbb task code.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1523
2019-01-24 13:19:33 -05:00
Robert Maynard
80b7f8f187 ErrorBadType should be a device independent exception 2019-01-24 13:01:03 -05:00
Allison Vacanti
91a1c7e2d0 Fix typo in openmp and tbb task code. 2019-01-24 12:02:13 -05:00
Allison Vacanti
03fc7b66d0 Add VTKM_CUDA_DEVICE_PASS preprocessing definition.
This is only set while compiling device code, and is useful
for code that needs different implementations on devices (e.g.
they call CUDA device intrinsics, etc).
2019-01-24 11:23:45 -05:00