VTK-m
2.0
|
A grouping of ArrayHandleStride
s into an ArrayHandle
of Vec
s.
More...
#include <ArrayHandleRecombineVec.h>
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 > |
A grouping of ArrayHandleStride
s into an ArrayHandle
of Vec
s.
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.
|
private |
|
inline |
|
inline |
|
inline |
vtkm::cont::ArrayHandleRecombineVec< ComponentType >::VTKM_ARRAY_HANDLE_SUBCLASS | ( | ArrayHandleRecombineVec< ComponentType > | , |
(ArrayHandleRecombineVec< ComponentType >) | , | ||
(vtkm::cont::ArrayHandle< internal::detail::RecombinedValueType< ComponentType >, vtkm::cont::internal::StorageTagRecombineVec >) | |||
) |