Commit Graph

5731 Commits

Author SHA1 Message Date
Dave Pugmire
722d4262e1 extend stacksize 2019-03-13 08:17:54 -04:00
Dave Pugmire
fcb81f8c24 Merge branch 'gridEval' of https://gitlab.kitware.com/dpugmire/vtk-m into gridEval 2019-03-08 11:13:03 -05:00
Dave Pugmire
1d6cf30bbe Replace cleangrid with grid converter. 2019-03-08 11:08:30 -05:00
Dave Pugmire
25fee68e43 Fix src in cmake file error, and explicit ds creator func. 2019-03-07 14:48:26 -05:00
Robert Maynard
a6258b63cf Revert BoundingIntervalHierarchy.hxx back into existence. 2019-03-06 14:08:35 -05:00
Dave Pugmire
2eca1d7a1d Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into gridEval 2019-03-04 14:34:11 -05:00
Dave Pugmire
5dbb34efd3 Merge topic 'addUInt8'
3d18c2ec2 Add FilterTraits for supported types.
dc21e8670 backout UInt8 changes.
d9cc794c3 Can't throw an exception in CUDA.
8dbfcf374 ZFP doesn't support UInt8
e670b0910 fix type bug in zfp.
d974bcb5c fix for gcc4.8
53964157d Rollback the cast warning changes.
efbc8d68b Change compiler flags and undo conversions.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1565
2019-03-04 14:17:52 -05:00
Kenneth Moreland
0aa99df394 Merge topic 'array-virtual-not-special'
db0f5c31b Add a Transfer object for ArrayHandleVirtual
99cb10b9a Fix warnings about override keyword
0ff83e94b Properly handle conditions when VirtualStorage is null
0571c6335 Add missing allocation methods to ArrayHandleVirtual
68b2e5e65 Add move constructors to ArrayHandle subclasses
0b32831af Make ArrayHandleVirtual conform with other ArrayHandle structure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1557
2019-03-04 14:13:19 -05:00
Kenneth Moreland
c27f3d9c08 Merge topic 'timer-test-shorter-wait'
2d6a63948 Speed up the timer test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1567
2019-03-04 13:31:57 -05:00
Dave Pugmire
3d18c2ec20 Add FilterTraits for supported types. 2019-03-04 12:59:04 -05:00
Dave Pugmire
dc21e8670b backout UInt8 changes. 2019-03-04 12:37:00 -05:00
Dave Pugmire
d9cc794c38 Can't throw an exception in CUDA. 2019-03-04 12:35:36 -05:00
Dave Pugmire
8dbfcf3747 ZFP doesn't support UInt8 2019-03-04 10:46:39 -05:00
Kenneth Moreland
2d6a639485 Speed up the timer test
Previously, UnitTestTimer paused for 1 second each time it wanted to
test that the timer did (or didn't) record the time elapsing. This was
done 3 times per test and tested seperately on (currently) 5 devices.
The accumulated 15 seconds is not a whole lot, but it can add up when
coupled with the well over 300 other tests.

This change moves from the POSIX sleep function (which is limited to
increments of 1 second) to the updated C++ thread/chrono classes. The
amount of time to wait each time is now 0.25 seconds, which should speed
the test up by 4 times. The risk is that the shorter wait times can
throw off the results if the computer being run on is busy. If that is
the case, we can bump up the wait time (perhaps to 0.5 seconds).
2019-03-04 08:23:42 -07:00
Dave Pugmire
e670b0910d fix type bug in zfp. 2019-03-04 10:04:44 -05:00
Dave Pugmire
d974bcb5c3 fix for gcc4.8 2019-03-04 08:52:45 -05:00
Kenneth Moreland
db0f5c31b9 Add a Transfer object for ArrayHandleVirtual
Previously, ArrayHandleVirtual was using the default Transfer object.
This was problematic because it would copy/allocate things in the
execution environment independently from the array that it was wrapped
around. This caused several negative effects, particularly for CUDA
devices. First, if the data were already on the device (or the array is
implicit), a second copy of the data would be made. Second, the copy to
the device is likely less efficient. Third (and worst of all), the data
did not always get pulled back to the original array correctly.

This commit also contains instantiations of ArrayHandleVirtual and its
components for the most common types.
2019-03-01 15:50:16 -07:00
Kenneth Moreland
99cb10b9a9 Fix warnings about override keyword 2019-03-01 15:50:16 -07:00
Kenneth Moreland
0ff83e94bf Properly handle conditions when VirtualStorage is null
If an ArrayHandleVirtual is constructed without an underlying concrete
array handle, then the Storage<T, StorageTagVirtual> holds a
StorageVirtual pointer that is null. Generally, a null
ArrayHandleVirtual cannot do much, but its operations should still be
correct. There were a few places where the Storage would blindly try to
use its StorageVirtual pointer without checking it first. This adds some
conditions that should correct the behavior when StorageVirtual is null.
2019-03-01 15:50:16 -07:00
Kenneth Moreland
0571c6335d Add missing allocation methods to ArrayHandleVirtual 2019-03-01 15:50:16 -07:00
Kenneth Moreland
68b2e5e65c Add move constructors to ArrayHandle subclasses
There is a test to ensure that basic VTK-m classes have proper move
constructors that do not throw exceptions. Some of these are subclasses
of ArrayHandle. Add these move constructors to the
VTK_M_ARRAY_HANDLE_SUBCLASS macros so they get automatically added.
2019-03-01 15:50:16 -07:00
Kenneth Moreland
0b32831afd Make ArrayHandleVirtual conform with other ArrayHandle structure
Previously, ArrayHandleVirtual was defined as a specialization of
ArrayHandle with the virtual storage tag. This was because the storage
object was polymorphic and needed to be handled special. These changes
moved the existing storage definition to an internal class, and then
managed the pointer to that implementation class in a Storage object
that can be managed like any other storage object.

Also moved the implementation of StorageAny into the implementation of
the internal storage object.
2019-03-01 15:50:14 -07:00
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
Dave Pugmire
53964157d4 Rollback the cast warning changes. 2019-03-01 15:35:26 -05:00
Dave Pugmire
efbc8d68b4 Change compiler flags and undo conversions. 2019-03-01 15:25:48 -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
Dave Pugmire
d38849e293 Add vtkm::Uint8 to default type test. 2019-03-01 10:41:55 -05:00
Dave Pugmire
a3515f39df Add UInt8 as a default type. 2019-03-01 10:25:14 -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
Dave Pugmire
52f75d868c add back explicit tests 2019-02-28 08:59:37 -05: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
Dave Pugmire
11fcaab15a Remove cleangrid from tests. 2019-02-26 12:19:43 -05: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