VTK-m  2.1
Public Types | Public Member Functions | List of all members
vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType > Class Template Reference

Implicitly transform values of one array to another with a functor. More...

#include <ArrayHandleTransform.h>

Inheritance diagram for vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >:
vtkm::cont::ArrayHandleSwizzle< ArrayHandleType, OutSize >

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 Thisclassoperator= (const Thisclass &src)
 
VTKM_CONT Thisclassoperator= (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...
 

Detailed Description

template<typename ArrayHandleType, typename FunctorType, typename InverseFunctorType>
class vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >

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.

Member Typedef Documentation

◆ ReadPortalType

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ReadPortalType = typename Superclass::ReadPortalType

◆ StorageTag

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::StorageTag = typename Superclass::StorageTag

◆ StorageType

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::StorageType = typename Superclass::StorageType

◆ Superclass

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
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

◆ Thisclass

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::Thisclass = typename vtkm::cont::detail::GetTypeInParentheses<void (ArrayHandleTransform<ArrayHandleType, FunctorType, InverseFunctorType>) >::type

◆ ValueType

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ValueType = typename Superclass::ValueType

◆ WritePortalType

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
using vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::WritePortalType = typename Superclass::WritePortalType

Constructor & Destructor Documentation

◆ ArrayHandleTransform() [1/8]

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ArrayHandleTransform ( )
inline

◆ ArrayHandleTransform() [2/8]

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
VTKM_CONT vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ArrayHandleTransform ( const Thisclass src)
inline

◆ ArrayHandleTransform() [3/8]

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
VTKM_CONT vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ArrayHandleTransform ( Thisclass &&  src)
inlinenoexcept

◆ ArrayHandleTransform() [4/8]

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
VTKM_CONT vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ArrayHandleTransform ( const vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &  src)
inline

◆ ArrayHandleTransform() [5/8]

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
VTKM_CONT vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ArrayHandleTransform ( vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &&  src)
inlinenoexcept

◆ ArrayHandleTransform() [6/8]

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
VTKM_CONT vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ArrayHandleTransform ( const std::vector< vtkm::cont::internal::Buffer > &  buffers)
inlineexplicit

◆ ArrayHandleTransform() [7/8]

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
VTKM_CONT vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ArrayHandleTransform ( std::vector< vtkm::cont::internal::Buffer > &&  buffers)
inlineexplicitnoexcept

◆ ArrayHandleTransform() [8/8]

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::ArrayHandleTransform ( const ArrayHandleType &  handle,
const FunctorType &  functor = FunctorType(),
const InverseFunctorType &  inverseFunctor = InverseFunctorType() 
)
inline

◆ ~ArrayHandleTransform()

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::~ArrayHandleTransform ( )
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.

Member Function Documentation

◆ GetFunctor()

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
FunctorType vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::GetFunctor ( ) const
inline

Returns the functor transforming the ArrayHandle.

◆ GetInverseFunctor()

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
InverseFunctorType vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::GetInverseFunctor ( ) const
inline

Returns the inverse functor transforming the ArrayHandle

◆ GetTransformedArray()

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
ArrayHandleType vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::GetTransformedArray ( ) const
inline

Returns the ArrayHandle that is being transformed.

◆ operator=() [1/2]

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
VTKM_CONT Thisclass& vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::operator= ( const Thisclass src)
inline

◆ operator=() [2/2]

template<typename ArrayHandleType , typename FunctorType , typename InverseFunctorType >
VTKM_CONT Thisclass& vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType >::operator= ( Thisclass &&  src)
inlinenoexcept

The documentation for this class was generated from the following file: