Commit Graph

58 Commits

Author SHA1 Message Date
Kenneth Moreland
8ec6fc2562 Fix deprecation warning in example
One of the examples still had a deprecation warning from !3195.
2024-02-21 17:15:32 -05:00
Vicente Adolfo Bolea Sanchez
049d0cca8c cmake: namespace vtkm export targets 2022-12-09 18:46:56 -05:00
Kenneth Moreland
405643ddbb Rename NewFilter base classes to Filter
During the VTK-m 1.8 and 1.9 development, the filter infrastructure was
overhauled. Part of this created a completely new set of base classes. To
avoid confusion with the original filter base classes and ease transition,
the new filter base classes were named `NewFilter*`. Eventually after all
filters were transitioned, the old filter base classes were deprecated.

With the release of VTK-m 2.0, the old filter base classes are removed. The
"new" filter base classes are no longer new. Thus, they have been renamed
simply `Filter` (and `FilterField`).
2022-12-01 13:07:56 -07:00
Kenneth Moreland
3e1339f9a7 Remove deprecated features from VTK-m
With the major revision 2.0 of VTK-m, many items previously marked as
deprecated were removed. If updating to a new version of VTK-m, it is
recommended to first update to VTK-m 1.9, which will include the deprecated
features but provide warnings (with the right compiler) that will point to
the replacement code. Once the deprecations have been fixed, updating to
2.0 should be smoother.
2022-11-17 07:12:31 -06:00
Kenneth Moreland
de2f2b59ba Deprecate old filter base classes and supporting classes 2022-09-27 06:52:44 -06:00
Kenneth Moreland
f8f41e0ef5 Update use of field association enumerations
The enumerations in `vtkm::cont::Field::Association` were renamed in the
previous commit. The old names still exist, but are deprecated. Change
the rest of the code to use the new names.
2022-03-17 11:02:37 -06:00
Kenneth Moreland
0b84787f78 Deprecate DynamicCellSet and remove from code
The `DynamicCellSet` class is now marked as deprecated (as is the header
that contains it), and all non-deprecated code is moved to its
`UnknownCellSet` replacement.

Also added a deprecation warning for the VariantArrayHandle.h header
file and deleted a couple inappropriate uses of it.
2022-01-04 15:38:18 -07:00
Li-Ta Lo
2489da1259 restore comment, add needed #include 2020-07-21 18:21:44 -06:00
Li-Ta Lo
f333182476 Reverse Invoker, Dispatcher and Worklet dependency 2020-07-21 17:25:43 -06:00
Kenneth Moreland
3c4e8a2ea5 Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
Sujin Philip
c102ea556c Update cmake minimum required version to 3.12 2020-04-13 12:42:28 -05:00
Kenneth Moreland
92db376236 Convert uses of ListTagBase to List 2019-12-06 15:37:46 -07: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
Kenneth Moreland
5fa02057ae Rely less on overload resolution for ApplyPolicy
Previously, all the ApplyPolicy functions had the same name and used
template resolution to figure out which one to use. This was pretty
clear at first when there was just one for fields and one for cell sets.
But then it grew to several different types, particularly for fields. It
was hard to look at the code and figure out which form of ApplyPolicy
was being used, and compilers were starting to get confused.

Resolve the problem by giving all the methods unique names to make it
clear which one you expect to be called.
2019-09-09 16:08:11 -06:00
Robert Maynard
89fa2c0293 Remove multiple vtkm::cont::CellSet from vtkm::cont::DataSet
By removing the ability to have multiple CellSets in a DataSet
we can simplify the following things:

  - Cell Fields now don't require a CellSet name when being constructed
  - Filters don't need to manage what the active cellset is
2019-09-02 09:04:51 -04:00
Robert Maynard
267f963d32 Opt into all CMake 3.15 policies 2019-08-20 15:38:27 -04:00
Robert Maynard
cec717015a CreateResult is now part of vtkm::filter instead of being inside internals 2019-08-09 12:44:43 -04:00
Robert Maynard
3a7d3cb5ff VTK-m filters now launch all worklets via a vtkm::cont::Invoker
This has been done as to showcase the recommend best practices
for new VTK-m contributors.
2019-08-09 10:37:35 -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
Robert Maynard
28484fc6aa Update examples and benchmarks to use new VTK-m CMake helper function 2019-07-09 13:32:23 -04:00
Robert Maynard
2c026508b3 Merge topic 'correct_openmp_timeouts'
9c2920072 UnitTestBoundingIntervalHierarchy handles systems under load better
671c1df5c Timer logs the proper device name when called with an invalid device
d3d66a331 GameOfLife example always uses the proper device adapter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1645
2019-04-18 08:05:12 -04:00
Robert Maynard
d3d66a3312 GameOfLife example always uses the proper device adapter
Previously the example would only time using the serial device
adapter, which wouldn't work when the user explicitly specified
a device on the command line.
2019-04-17 14:58:32 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
ff30684c8e Removes the default device macros from VTK-m
Fixes #116
2019-04-15 08:15:36 -04:00
Robert Maynard
0ce7e82d43 VTK-m now enables all new CMake policies in 3.14
This means that we opt-in to policy changes introduced in 3.14
2019-03-26 11:50:06 -04:00
Sujin Philip
d4e1c18254 Update existing code to use the new functions 2019-03-15 13:28:55 -04:00
Haocheng LIU
6e6968d97f Fix diy include and Timer construction errors in examples 2019-02-06 15:28:09 -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
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
2e426ad547 Run the update-control-signature-tags.sh script 2019-01-11 12:23:10 -07:00
Robert Maynard
f1e1a524e9 Require CMake 3.8 to build VTK-m. 2019-01-09 16:01:22 -05:00
Robert Maynard
028e954b41 Game Of Life example now supports -d/--device command line argument 2018-12-27 11:55:26 -05:00
Robert Maynard
34165c8e75 Correct crashes in the GameOfLife example 2018-12-27 11:47:34 -05:00
Kenneth Moreland
01a9e85416 Change WorkletPointNeighborhood to specify neighborhood at runtime
Previously, WorkletPointNeighborhood had a template argument to select
the size of the neighborhood. This change removes that template
argument. Instead, the vtkm::exec::arg::BoundaryState methods now take
in a size parameter when determining when it overlaps the boundary.

If in the future we want to add the ability to select the neighborhood
size at compile-time (for performance reasons), I suggest adding this
template argument to the OnBoundary tag for ExecutionSignature.
2018-12-03 12:45:23 -07:00
Kenneth Moreland
bddad9b386 Remove TryExecute from filters
Now that the dispatcher does its own TryExecute, filters do not need to
do that. This change requires all worklets called by filters to be able
to execute without knowing the device a priori.
2018-10-16 15:59:53 -06:00
Kenneth Moreland
d879188de0 Make DispatcherBase invoke using a TryExecute
Rather than force all dispatchers to be templated on a device adapter,
instead use a TryExecute internally within the invoke to select a device
adapter.

Because this removes the need to declare a device when invoking a
worklet, this commit also removes the need to declare a device in
several other areas of the code.
2018-08-29 19:18:54 -07:00
Robert Maynard
9861cdecb1 Use CMake to automatically set policies to NEW.
CMake 3.12 introduces a ...<max> syntax in the version given to
cmake_minimum_required to automatically set policies to NEW up
to that version. Use it to avoid listing policies explicitly.
2018-06-19 16:12:48 -04:00
Allison Vacanti
93506d25e2 Change function signatures to use 'using' aliases.
Also cleaned up some lingering type typedefs.
2018-05-25 17:18:41 -04:00
Haocheng LIU
5c797169ec Use the strong typed enums for vtkm::cont::Field
Since Field association is used either when creating or working
with 'vtkm::cont::Field', it's put in the class itself.
2018-05-22 11:44:51 -04:00
Sujin Philip
0c1634bbc3 Fix a few more warnings
These warnings were detected on my local machine.
2018-05-09 17:49:45 -04:00
Robert Maynard
84311a2453 Merge branch 'master' into cmake_refactor 2018-04-05 10:18:36 -04:00
Utkarsh Ayachit
3da8b5be66 Remove vtkm::filter::Result
This commit removes `vtkm::filter::Result`. All methods that used
`vtkm::filter::Result` simply change to use `vtkm::cont::Dataset` instead.
The utility API on `Result` that was used to add fields to the resulting
dataset is now available via `vtkm::filter::internal::CreateResult`.
2018-04-03 16:55:03 -04:00
Robert Maynard
8808b41fbd Merge branch 'master' into vtk-m-cmake_refactor 2018-03-29 22:51:26 -04:00
Utkarsh Ayachit
e3961b9c95 update examples after filter API changes. 2018-03-13 13:54:22 -04:00
Robert Maynard
0660c67fef Merge branch 'master' into vtk-m-cmake_refactor 2018-01-16 15:42:28 -05:00
Robert Maynard
b10e50860f Update all the examples to the new CMake code. 2018-01-08 14:00:57 -05:00
Robert Maynard
93bc0198fe Suppress false positive warnings about calling host device functions. 2018-01-02 10:40:49 -05:00
Robert Maynard
24e57556e6 Merge branch 'master' into vtk-m-cmake_refactor
Includes updating to cleanup benchmark code and handle the new MPI option
2017-12-28 14:23:21 -05:00
Sujin Philip
334262db16 Fix Field constructors
1. Add option to copy user supplied array in make_ArrayHandle.
2. Replace Field constructors that take user supplied arrays with make_Field.
3. Replace CoordinateSystem constructors that take user supplied arrays with
   make_CoordinateSystem.
2017-12-21 12:48:15 -05:00
Matthew Letter
2587584993 added cuda files back into the build for examples
some of the cuda files were left out during the refactor, brought them back into the build process
2017-11-30 15:27:23 -07:00