Commit Graph

26 Commits

Author SHA1 Message Date
Robert Maynard
a652f7fe1e Update vtk-m doxygen to generate less warnings 2020-06-01 16:58:32 -04:00
Kenneth Moreland
4f9fa08fa1 Remove ArrayHandleStreaming capabilities
The `ArrayHandleStreaming` class stems from an old research project
experimenting with bringing data from an `ArrayHandle` in parts and
overlapping device transfer and execution. It works, but only in very
limited contexts. Thus, it is not actually used today. Plus, the feature
requires global indexing to be permutated throughout the worklet
dispatching classes of VTK-m for no further reason.

Because it is not really used, there are other more promising approaches
on the horizon, and it makes further scheduling improvements difficult,
we are removing this functionality.
2020-03-24 15:01:56 -06: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
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
64dede7486 Fix Compilation bug with Fill method 2019-10-09 16:07:43 -06:00
Allison Vacanti
abdd458b8f Remove unused member variable in Algorithm functor. 2019-09-11 12:50:17 -04:00
Allison Vacanti
afe1bd12dd Add ScanExtended device algorithm.
This behaves just like `ScanExclusive`, but rather than returning the
total sum, it is appended to the end of the output array.

This is in preparation for the CellSetExplicit refactoring described in
issue #408.
2019-09-03 15:02:41 -04:00
Allison Vacanti
f370857c15 Add CountSetBits and Fill device algorithms. 2019-06-25 11:30:39 -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
Robert Maynard
2d477fd531 Remove ability to pass a runtime device tracker to TryExecute
Since runtime device trackers are single instance per thread
the ability to pass them around to other functions is unneeded.
2019-04-02 10:44:30 -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
Haocheng LIU
8859636672 Merge worklet testing executables into a device dependent shared library
VTK-m has been updated to replace old per device worklet testing executables with a device
dependent shared library so that it's able to accept a device adapter
at runtime.
Meanwhile, it updates the testing infrastructure APIs. vtkm::cont::testing::Run
function would call ForceDevice when needed and if users need the device
adapter info at runtime, RunOnDevice function would pass the adapter into the functor.

Optional Parser is bumped from 1.3 to 1.7.
2018-11-23 10:13:56 -05:00
Kenneth Moreland
bcbad61002 Fix warnings about uninitalized value
In some functors within Algorithm.h, the functor did not have a
default constructor that initialized its fields. This could in turn
lead to a warning about using it unitialized.
2018-10-16 17:19:49 -06: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
2b05487398 Add ExecutionAndControlObjectBase
This is a subclass of ExecutionObject and a superset of its
functionality. In addition to having a PrepareForExecution method, it
also has a PrepareForControl method that gets an object appropriate for
the control environment. This is helpful for situations where you need
code to work in both environments, such as the functor in an
ArrayHandleTransform.

Also added several runtime checks for execution objects and execution
and cotnrol objects.
2018-09-08 11:54:28 -06:00
Allison Vacanti
e5fbd7bb6b Fix some missed IdAny renames. 2018-08-29 09:20:44 -07:00
Robert Maynard
59c8bd28aa vtkm::cont::Algorithm now can be told which device to run on at runtime 2018-08-16 16:08:34 -04:00
Kenneth Moreland
f14021dd84 Shorten code for PrepareArgForExec
By making is_base_of part of PrepareArgForExec, we can shorten not only
the C++ code but also the code that is generated by it.

Also, return && instead of by value when passing through the argument.

Changes thanks to Robert Maynard.
2018-07-10 13:48:20 -06:00
Kenneth Moreland
3b828608a4 Support ExecArg behavior in vtkm::cont::Algorithm methods
Most of the arguments given to device adapter algorithms are actually
control-side arguments that get converted to execution objects internally
(usually a `vtkm::cont::ArrayHandle`). However, some of the algorithms,
take an argument that is passed directly to the execution environment, such
as the predicate argument of `Sort`. If the argument is a plain-old-data
(POD) type, which is common enough, then you can just pass the object
straight through. However, if the object has any special elements that have
to be transferred to the execution environment, such as internal arrays,
passing this to the `vtkm::cont::Algorithm` functions becomes
problematic.

To cover this use case, all the `vtkm::cont::Algorithm` functions now
support automatically transferring objects that support the `ExecObject`
worklet convention. If any argument to any of the `vtkm::cont::Algorithm`
functions inherits from `vtkm::cont::ExecutionObjectBase`, then the
`PrepareForExecution` method is called with the device the algorithm is
running on, which allows these device-specific objects to be used without
the hassle of creating a `TryExecute`.
2018-07-06 18:57:54 +02:00
luz.paz
940c891886 Misc. typos
Found via `codespell` and `grep`
more typos

includes source typo change and a typo that needs further review
follow-up typos


Follow-up typos


Revert a commit
2018-06-14 16:49:11 -04:00
Utkarsh Ayachit
60a8ea67b4 Add Algorithm::Transform
Adding Algorithm::Transform API to match API provided by
`DeviceAdatorAlgorithm`.
2018-04-02 15:59:28 -04:00
Robert Maynard
7420f72c24 Simplify the boilerplate functors in vtkm/cont/Algorithms. 2017-12-12 11:10:52 -05:00
Matt Larsen
bf6cb1bd62 removing state from functors and adding variadic templates 2017-12-11 14:15:12 -08:00
Matt Larsen
eaebaea7cb adding a wrapper for device adapter algorithm 2017-11-29 07:44:37 -08:00