VTK-m
2.2
|
Swizzle the components of the values in an ArrayHandle
.
More...
#include <ArrayHandleSwizzle.h>
Public Types | |
using | Thisclass = typename vtkm::cont::detail::GetTypeInParentheses< void(ArrayHandleSwizzle< ArrayHandleType, OutSize >) >::type |
using | Superclass = typename vtkm::cont::detail::GetTypeInParentheses< void(typename Traits::Superclass) >::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 |
using | MapType = typename Traits::MapType |
Public Types inherited from vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType > | |
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 | |
ArrayHandleSwizzle () | |
VTKM_CONT | ArrayHandleSwizzle (const Thisclass &src) |
VTKM_CONT | ArrayHandleSwizzle (Thisclass &&src) noexcept |
VTKM_CONT | ArrayHandleSwizzle (const vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &src) |
VTKM_CONT | ArrayHandleSwizzle (vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &&src) noexcept |
VTKM_CONT | ArrayHandleSwizzle (const std::vector< vtkm::cont::internal::Buffer > &buffers) |
VTKM_CONT | ArrayHandleSwizzle (std::vector< vtkm::cont::internal::Buffer > &&buffers) noexcept |
VTKM_CONT Thisclass & | operator= (const Thisclass &src) |
VTKM_CONT Thisclass & | operator= (Thisclass &&src) noexcept |
ArrayHandleSwizzle (const ArrayHandleType &array, const MapType &map) | |
Construct an ArrayHandleSwizzle with a source array and a swizzle map. More... | |
Public Member Functions inherited from vtkm::cont::ArrayHandleTransform< ArrayHandleType, FunctorType, InverseFunctorType > | |
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... | |
Private Types | |
using | Traits = detail::ArrayHandleSwizzleTraits< ArrayHandleType, OutSize > |
Swizzle the components of the values in an ArrayHandle
.
Given an ArrayHandle
with Vec
values, ArrayHandleSwizzle
allows you to reorder the components of all the Vec
values. This reordering is done in place, so the array does not have to be duplicated.
The resulting array does not have to contain all of the components of the input. For example, you could use ArrayHandleSwizzle
to drop one of the components of each vector. However, if you do that, then the swizzled array is read-only. If there is a 1:1 map from input components to output components, writing to the array will be enabled.
The swizzle map given to ArrayHandleSwizzle
must comprise valid component indices (between 0 and number of components - 1). Also, the component indices should not be repeated, particularly if you expect to write to the array. These conditions are not checked.
using vtkm::cont::ArrayHandleSwizzle< ArrayHandleType, OutSize >::MapType = typename Traits::MapType |
using vtkm::cont::ArrayHandleSwizzle< ArrayHandleType, OutSize >::ReadPortalType = typename Superclass::ReadPortalType |
using vtkm::cont::ArrayHandleSwizzle< ArrayHandleType, OutSize >::StorageTag = typename Superclass::StorageTag |
using vtkm::cont::ArrayHandleSwizzle< ArrayHandleType, OutSize >::StorageType = typename Superclass::StorageType |
using vtkm::cont::ArrayHandleSwizzle< ArrayHandleType, OutSize >::Superclass = typename vtkm::cont::detail::GetTypeInParentheses<void (typename Traits::Superclass) >::type |
using vtkm::cont::ArrayHandleSwizzle< ArrayHandleType, OutSize >::Thisclass = typename vtkm::cont::detail::GetTypeInParentheses<void (ArrayHandleSwizzle<ArrayHandleType, OutSize>) >::type |
|
private |
using vtkm::cont::ArrayHandleSwizzle< ArrayHandleType, OutSize >::ValueType = typename Superclass::ValueType |
using vtkm::cont::ArrayHandleSwizzle< ArrayHandleType, OutSize >::WritePortalType = typename Superclass::WritePortalType |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlineexplicit |
|
inlineexplicitnoexcept |
|
inline |
Construct an ArrayHandleSwizzle
with a source array and a swizzle map.
The swizzle map is a vtkm::Vec
containing vtkm::IdComponent
components and sized to the number of components in the array. Each value in the map specifies from which component of the input the corresponding component of the output should come from.
|
inline |
|
inlinenoexcept |