|
VTK-m
2.3
|
A Vec-like representation for short arrays. More...
#include <Types.h>
Public Types | |
| using | ComponentType = T |
Public Member Functions | |
| constexpr | VecC () |
| constexpr | VecC (T *array, vtkm::IdComponent size) |
| template<vtkm::IdComponent Size> | |
| constexpr | VecC (vtkm::Vec< T, Size > &src) |
| constexpr | VecC (T &src) |
| constexpr | VecC (const VecC< T > &src) |
| constexpr const T & | operator[] (vtkm::IdComponent index) const |
| constexpr T & | operator[] (vtkm::IdComponent index) |
| constexpr 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 |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineexplicitconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
|
private |
|
private |
1.8.17