VTK-m
2.2
|
A grouping of ArrayHandleStride
s into an ArrayHandle
of vtkm::Vec
s.
More...
#include <ArrayHandleRecombineVec.h>
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 Thisclass & | operator= (const Thisclass &src) |
VTKM_CONT Thisclass & | operator= (Thisclass &&src) noexcept |
vtkm::IdComponent | GetNumberOfComponents () const |
Return the number of components in each value of the array. More... | |
vtkm::cont::ArrayHandleStride< ComponentType > | GetComponentArray (vtkm::IdComponent componentIndex) const |
Get the array storing the values for a particular component. More... | |
void | AppendComponentArray (const vtkm::cont::ArrayHandle< ComponentType, vtkm::cont::StorageTagStride > &array) |
Add a component array. More... | |
A grouping of ArrayHandleStride
s into an ArrayHandle
of vtkm::Vec
s.
The main intention of ArrayHandleStride
is to pull out a component of an ArrayHandle
without knowing there ArrayHandle
's storage or vtkm::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 vtkm::Vec
values.
Note that caution should be used with ArrayHandleRecombineVec
because the size of the vtkm::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 vtkm::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.)
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ReadPortalType = typename Superclass::ReadPortalType |
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::StorageTag = typename Superclass::StorageTag |
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::StorageType = typename Superclass::StorageType |
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::Superclass = typename vtkm::cont::detail::GetTypeInParentheses<void (vtkm::cont::ArrayHandle<internal::detail::RecombinedValueType<ComponentType>, vtkm::cont::internal::StorageTagRecombineVec>) >::type |
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::Thisclass = typename vtkm::cont::detail::GetTypeInParentheses<void (ArrayHandleRecombineVec<ComponentType>) >::type |
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::ValueType = typename Superclass::ValueType |
using vtkm::cont::ArrayHandleRecombineVec< ComponentType >::WritePortalType = typename Superclass::WritePortalType |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlineexplicit |
|
inlineexplicitnoexcept |
|
inline |
Add a component array.
AppendComponentArray()
provides an easy way to build an ArrayHandleRecombineVec
by iteratively adding the component arrays.
|
inline |
Get the array storing the values for a particular component.
The returned array is a vtkm::cont::ArrayHandleStride
. It is possible that the returned arrays from different components reference the same area of physical memory (usually referencing values interleaved with each other).
|
inline |
Return the number of components in each value of the array.
This is also equal to the number of component arrays referenced by this fancy array.
ArrayHandleRecombineVec
always stores flat Vec values. As such, this number of components is the same as the number of base components.
|
inline |
|
inlinenoexcept |