Commit Graph

5723 Commits

Author SHA1 Message Date
Robert Maynard
46fed414e8 Remove unneeded text from the BenchmarkFilters output
This makes it easier to read as it has less horizontal text for
each line.
2019-03-14 16:30:39 -04:00
Robert Maynard
6b462cc99f Merge topic 'benchmark_filter_dont_time_dataset_destruction'
2321116e8 Filter Benchmarks don't time destruction of results

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1575
2019-03-14 13:33:38 -04:00
Robert Maynard
2321116e8e Filter Benchmarks don't time destruction of results
Previously we would also time the destruction of the results
of the filter
2019-03-13 15:29:33 -04:00
Robert Maynard
c0471ad090 Merge topic 'use_cxx_std_11_where_possible'
b9614bbc7 VTK-m always use cxx_std_<level> when requesting compiler level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1574
2019-03-13 08:10:35 -04:00
Robert Maynard
b9614bbc73 VTK-m always use cxx_std_<level> when requesting compiler level
The meta cxx_std_<level> flags are supported for compilers such
as IBM XL and PGI, where the granular flags such as cxx_auto_type
arent.
2019-03-12 16:13:43 -04:00
Robert Maynard
8dd6b1b2cb Merge topic 'update_constexpr_array_macros'
31cf7383c CUDA 10 allows us to use constexpr arrays!

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1573
2019-03-11 08:12:44 -04:00
Robert Maynard
40581993a5 Merge topic 'vtkm_cont_Initialize_use_emplace_back'
daee0f696 Initialize uses emplace_back when building unparsed args

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1571
2019-03-08 15:40:46 -05:00
Robert Maynard
151cf1f220 Merge topic 'benchmark_compare_updated'
2a697b526 benchCompare now handles the new Benchmark syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1572
2019-03-08 15:40:30 -05:00
Robert Maynard
31cf7383c3 CUDA 10 allows us to use constexpr arrays! 2019-03-08 13:58:55 -05:00
Robert Maynard
daee0f6967 Initialize uses emplace_back when building unparsed args 2019-03-08 13:48:48 -05:00
Robert Maynard
2a697b5263 benchCompare now handles the new Benchmark syntax 2019-03-08 13:46:54 -05:00
Kenneth Moreland
bfe06d6d18 Merge topic 'point-merge'
6aa99aec0 Add ability to remove degenerate cells in CleanGrid
5688375c9 Add point merge capabilities to CleanGrid filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Abhishek Yenpure <abhishek@uoregon.edu>
Merge-request: !1558
2019-03-07 20:33:36 -05:00
Robert Maynard
963ccf98b1 Merge topic 'update_cuda_to_not_pass_wconversion_to_gcc'
e5f1479e0 Wconversion won't be past to CUDA when it is using GCC.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1569
2019-03-05 17:26:30 -05:00
Robert Maynard
fcef40de1a Merge topic 'document_vtkm_filter'
508a704d6 Document vtkm_filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1568
2019-03-05 16:51:47 -05:00
Robert Maynard
e5f1479e0d Wconversion won't be past to CUDA when it is using GCC. 2019-03-05 16:21:15 -05:00
Robert Maynard
508a704d60 Document vtkm_filter 2019-03-05 15:52:14 -05:00
Robert Maynard
48dc6509f8 Merge topic 'remove_usage_of_reserved_names'
8114e9e62 VTK-m now doesn't use reserved C++ identifiers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1564
2019-03-04 15:25:25 -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
Robert Maynard
8114e9e627 VTK-m now doesn't use reserved C++ identifiers
Fixes #340
2019-02-28 15:08:08 -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
Kenneth Moreland
6aa99aec0f Add ability to remove degenerate cells in CleanGrid 2019-02-26 12:44:57 -07:00