VTK-m  2.1
Public Types | Public Member Functions | List of all members
vtkm::cont::ArrayHandleRecombineVec< ComponentType > Class Template Reference

A grouping of ArrayHandleStrides into an ArrayHandle of Vecs. More...

#include <ArrayHandleRecombineVec.h>

Inheritance diagram for vtkm::cont::ArrayHandleRecombineVec< ComponentType >:
vtkm::cont::ArrayHandle< internal::detail::RecombinedValueType< ComponentType >, vtkm::cont::internal::StorageTagRecombineVec >

Public Types

using Thisclass = typename vtkm::cont::detail::GetTypeInParentheses< void(ArrayHandleRecombineVec< ComponentType >) >::type
 
using Superclass = typename vtkm::cont::detail::GetTypeInParentheses< void(vtkm::cont::ArrayHandle< internal::detail::RecombinedValueType< ComponentType >, vtkm::cont::internal::StorageTagRecombineVec >) >::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

 ArrayHandleRecombineVec ()
 
VTKM_CONT ArrayHandleRecombineVec (const Thisclass &src)
 
VTKM_CONT ArrayHandleRecombineVec (Thisclass &&src) noexcept
 
VTKM_CONT ArrayHandleRecombineVec (const vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &src)
 
VTKM_CONT ArrayHandleRecombineVec (vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &&src) noexcept
 
VTKM_CONT ArrayHandleRecombineVec (const std::vector< vtkm::cont::internal::Buffer > &buffers)
 
VTKM_CONT ArrayHandleRecombineVec (std::vector< vtkm::cont::internal::Buffer > &&buffers) noexcept
 
VTKM_CONT Thisclassoperator= (const Thisclass &src)
 
VTKM_CONT Thisclassoperator= (Thisclass &&src) noexcept
 
vtkm::IdComponent GetNumberOfComponents () const
 
vtkm::cont::ArrayHandleStride< ComponentType > GetComponentArray (vtkm::IdComponent componentIndex) const
 
void AppendComponentArray (const vtkm::cont::ArrayHandle< ComponentType, vtkm::cont::StorageTagStride > &array)
 

Detailed Description

template<typename ComponentType>
class vtkm::cont::ArrayHandleRecombineVec< ComponentType >

A grouping of ArrayHandleStrides into an ArrayHandle of Vecs.

The main intention of ArrayHandleStride is to pull out a component of an ArrayHandle without knowing there ArrayHandle's storage or Vec shape. However, usually you want to do an operation on all the components together. ArrayHandleRecombineVec implements the functionality to easily take a group of extracted components and treat them as a single ArrayHandle of Vec values.

Note that caution should be used with ArrayHandleRecombineVec because the size of the Vec values is not known at compile time. Thus, the value type of this array is forced to a special RecombineVec class that can cause surprises if treated as a Vec. In particular, the static NUM_COMPONENTS expression does not exist. Furthermore, new variables of type RecombineVec cannot be created. This means that simple operators like + will not work because they require an intermediate object to be created. (Equal operators like += do work because they are given an existing variable to place the output.)

Member Typedef Documentation

◆ ReadPortalType

template<typename ComponentType >
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ReadPortalType = typename Superclass::ReadPortalType

◆ StorageTag

template<typename ComponentType >
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::StorageTag = typename Superclass::StorageTag

◆ StorageType

template<typename ComponentType >
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::StorageType = typename Superclass::StorageType

◆ Superclass

template<typename ComponentType >
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::Superclass = typename vtkm::cont::detail::GetTypeInParentheses<void (vtkm::cont::ArrayHandle<internal::detail::RecombinedValueType<ComponentType>, vtkm::cont::internal::StorageTagRecombineVec>) >::type

◆ Thisclass

template<typename ComponentType >
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::Thisclass = typename vtkm::cont::detail::GetTypeInParentheses<void (ArrayHandleRecombineVec<ComponentType>) >::type

◆ ValueType

template<typename ComponentType >
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ValueType = typename Superclass::ValueType

◆ WritePortalType

template<typename ComponentType >
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::WritePortalType = typename Superclass::WritePortalType

Constructor & Destructor Documentation

◆ ArrayHandleRecombineVec() [1/7]

template<typename ComponentType >
vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ArrayHandleRecombineVec ( )
inline

◆ ArrayHandleRecombineVec() [2/7]

template<typename ComponentType >
VTKM_CONT vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ArrayHandleRecombineVec ( const Thisclass src)
inline

◆ ArrayHandleRecombineVec() [3/7]

template<typename ComponentType >
VTKM_CONT vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ArrayHandleRecombineVec ( Thisclass &&  src)
inlinenoexcept

◆ ArrayHandleRecombineVec() [4/7]

template<typename ComponentType >
VTKM_CONT vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ArrayHandleRecombineVec ( const vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &  src)
inline

◆ ArrayHandleRecombineVec() [5/7]

template<typename ComponentType >
VTKM_CONT vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ArrayHandleRecombineVec ( vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &&  src)
inlinenoexcept

◆ ArrayHandleRecombineVec() [6/7]

template<typename ComponentType >
VTKM_CONT vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ArrayHandleRecombineVec ( const std::vector< vtkm::cont::internal::Buffer > &  buffers)
inlineexplicit

◆ ArrayHandleRecombineVec() [7/7]

template<typename ComponentType >
VTKM_CONT vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ArrayHandleRecombineVec ( std::vector< vtkm::cont::internal::Buffer > &&  buffers)
inlineexplicitnoexcept

Member Function Documentation

◆ AppendComponentArray()

template<typename ComponentType >
void vtkm::cont::ArrayHandleRecombineVec< ComponentType >::AppendComponentArray ( const vtkm::cont::ArrayHandle< ComponentType, vtkm::cont::StorageTagStride > &  array)
inline

◆ GetComponentArray()

template<typename ComponentType >
vtkm::cont::ArrayHandleStride<ComponentType> vtkm::cont::ArrayHandleRecombineVec< ComponentType >::GetComponentArray ( vtkm::IdComponent  componentIndex) const
inline

◆ GetNumberOfComponents()

template<typename ComponentType >
vtkm::IdComponent vtkm::cont::ArrayHandleRecombineVec< ComponentType >::GetNumberOfComponents ( ) const
inline

◆ operator=() [1/2]

template<typename ComponentType >
VTKM_CONT Thisclass& vtkm::cont::ArrayHandleRecombineVec< ComponentType >::operator= ( const Thisclass src)
inline

◆ operator=() [2/2]

template<typename ComponentType >
VTKM_CONT Thisclass& vtkm::cont::ArrayHandleRecombineVec< ComponentType >::operator= ( Thisclass &&  src)
inlinenoexcept

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