Commit Graph

5683 Commits

Author SHA1 Message Date
Kenneth Moreland
03fc3d51ac Merge topic 'timer-init-runtime-device'
6797c6e33 Specify return type for GetTimerImpl
25f3432b1 Increase the conditions on which Timer is tested
4d9ce2488 Synchronize CUDA timer when stopping it
85265a9c8 Add const correctness to Timer
465508993 Allow resetting Timer with a new device
dd4a93952 Enable initializing Timer with a DeviceAdapterId

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Haocheng LIU <haocheng.liu@kitware.com>
Merge-request: !1562
2019-03-01 17:23:11 -05:00
Allison Vacanti
126aeabe76 Merge topic 'rename_type_functions'
d1db4ef8b Clarify intent of TypeString and TypeName functions.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1563
2019-03-01 16:05:18 -05:00
Allison Vacanti
d1db4ef8b3 Clarify intent of TypeString and TypeName functions.
TypeName is used for logging, and is now TypeToString.

TypeString is used for serialization, and is now SerializableTypeString.
2019-03-01 11:47:53 -05:00
Kenneth Moreland
6797c6e336 Specify return type for GetTimerImpl
The internal function GetTimerImpl has a rather complex expression for
its return type. Prevously this was derived using declspec, but one of
the versions of Visual Studio barfed on that for some reason. So now
declare the return type explicitly.
2019-02-28 15:36:55 -07:00
Kenneth Moreland
25f3432b1a Increase the conditions on which Timer is tested
UnitTestTimer was changed to be initialized across all possible devices
and getting times across all possible devices. Also test all possible
ways to set the device in the Timer.
2019-02-28 15:08:32 -07:00
Kenneth Moreland
4d9ce24888 Synchronize CUDA timer when stopping it
Previously, when Stop was called on a Cuda timer, it would record a stop
event but it would not synchronize it at that time. Instead, the
synchronize was only called when GetElapsedTime was called. The problem
is that the time of the event is only marked when synchronize is called.
Thus, if the event completed before GetElapsedTime was called, it would
record the time from when the event acutally happened to the time when
GetElapsedTime was called as part of the elapsed time, which is
incorrect.

Fix the problem by synchronizing when Stop is called. Although this
makes the Timer more invasive, generally using the Timer can cause
synchronization to happen. This behavior is consistent with the Timer
implementation for other devices.
2019-02-28 15:08:32 -07:00
Kenneth Moreland
85265a9c84 Add const correctness to Timer
It should be possible to query a vtkm::cont::Timer without modifying it.
As such, its query functions (such as Stopped and GetElapsedTime) should
be const.
2019-02-28 15:08:16 -07:00
Kenneth Moreland
4655089934 Allow resetting Timer with a new device
Previously, in order to specify a device with the timer, it had to be
specified in the timer's construction or had to be specified every time
GetElapsedTime was called. The first method was inconvienient in the
case where there are multiple code paths to define the device and the
latter method was inconvienient because you would have to pass around a
device id.

Both these techniques still exist, but we have also added a new form of
Reset that allows you to change the device the timer is used on.
2019-02-27 15:38:32 -07:00
Kenneth Moreland
dd4a939525 Enable initializing Timer with a DeviceAdapterId
Previously, a vtkm::cont::Timer had to be initialized with either no
device or with a device adapter tag. However, this precluded
initializing the timer with a DeviceAdapterId, which made it difficult
to create a timer at runtime. Instead, just accept a DeviceAdapterId
(which all device adapter tags inherit from) and do runtime checks.
2019-02-27 15:36:46 -07:00
Kenneth Moreland
702e22765f Merge topic 'threads-lib-in-external'
e9591621b Find threads library in external build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1561
2019-02-27 16:54:12 -05:00
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
9c7e8a026e Merge topic 'merge-benchmark-executables'
634f523d9 Merge benchmark executables into a device dependent shared library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1552
2019-02-25 15:35:36 -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
Matt Larsen
076a7311ca Merge topic 'rt_use_shared'
8a38717c3 have make_shared call default constructor
3fae21fa7 no pointers
4cd4637c1 ray tracing now using shared pointers for intersectors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1556
2019-02-23 10:39:59 -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
Matt Larsen
6b4a4267dc Merge topic 'fix/ray_bench'
53a8fa725 rebuilding everything each time for ray benchmark

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1554
2019-02-21 22:31:12 -05:00
mclarsen
53a8fa7259 rebuilding everything each time for ray benchmark 2019-02-21 15:58:53 -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
Matt Larsen
6851077ebb Merge topic 'fix/ExtractStructured'
bccb00df2 allow extract structured to output rectilinear coordinates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1553
2019-02-19 16:44:00 -05:00
mclarsen
bccb00df29 allow extract structured to output rectilinear coordinates 2019-02-19 08:11:09 -08:00
Ben Boeckel
e0c0e4b3da Merge topic 'fix-undef-errors'
e266dcb34 Merge branch 'upstream-taotuple' into fix-undef-errors
c2bd0a710 taotuple 2019-02-14 (b8ca98d2)
5b71c3467 brigand: fix intel check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1551
2019-02-14 16:35:58 -05: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
TaoCpp Tuple Upstream
c2bd0a710e taotuple 2019-02-14 (b8ca98d2)
Code extracted from:

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

at commit b8ca98d2d3c593a3ee6506a71629d3d92e89d327 (for/vtk-m).
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
bdcb76cadb Merge topic 'suppress-more-asan-warnings'
18ba2baf3 Suppress system lib memory leak warnings found by asan

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1550
2019-02-13 13:56:18 -05:00
Haocheng LIU
18ba2baf36 Suppress system lib memory leak warnings found by asan 2019-02-13 13:49:24 -05:00
Haocheng LIU
8699bb9d85 Merge topic 'suppress-loguru-memory-leak'
416586656 Suppress loguru memory leak

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1549
2019-02-12 11:24:33 -05:00
Haocheng LIU
4165866567 Suppress loguru memory leak
Due to a bug in pthread, loguru would leak 12 bytes memory from the main
thread when `loguru::init` is in use. Since GCC does not support
blacklist file, the suppression logic is added to
ctest_memcheck_supp_file file.

See details in loguru github issue #59.
2019-02-12 10:38:48 -05:00
Haocheng LIU
a2c03f2731 Merge topic 'revert-loguru-strdup-fix'
542bb3659 Merge branch 'upstream-loguru' into revert-loguru-strdup-fix
d39a72313 loguru 2019-02-12 (6ab123ef)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1548
2019-02-12 09:55:11 -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
Loguru Upstream
d39a72313c loguru 2019-02-12 (6ab123ef)
Code extracted from:

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

at commit 6ab123efcb343cd7f02793e9e4352651bacf8f5b (for/vtk-m).
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
7978f773d5 Merge topic 'fix-loguru-memory-leak'
e3e63ff60 Merge branch 'upstream-loguru' into fix-loguru-memory-leak
81b7d5be5 loguru 2019-02-11 (2569911a)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1547
2019-02-11 13:39:39 -05:00
Loguru Upstream
81b7d5be5c loguru 2019-02-11 (2569911a)
Code extracted from:

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

at commit 2569911a3b27d2da1ee04b80cb2e8c8581c4b9e3 (for/vtk-m).
2019-02-11 13:18:19 -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
5cb45cefa3 Merge topic 'suppress_osx_static_link_warnings'
1ca15bab7 Suppress OSX weak symbol linking warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1545
2019-02-11 10:23:05 -05:00
Robert Maynard
9c644cc9c7 Merge topic 'fix-copyright-check'
d3ab05a7b Fix copyright statement check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1543
2019-02-11 08:37:01 -05:00