VTK-m  2.0
Public Types | Public Member Functions | Private Attributes | List of all members
vtkm::VecVariable< T, MaxSize > Class Template Reference

A short variable-length array with maximum length. More...

#include <VecVariable.h>

Public Types

using ComponentType = T
 

Public Member Functions

VTKM_EXEC_CONT VecVariable ()
 
template<typename SrcVecType >
VTKM_EXEC_CONT VecVariable (const SrcVecType &src)
 
VTKM_EXEC_CONT vtkm::IdComponent GetNumberOfComponents () const
 
template<vtkm::IdComponent DestSize>
VTKM_EXEC_CONT void CopyInto (vtkm::Vec< ComponentType, DestSize > &dest) const
 
const VTKM_EXEC_CONT ComponentTypeoperator[] (vtkm::IdComponent index) const
 
VTKM_EXEC_CONT ComponentTypeoperator[] (vtkm::IdComponent index)
 
VTKM_EXEC_CONT void Append (ComponentType value)
 

Private Attributes

vtkm::Vec< T, MaxSize > Data
 
vtkm::IdComponent NumComponents
 

Detailed Description

template<typename T, vtkm::IdComponent MaxSize>
class vtkm::VecVariable< T, MaxSize >

A short variable-length array with maximum length.

The VecVariable class is a Vec-like class that holds a short array of some maximum length. To avoid dynamic allocations, the maximum length is specified at compile time. Internally, VecVariable holds a Vec of the maximum length and exposes a subsection of it.

Member Typedef Documentation

◆ ComponentType

template<typename T , vtkm::IdComponent MaxSize>
using vtkm::VecVariable< T, MaxSize >::ComponentType = T

Constructor & Destructor Documentation

◆ VecVariable() [1/2]

template<typename T , vtkm::IdComponent MaxSize>
VTKM_EXEC_CONT vtkm::VecVariable< T, MaxSize >::VecVariable ( )
inline

◆ VecVariable() [2/2]

template<typename T , vtkm::IdComponent MaxSize>
template<typename SrcVecType >
VTKM_EXEC_CONT vtkm::VecVariable< T, MaxSize >::VecVariable ( const SrcVecType &  src)
inline

Member Function Documentation

◆ Append()

template<typename T , vtkm::IdComponent MaxSize>
VTKM_EXEC_CONT void vtkm::VecVariable< T, MaxSize >::Append ( ComponentType  value)
inline

◆ CopyInto()

template<typename T , vtkm::IdComponent MaxSize>
template<vtkm::IdComponent DestSize>
VTKM_EXEC_CONT void vtkm::VecVariable< T, MaxSize >::CopyInto ( vtkm::Vec< ComponentType, DestSize > &  dest) const
inline

◆ GetNumberOfComponents()

template<typename T , vtkm::IdComponent MaxSize>
VTKM_EXEC_CONT vtkm::IdComponent vtkm::VecVariable< T, MaxSize >::GetNumberOfComponents ( ) const
inline

◆ operator[]() [1/2]

template<typename T , vtkm::IdComponent MaxSize>
VTKM_EXEC_CONT ComponentType& vtkm::VecVariable< T, MaxSize >::operator[] ( vtkm::IdComponent  index)
inline

◆ operator[]() [2/2]

template<typename T , vtkm::IdComponent MaxSize>
const VTKM_EXEC_CONT ComponentType& vtkm::VecVariable< T, MaxSize >::operator[] ( vtkm::IdComponent  index) const
inline

Member Data Documentation

◆ Data

template<typename T , vtkm::IdComponent MaxSize>
vtkm::Vec<T, MaxSize> vtkm::VecVariable< T, MaxSize >::Data
private

◆ NumComponents

template<typename T , vtkm::IdComponent MaxSize>
vtkm::IdComponent vtkm::VecVariable< T, MaxSize >::NumComponents
private

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