Commit Graph

14 Commits

Author SHA1 Message Date
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