VTK-m  1.8
Public Member Functions | Private Types | 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 Member Functions

 VTKM_ARRAY_HANDLE_SUBCLASS (ArrayHandleRecombineVec,(ArrayHandleRecombineVec< ComponentType >),(vtkm::cont::ArrayHandle< internal::detail::RecombinedValueType< ComponentType >, vtkm::cont::internal::StorageTagRecombineVec >))
vtkm::IdComponent GetNumberOfComponents () const
vtkm::cont::ArrayHandleStride< ComponentType > GetComponentArray (vtkm::IdComponent componentIndex) const
void AppendComponentArray (const vtkm::cont::ArrayHandle< ComponentType, vtkm::cont::StorageTagStride > &array)

Private Types

using StorageType = vtkm::cont::internal::Storage< ValueType, StorageTag >

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 VecVariable, which can cause surprises if treated as a Vec. In particular, the static NUM_COMPONENTS expression does not exist.

Member Typedef Documentation

◆ StorageType

template<typename ComponentType >
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>

Member Function Documentation

◆ AppendComponentArray()

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

◆ GetComponentArray()

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

◆ GetNumberOfComponents()

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


template<typename ComponentType >
vtkm::cont::ArrayHandleRecombineVec< ComponentType >::VTKM_ARRAY_HANDLE_SUBCLASS ( ArrayHandleRecombineVec< ComponentType >  ,
(ArrayHandleRecombineVec< ComponentType >)  ,
(vtkm::cont::ArrayHandle< internal::detail::RecombinedValueType< ComponentType >, vtkm::cont::internal::StorageTagRecombineVec >)   

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