VTK-m
2.2
|
Implicitly transform values of one array to another with a functor. More...
#include <ArrayHandleTransform.h>
Public Types | |
using | Thisclass = typename vtkm::cont::detail::GetTypeInParentheses< void(ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >) >::type |
using | Superclass = typename vtkm::cont::detail::GetTypeInParentheses< void(vtkm::cont::ArrayHandle< typename internal::StorageTagTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ValueType, internal::StorageTagTransform< ArrayHandleType, FunctorType, InverseFunctorType > >) >::type |
using | ValueType = typename Superclass::ValueType |
using | StorageTag = typename Superclass::StorageTag |
using | StorageType = typename Superclass::StorageType |
using | ReadPortalType = typename Superclass::ReadPortalType |
using | WritePortalType = typename Superclass::WritePortalType |
Public Member Functions | |
ArrayHandleTransform () | |
VTKM_CONT | ArrayHandleTransform (const Thisclass &src) |
VTKM_CONT | ArrayHandleTransform (Thisclass &&src) noexcept |
VTKM_CONT | ArrayHandleTransform (const vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &src) |
VTKM_CONT | ArrayHandleTransform (vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &&src) noexcept |
VTKM_CONT | ArrayHandleTransform (const std::vector< vtkm::cont::internal::Buffer > &buffers) |
VTKM_CONT | ArrayHandleTransform (std::vector< vtkm::cont::internal::Buffer > &&buffers) noexcept |
VTKM_CONT Thisclass & | operator= (const Thisclass &src) |
VTKM_CONT Thisclass & | operator= (Thisclass &&src) noexcept |
ArrayHandleTransform (const ArrayHandleType &handle, const FunctorType &functor=FunctorType(), const InverseFunctorType &inverseFunctor=InverseFunctorType()) | |
~ArrayHandleTransform () | |
Implemented so that it is defined exclusively in the control environment. More... | |
ArrayHandleType | GetTransformedArray () const |
Returns the ArrayHandle that is being transformed. More... | |
FunctorType | GetFunctor () const |
Returns the functor transforming the ArrayHandle . More... | |
InverseFunctorType | GetInverseFunctor () const |
Returns the inverse functor transforming the ArrayHandle More... | |
Implicitly transform values of one array to another with a functor.
ArrayHandleTransforms is a specialization of ArrayHandle. It takes a delegate array handle and makes a new handle that calls a given unary functor with the element at a given index and returns the result of the functor as the value of this array at that position. This transformation is done on demand. That is, rather than make a new copy of the array with new values, the transformation is done as values are read from the array. Thus, the functor operator should work in both the control and execution environments.
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ReadPortalType = typename Superclass::ReadPortalType |
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::StorageTag = typename Superclass::StorageTag |
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::StorageType = typename Superclass::StorageType |
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::Superclass = typename vtkm::cont::detail::GetTypeInParentheses<void (vtkm::cont::ArrayHandle< typename internal::StorageTagTransform<ArrayHandleType, FunctorType, InverseFunctorType>:: ValueType, internal::StorageTagTransform<ArrayHandleType, FunctorType, InverseFunctorType> >) >::type |
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::Thisclass = typename vtkm::cont::detail::GetTypeInParentheses<void (ArrayHandleTransform<ArrayHandleType, FunctorType, InverseFunctorType>) >::type |
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ValueType = typename Superclass::ValueType |
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::WritePortalType = typename Superclass::WritePortalType |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlineexplicit |
|
inlineexplicitnoexcept |
|
inline |
|
inline |
Implemented so that it is defined exclusively in the control environment.
If there is a separate device for the execution environment (for example, with CUDA), then the automatically generated destructor could be created for all devices, and it would not be valid for all devices.
|
inline |
Returns the functor transforming the ArrayHandle
.
|
inline |
Returns the inverse functor transforming the ArrayHandle
|
inline |
Returns the ArrayHandle
that is being transformed.
|
inline |
|
inlinenoexcept |