Commit Graph

26 Commits

Author SHA1 Message Date
Kenneth Moreland
76ce9c87f0 Support using Token calling PrepareForExecution in ExecutionObject
The old version of ExecutionObject (that only takes a device) is still
supported, but you will get a deprecated warning if that is what is
defined.

Supporing this also included sending vtkm::cont::Token through the
vtkm::cont::arg::Transport mechanism, which was a change that propogated
through a lot of code.
2020-02-25 07:41:39 -07:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
554bc3d369 At runtime TryExecute supports a specific deviceId to execute on.
Instead of always using the first enabled device, now TryExecute
can be told which device at runtime to use.
2018-08-07 17:22:18 -04:00
Sujin Philip
5842da4921 Remove ArrayHandle CopyInto
Fixes #170
2017-10-27 17:28:59 -04: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
Allison Vacanti
fcee1cd5e9 Deduce device adapter tag in interop::TransferToOpenGL. 2017-08-14 09:36:39 -04:00
Robert Maynard
ac90e2dc73 vtkm::cont::internal now prefers 'using' over 'typedef' 2017-08-10 15:26:05 -04:00
Robert Maynard
b85cdd9080 Convert VTK-m over to use 'using' instead of 'typedef' 2017-08-07 14:05:43 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
David C. Lonie
f601e38ba8 Simplify exception hierarchy.
Remove the ErrorControl class such that all subclasses now inherit from
error. Renamed all exception classes via s/ErrorControl/Error/.

See issue #57.
2017-02-07 15:42: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
7d249e8996 Move DeviceAdapterTraits into vtkm::cont as they are user API.
When writing multiple backend code users of vtkm need to use the
DeviceAdapterTraits classes, so therefore we should move them to vtkm::cont
to signify this.
2015-12-11 09:52:18 -05:00
hschroot
2c55b15c3f Add additional control logic for CopyInto function
Clean up comments and align code to 80 character width
2015-09-17 14:26:19 -04:00
hschroot
20c1a04894 CopyInto function for ArrayHandles
ArrayHandles in DAX have a CopyInto function which allows the user to copy an array handle's data into a compatible STL type iterator. Originally this was fairly straight forward to implement since array handles in DAX are templated on the DeviceAdapterTag. In contrast, VTKm array handles use a polymorphic ArrayHandleExecutionManager under the hood allowing a single array handle to interface with multiple devices at runtime. To achieve this virtual functions are used. This makes implementing the CopyInto function difficult since it is templated on the IteratorType and virtual functions cannot be templated.

To work around this, I've implemented a concrete templated CopyInto function in the class derived from ArrayHandleExecutionManagerBase. In the ArrayHandle class, CopyInto dynamically casts the base class into the derived class, then calls the CopyInto function defined in the derived class.

The drawback to this approach is that, should the user define their own class that inherits from ArrayHandleExectionManagerBase, they are not forced to implement the CopyInto function, unlike the other virtual functions.
2015-09-17 14:26:19 -04:00
Robert Maynard
6b8e7822be The Copyright statement now has all the periods in the correct location. 2015-05-21 10:30:11 -04:00
Kenneth Moreland
e14fc427f0 Change storage references to storage pointers.
Previously ArrayTransfer and ArrayManagerExecution received a reference
to a Storage class in their constructor and held the reference as an
ivar. In retrospect, this is just asking for trouble. First, it is way
too easy to pass by value when you mean to pass by reference. Second, if
there ever is a bug where the Storage goes out of scope before the
classes holding a reference, it is that much harder to debug.
2015-04-30 21:29:58 -06:00
Kenneth Moreland
ec0adf8b16 Change interface of ArrayTransfer to be more like ArrayHandle.
This includes changing methods like LoadDataForInput to PrepareForInput.
It also changed the interface a bit to save a reference to the storage
object. (Maybe it would be better to save a pointer?) These changes also
extend up to the ArrayManagerExecution class, so it can effect device
adapter implementations.
2015-04-30 21:07:36 -06:00
Kenneth Moreland
c5b831b726 Remove LoadDataForInput that takes portals.
This API change effects both ArrayTransfer and ArrayManagerExecution.
This is in preparation for a future change to make the API more
consistent with ArrayHandle.
2015-04-28 11:30:30 -04:00
Robert Maynard
735a2ff25a Update the documentation to use vtkm::FloatDefault instead of vtkm::Scalar. 2014-12-10 10:38:03 -05:00
Kenneth Moreland
21823500c3 Change ArrayContainerControl to Storage.
After a talk with Robert Maynard, we decided to change the name
ArrayContainerControl to Storage. There are several reasons for this
change.

1. The name ArrayContainerControl is unwieldy. It is long, hard for
humans to parse, and makes for long lines and wraparound. It is also
hard to distinguish from other names like ArrayHandleFoo and
ArrayExecutionManager.

2. The word container is getting overloaded. For example, there is a
SimplePolymorphicContainer. Container is being used for an object that
literally acts like a container for data. This class really manages
data.

3. The data does not necessarily have to be on the control side.
Implicit containers store the data nowhere. Derivative containers might
have all the real data on the execution side. It is possible in the
future to have storage on the execution environment instead of the
control (think interfacing with a simulator on the GPU).

Storage is not a perfect word (what does implicit storage really mean?),
but its the best English word we came up with.
2014-06-24 09:58:32 -06:00
Kenneth Moreland
ed9cf46a17 Make sure all header wrapper macros start with vtk_m_ rather than vtkm_
We made this change a while ago to help with completion in IDEs.
(Completion was matching a bunch of wrapper macros that were almost
never used anywhere.) Most of the changes are in comments, but there are
a few bad macro definitions.
2014-06-11 10:43:36 -06:00
Robert Maynard
ec2032e1d3 Correc the rest of the alignmnet issues. 2014-05-19 14:20:52 -04:00
Robert Maynard
40c579f119 Correcting alignment issues so we compile on windows. 2014-05-19 13:17:04 -04:00
Robert Maynard
2b7a0e0490 revise the header guard naming convention to not conflict with macro names. 2014-03-07 10:22:36 -05:00
Robert Maynard
c80fb9259f Update the initial repository to use the correct indentation style. 2014-02-11 16:20:30 -05:00
Robert Maynard
a94abd7a71 Add in the minimum part of the control env to have a testable array handle. 2014-02-10 15:00:17 -05:00