Commit Graph

76 Commits

Author SHA1 Message Date
Matt Larsen
d9cfb8687f Merge topic 'scalar_renderer'
33a154337 add deprecation
a7363c283 alter interface of scalar renderer result
5fc77cb58 warnings and store depth separately
aa468f5c0 more warning fixes
0943784c2 fix warning
094758e55 make result public?
70584ac8f fix benchmarks
458be65e9 fix logic error
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1962
2020-03-21 10:28:12 -04:00
Kenneth Moreland
ec34cb56c4 Use new ways to get array portal in control environment
Also fix deadlocks that occur when portals are not destroyed
in time.
2020-02-26 13:10:46 -07:00
Kenneth Moreland
ad0a53af71 Convert execution preparation to use tokens
Marked the old versions of PrepareFor* that do not use tokens as
deprecated and moved all of the code to use the new versions that
require a token. This makes the scope of the execution object more
explicit so that it will be kept while in use and can potentially be
reclaimed afterward.
2020-02-25 09:39:19 -07:00
Matt Larsen
aa468f5c00 more warning fixes 2020-02-17 20:09:51 -08:00
Matt Larsen
70584ac8f6 fix benchmarks 2020-02-17 19:46:59 -08:00
Kenneth Moreland
7e49c11313 Mark the find_package(benchmark) with required
Add the REQUIRED flag to the find_package command to find the Google
benchmark package. Without that flag, the find_package command will
happily pass if the benchmarks are not found.

However, if benchmarks is not found, then the CMake configure will then
fail because the benchmark::benchmark library is not defined. That is a
confusing error to get. Since benchmark is not a typical thing installed
on a system, this can be problematic.
2020-01-09 12:28:48 -07:00
Allison Vacanti
539f6e5ad7 Port benchmarking framework to Google Benchmark. 2020-01-08 10:58:51 -05:00
Kenneth Moreland
d5fe4046c5 Remove instances of ListTag in favor of List 2019-12-06 21:32:36 -07:00
Kenneth Moreland
92db376236 Convert uses of ListTagBase to List 2019-12-06 15:37:46 -07:00
Kenneth Moreland
cd302effb3 Update lists in TypeListTag.h
A new header named TypeList.h and the type lists have been redefined in
this new file. All the types have been renamed from `TypeListTag*` to
`TypeList*`. TypeListTag.h has been gutted to provide deprecated
versions of the old type list names.

There were also some other type lists that were changed from using the
old `ListTagBase` to the new `List`.
2019-12-05 11:05:19 -07:00
Kenneth Moreland
6fc883213c Deprecate ListTag operations
The newer List operations should still work on the old ListTags, so make
those changes first to ensure that everything still works as expected if
given an old ListTag.

Next step is to deprecate ListTagBase itself and move all the lists to
the new types.
2019-12-05 11:27:31 -05:00
Allison Vacanti
3886b7dfb8 Refactor CellSetExplicit to remove NumIndices.
See #408 for details.
2019-09-30 12:27:13 -04:00
Robert Maynard
4faf1bf0b8 Merge topic 'build_filter_lib'
8520d70e0 Compile most frequently used VTK-m filters into a library
d1d61b9eb vtkm::filter::Filter passes filter policies by value
4ff021b08 Improve VTK-m compilation times by compiling more keys<T> types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1836
2019-09-18 15:01:39 -04:00
Robert Maynard
8520d70e0d Compile most frequently used VTK-m filters into a library
VTK-m now provides the following filters with the default policy
as part of the vtkm_filter library:
  - CellAverage
  - CleanGrid
  - ClipWithField
  - ClipWithImplicitFunction
  - Contour
  - ExternalFaces
  - ExtractStructured
  - PointAverage
  - Threshold
  - VectorMagnitude

By building these as a library we hope to provide faster compile
times for consumers of VTK-m when using common configurations.
2019-09-18 12:06:13 -04:00
Robert Maynard
63f2438098 Add vtkm::source::Wavelet as a new source
The Wavelet source creates a dataset similar to VTK's vtkRTAnalyticSource.
2019-09-13 16:11:14 -04:00
Robert Maynard
1bfcce19dd VTK-m builds with separate function sections to allow smaller binaries
Consumers of VTK-m when enabling of dropping of unused functions
will see VTK-m functions dropped. Previously this didn't happen
as VTK-m didn't build object files with the correct flags for this.

By allowing the linker to remove unused symbols we see a significant
saving the file size of VTK-m tests, examples, and benchmarks.
An OpenMP build of the tests and benchmarks goes from 168MB to
141MB which is roughly a 16% filesize reduction.

Initially I had presumed that these changes would increase link times.
But in measurements the total wall time for compilation of VTK-m has
stayed about the same ( seeing a decrease of 1.5% ). Presumably the
increased computation is offset by the reduction in file writing.
2019-09-11 13:34:25 -04:00
Allison Vacanti
884616788a Simplify and extend AtomicArray implementation.
- Use AtomicInterface to implement device-specific atomic operations.
- Remove DeviceAdapterAtomicArrayImplementations.
- Extend supported atomic types to include unsigned 32/64-bit ints.
- Add a static_assert to check that AtomicArray type is supported.
- Add documentation for AtomicArrayExecutionObject, including a CAS
  example.
- Add a `T Get(idx)` method to AtomicArrayExecutionObject that does
  an atomic load, and update existing CAS usage to use this instead
  of `Add(idx, 0)`.
2019-08-23 15:40:37 -04:00
Li-Ta Lo
c2e29f5c41 Merge branch 'master' into contour_hackathon 2019-08-18 14:49:08 -06:00
Li-Ta Lo
27a9962f38 rename MarchingCubes to Contour in benchmarks 2019-08-17 19:43:45 -06:00
Li-Ta Lo
d1fe1c3f38 rename MarchingCubes to Contour 2019-08-17 19:10:57 -06:00
Allison Vacanti
5db762ee71 Refactor topology mappings to clarify meaning.
The `From` and `To` nomenclature for topology mapping has been confusing for
both users and developers, especially at lower levels where the intention of
mapping attributes from one element to another is easily conflated with the
concept of mapping indices (which maps in the exact opposite direction).

These identifiers have been renamed to `VisitTopology` and `IncidentTopology`
to clarify the direction of the mapping. The order in which these template
parameters are specified for `WorkletMapTopology` have also been reversed,
since eventually there may be more than one `IncidentTopology`, and having
`IncidentTopology` at the end will allow us to replace it with a variadic
template parameter pack in the future.

Other implementation details supporting these worklets, include `Fetch` tags,
`Connectivity` classes, and methods on the various `CellSet` classes (such as
`PrepareForInput` have also reversed their template arguments. These will need
to be cautiously updated.

The convenience implementations of `WorkletMapTopology` have been renamed for
clarity as follows:

```
WorkletMapPointToCell --> WorkletVisitCellsWithPoints
WorkletMapCellToPoint --> WorkletVisitPointsWithCells
```

The `ControlSignature` tags have been renamed as follows:

```
FieldInTo --> FieldInVisit
FieldInFrom --> FieldInMap
FromCount --> IncidentElementCount
FromIndices --> IncidentElementIndices
```
2019-08-06 11:27:26 -04:00
Robert Maynard
2eeeafc1f5 Merge topic 'move_invoker_to_cont'
7e04b0511 Move Invoker into vtkm/cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1745
2019-08-01 12:36:00 -04:00
Robert Maynard
7e04b0511f Move Invoker into vtkm/cont
The Invoker is a control side object that handles the construction
of the relevant worklet dispatcher. Moving it to control makes it
obvious that it isn't an algorithm itself but a way to launch
worklets.
2019-08-01 12:34:27 -04:00
Kenneth Moreland
0be50c119d Update VTK-m code to use new Vec aliases
Should make the code easier to read.
2019-07-31 12:55:40 -06:00
Kenneth Moreland
eaf87e4519 Remove special ArrayHandleMultiplexer template case
There was a special case for ArrayHandleMultiplexer where if you gave it
just one type it would treat that as a value type rather than an array
to support and instead provide a default list of types. However, GCC 4.8
is having trouble compiling the code to create the default list, the
semantics are confusing, and the more I think about it the less likely I
think we will need this functionality. So, just getting rid of that.
2019-07-30 14:48:35 -06:00
Kenneth Moreland
866e1d7d5b Update comparison for virtual and multiplexer arrays
Previously the "dynamic" array was taken from a VariantArrayHandle.
However, the VariantArrayHandle will actually cast to a basic array, so
the comparison is not particularly fair. Change that to an
ArrayHandleVirtual so that it is actually calling through a virtual
method.

Also make 2 versions of the multiplexer test. The first version has an
array that is at the 1st index and the second is at the last index. This
tests whether the compiled code has to do lots of actual comparisons to
get to the last index.
2019-07-22 08:36:28 -06:00
Kenneth Moreland
5416cbeb7e Add ArrayHandleMultiplexer testing to BenchmarkFieldAlgorithms 2019-07-22 08:36:28 -06:00
Robert Maynard
28484fc6aa Update examples and benchmarks to use new VTK-m CMake helper function 2019-07-09 13:32:23 -04:00
Allison Vacanti
920ef9b3b9 Merge topic 'bit_algorithms'
f370857c1 Add CountSetBits and Fill device algorithms.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1696
2019-06-25 15:42:16 -04:00
Allison Vacanti
f370857c15 Add CountSetBits and Fill device algorithms. 2019-06-25 11:30:39 -04:00
Robert Maynard
feb66f9703 Make VTK-m use consistent symbol visibility for benchmarks 2019-06-18 13:53:32 -04:00
Robert Maynard
99865f47d1 Update Wavelet worklet to support a runtime device adapter id 2019-06-12 09:22:24 -04:00
Robert Maynard
b80a3789f0 Remove unneeded methods from warpscalar and warpvector filters 2019-06-03 13:53:31 -04:00
Robert Maynard
5a26051fc8 benchmarking cmake code simplified 2019-04-18 10:29:24 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Allison Vacanti
56cc5c3d3a Add support for BitFields.
BitFields are:
- Stored in memory using a contiguous buffer of bits.
- Accessible via portals, a la ArrayHandle.
- Portals operate on individual bits or words.
- Operations may be atomic for safe use from concurrent kernels.

The new BitFieldToUnorderedSet device algorithm produces an ArrayHandle
containing the indices of all set bits, in no particular order.

The new AtomicInterface classes provide an abstraction into bitwise
atomic operations across control and execution environments and are used
to implement the BitPortals.
2019-04-11 08:27:17 -04:00
Robert Maynard
1d20ae4f7b Move DeviceAdapterTag to vtkm/cont 2019-04-04 11:58:51 -04:00
Kenneth Moreland
31b30dbd9d Update arguments to benchmarks
With the functionality of vtkm::cont::Initialize's argument handling
improved, parse the arguments of benchmarks better.
2019-03-26 12:04:31 -06:00
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
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
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
mclarsen
4cd4637c18 ray tracing now using shared pointers for intersectors 2019-02-22 08:06:04 -08:00
mclarsen
53a8fa7259 rebuilding everything each time for ray benchmark 2019-02-21 15:58:53 -08: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
Kenneth Moreland
887f79c6f4 Make a vtkm_worklet library
This is a library that contains parts of worklets that can be
precompiled into a library.

Currently, this library contains the implementation of ScatterCounting.
2019-01-23 17:09:15 -07:00
Kenneth Moreland
a52211e565 Fix conversion errors in benchmarking code
The recent removal of type selectors in ControlSignature field tags
means that the BenchmarkFieldAlgorithms code was creating code paths
that were never followed and lead to impossible type conversions (e.g.
Vec to float). Fixed the problem by specifing the types for the
VariantArrayHandles better.
2019-01-11 12:23:19 -07:00
Kenneth Moreland
2e426ad547 Run the update-control-signature-tags.sh script 2019-01-11 12:23:10 -07:00
Robert Maynard
543255c374 Move the HumanSize function to Logging.cxx as it is only used by the logger 2019-01-07 16:24:49 -05:00
Robert Maynard
0a40c620ac Rename ArrayHandleVariant to VariantArrayHandle. 2018-12-27 14:35:56 -05:00
Robert Maynard
9ca4d36e28 Update benchmarking to work with ArrayHandleVariant 2018-12-27 14:35:56 -05:00