Commit Graph

61 Commits

Author SHA1 Message Date
Kenneth Moreland
d67d27e0fc Add guide information for accessing/allocating data in arrays
In the previous guide, this was (mostly) in its own chapter. This may
have been an excessive amount of splitting things up.

There is still a missing section on the interface to the execution
environment (i.e. PrepareFor*). I plan to put that in the execution
objects chapter as this is the most likely place for a user to use them.
2024-07-12 07:41:42 -04:00
Ben Boeckel
97e0024daf clang-tidy: fix modernize-use-override lints 2023-12-01 07:01:11 -05:00
Kenneth Moreland
5b8c282e9f Continue transfer of Users' Guide text
These changes complete the using part of the guide.
2023-11-21 10:33:45 -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
2d30e6d45a Coordinate systems are stored as Fields
Previously, `DataSet` managed `CoordinateSystem`s separately from `Field`s.
However, a `CoordinateSystem` is really just a `Field` with some special
attributes. Thus, coordiante systems are now just listed along with the
rest of the fields, and the coordinate systems are simply strings that
point back to the appropriate field. (This was actually the original
concept for `DataSet`, but the coordinate systems were separated from
fields for some now obsolete reasons.)
2022-11-11 06:17:58 -07:00
Kenneth Moreland
ea560e9486 Remove deprecated virtual methods
Several revisions ago, the ability to use virtual methods in the
execution environment was deprecated. Completely remove this
functionality for the VTK-m 2.0 release.
2022-10-28 10:56:52 -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
c55d15f397 Deprecate ArrayHandle::ExecutionTypes
The newer version of `ArrayHandle` no longer supports different types of
portals for different devices. Thus, the `ReadPortalType` and
`WritePortalType` are sufficient for all types of portals across all
devices.

This significantly simplifies supporting execution objects on devices,
and thus this change also includes many changes to various execution
objects to remove their dependence on the device adapter tag.
2021-02-08 12:17:37 -07:00
Kenneth Moreland
11a4c9867e Change Field to hold UnknownArrayHandle rather than VariantArrayHandle
The `VariantArrayHandle` will soon be deprecated for its replacement of
`UnknownArrayHandle`. Thus, `Field` and related classes should start
using the new `UnknownArrayHandle`.
2021-01-14 17:01:22 -07:00
Kenneth Moreland
7d681fb585 Deprecate templated versions of Field::GetRange
Instead, always use precompiled versions of range computing. This means
you won't be able to specify the type. Currently, types are limited to
scalars vecs up to size 4.

The main motivation for this change is to allow you to include Field.h
with a non-device compiler. This is an important feature for our
customers.

I plan in the future to implement a mechanism to pull out a component of
most ArrayHandle's as a single array. This would enable us to support a
precompiled version that can compute the range of arbitrarily sized
Vecs.
2020-11-09 12:28:29 -07:00
Kenneth Moreland
63ef84ed78 Optionally remove all use of ArrayHandleVirtual
As we remove more and more virtual methods from VTK-m, I expect several
users will be interested in completely removing them from the build for
several reasons.

1. They may be compiling for hardware that does not support virtual
methods.
2. They may need to compile for CUDA but need shared libraries.
3. It should go a bit faster.

To enable this, a CMake option named `VTKm_NO_DEPRECATED_VIRTUAL` is
added. It defaults to `OFF`. But when it is `ON`, none of the code that
both uses virtuals and is deprecated will be built.

Currently, only `ArrayHandleVirtual` is deprecated, so the rest of the
virtual classes will still be built. As we move forward, more will be
removed until all virtual method functionality is removed.
2020-09-04 22:52:45 -06:00
Kenneth Moreland
f6b13df513 Support coordinates of both float32 and float64
Previously there were issues if the coordinate system was using floating
point values that were not FloatDefault. This remedies that issue.
2020-07-14 08:53:01 -06:00
Kenneth Moreland
453e314044 Deprecate ArrayHandleVirtualCoordinates
We are in the process of deprecating virtual classes in VTK-m
(that run in the execution environment).
2020-07-14 08:51:47 -06:00
Kenneth Moreland
be7f06bbe7 CoordinateSystem data is VariantArrayHandle
`CoordinateSystem` differed from `Field` in that its `GetData`
method returned an `ArrayHandleVirtualCoordinates` instead of
a `VariantArrayHandle`. This is probably confusing since
`CoordianteSystem` inherits `Field` and has a pretty dramatic
difference in this behavior.

In preparation to deprecate `ArrayHandleVirtualCoordinates`, this
changes `CoordiantSystem` to be much more like `Field`. (In the
future, we may change the `CoordinateSystem` to point to a `Field`
rather than be a special `Field`.)

A method named `GetDataAsMultiplexer` has been added to
`CoordinateSystem`. This method allows you to get data from
`CoordinateSystem` as a single array type without worrying
about creating functors to handle different types and without
needing virtual methods.
2020-07-14 08:50:39 -06:00
Kenneth Moreland
dc112b5169 Enable changing policy used for library compiles
Previously, the PolicyDefault used to compile all the filters was hard-
coded. The problem was that if any external project that depends on VTK-
m needs a different policy, it had to recompile everything in its own
translation units with a custom policy.

This change allows an external project provide a simple header file that
changes the type lists used in the default policy. That allows VTK-m to
compile the filters exactly as specified by the external project.
2020-03-19 15:07:07 -06:00
Kenneth Moreland
92db376236 Convert uses of ListTagBase to List 2019-12-06 15:37:46 -07:00
Robert Maynard
f2a3ecd014 Don't generate doxygen for serialization helpers 2019-09-12 17:29:05 -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
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
72cb6343b8 Move vtkm::cont::CastAndCall into a header in vtkm/cont
Since CastAndCall is meant to be a user callable function,
we should make sure it is part of the vtkm cont headers
2019-04-03 14:15:26 -04:00
Sujin Philip
7b072b1593 Add useful Get functions to Fields and Coordinates
Avoid having to call 'GetData()' to query 'NumberOfValues'/'NumberOfPoints'.
2019-03-15 13:28:55 -04:00
Robert Maynard
ad98d818ce VTK-m now doesn't clobber external DIY installations
Fixes #334
2019-02-05 13:05:14 -05:00
Robert Maynard
0a40c620ac Rename ArrayHandleVariant to VariantArrayHandle. 2018-12-27 14:35:56 -05:00
Robert Maynard
ef83adf3bd Field, CoordinateSystem, VirtualCoordinates all use the new virtual code 2018-12-27 14:35:56 -05:00
Robert Maynard
0da7830d9a Make sure important vtkm::cont classes have noexcept move ops.
This is important so they can be stored efficiently inside
containers such as std::vector that require strong move guarantees.
2018-12-10 10:33:18 -05:00
Sujin Philip
365d3d3921 Implement DataSet Serialization 2018-09-25 13:58:39 -04:00
Haocheng LIU
7d226a4666 Add a common API for CoordinateSystem to unload execution resources
This commit also fixes a bug that ArrayTransfer of ArrayHandleVirtualCoordinate
does not release execution resources properly.
2018-05-30 17:25:54 -04:00
Robert Maynard
cbadd3e67e Make CoordinateSystem not fail on CUDA 2018-03-10 16:38:41 -05:00
Sujin Philip
70fcd1d1cc Update CoordinateSystem to use the Virtual Array 2018-01-10 10:19:19 -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
Robert Maynard
7b1b9e445a Correctly forward rvalue functors when passed to CastAndCall 2017-12-08 12:02:01 -05:00
Robert Maynard
2ff14a811f Allow users to pass multiple arguments to CastAndCall 2017-11-08 13:19:05 -05:00
Robert Maynard
3701776e8d Refactor DynamicArrayHandle CastAndCall
This is the first step in making a more efficient CastAndCall for
DynamicArrayHandle.
2017-11-07 13:20:46 -05:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
Robert Maynard
f68635941e Convert VTK-m over to use 'using' instead of 'typedef' 2017-08-17 10:47:25 -04:00
Robert Maynard
5dd346007b Respect VTK-m convention of parameters all or nothing on a line
clang-format BinPack settings have been disabled to make sure that the
VTK-m style guideline is obeyed.
2017-05-26 13:53:28 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
Kenneth Moreland
6fdc7eb8c0 Add Field::GetRange and CoordinateSystem::GetBounds to library
Following what was done with ArrayRangeCompute, the GetRange and
GetBounds methods are embedded into the vtkm_cont library for the most
common type lists.

Also, and probably more importantly, the device adapter is no longer one
of the arguments for either of these methods. It is no longer needed as
ArrayRangeCompute no longer needs it.
2017-03-09 13:18:36 -05:00
Robert Maynard
2dc23cf1a8 Correct compilation errors on Windows with CUDA. 2017-01-19 14:02:35 -05:00
Robert Maynard
3c07c77fa7 Introduce vtkm_cont library to reduce weak vtable creation.
This reduces the number of weak vtables vtkm generates, resulting in
a reduction of binary sizes for projects that include vtkm classes in
multiple translation units.
2017-01-16 09:17:38 -05:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07:00
Robert Maynard
7ad88b6e5c Use c++11 variadic templates as storage of ListTags. 2016-09-23 16:39:20 -04:00
Robert Maynard
146d800968 make CastAndCall a free function instead of a class.
Overloading the function serves the same purpose of specializing the
class, but requires less syntax sugar to do.
2016-08-05 15:18:22 -04:00
T.J. Corona
927387b1a2 Add vtkm::cont::Field,CoordinateSystem as Invokable parameters.
Originally, only array handles could be passed to the dispatcher.
This update extends the list to Field and CoordinateSystem as
dynamic objects.
2016-08-03 15:46:30 -04:00
Kenneth Moreland
b5415169e2 Change Field and related methods to use Range and Bounds
First, be more explicit when we mean a range of values in a field or a
spacial bounds. Use the Range and Bounds structs in Field and
CoordinateSystem to make all of this more clear (and reduce a bit of
code as well).
2016-05-29 18:49:36 -06:00
Jeremy Meredith
ba8517eb67 removing all references to field order. 2016-03-23 10:38:14 -04:00
Robert Maynard
4b7054f4da Changes to computing bounds to allow custom types and storage. 2016-03-14 08:39:17 -04:00
dpugmire
f86382f0a9 Fix support for CoordinateSystems using ArrayHandleCartesianProduct. 2016-01-07 14:17:23 -05:00
dpugmire
b225ae97a2 Rectilinear coordinates (created with DataSetBuilderRectilinear) are now converted to vtkm::FloatDefault.
This reduces the number of types to consider when casting inside CoordinateSystem, and was felt by all to be a reasonable restriction.
2016-01-07 10:23:52 -05:00