VTK-m
2.2
|
A Vec-like representation for short arrays. More...
#include <Types.h>
Public Types | |
using | ComponentType = T |
Public Member Functions | |
VecC () | |
VecC (T *array, vtkm::IdComponent size) | |
template<vtkm::IdComponent Size> | |
VecC (vtkm::Vec< T, Size > &src) | |
VecC (T &src) | |
VecC (const VecC< T > &src) | |
const T & | operator[] (vtkm::IdComponent index) const |
T & | operator[] (vtkm::IdComponent index) |
vtkm::IdComponent | GetNumberOfComponents () const |
VecC< T > & | operator= (const VecC< T > &src) |
Private Types | |
using | Superclass = detail::VecCBase< T, VecC< T > > |
Private Attributes | |
T *const | Components |
vtkm::IdComponent | NumberOfComponents |
A Vec-like representation for short arrays.
The VecC
class takes a short array of values and provides an interface that mimics Vec
. This provides a mechanism to treat C arrays like a Vec
. It is useful in situations where you want to use a Vec
but the data must come from elsewhere or in certain situations where the size cannot be determined at compile time. In particular, Vec
objects of different sizes can potentially all be converted to a VecC
of the same type.
Note that VecC
holds a reference to an outside array given to it. If that array gets destroyed (for example because the source goes out of scope), the behavior becomes undefined.
You cannot use VecC
with a const type in its template argument. For example, you cannot declare VecC<const vtkm::Id>
. If you want a non-mutable VecC
, the VecCConst
class (e.g. VecCConst<vtkm::Id>
).
using vtkm::VecC< T >::ComponentType = T |
|
private |
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |