VTK-m
2.0
|
A Vec-like representation for short arrays. More...
#include <Types.h>
Public Types | |
using | ComponentType = T |
Public Member Functions | |
VTKM_EXEC_CONT | VecC () |
VTKM_EXEC_CONT | VecC (T *array, vtkm::IdComponent size) |
template<vtkm::IdComponent Size> | |
VTKM_EXEC_CONT | VecC (vtkm::Vec< T, Size > &src) |
VTKM_EXEC_CONT | VecC (T &src) |
VTKM_EXEC_CONT | VecC (const VecC< T > &src) |
const VTKM_EXEC_CONT T & | operator[] (vtkm::IdComponent index) const |
VTKM_EXEC_CONT T & | operator[] (vtkm::IdComponent index) |
VTKM_EXEC_CONT vtkm::IdComponent | GetNumberOfComponents () const |
VTKM_EXEC_CONT VecC< T > & | operator= (const VecC< T > &src) |
Private Types | |
using | Superclass = detail::VecCBase< T, VecC< T > > |
Private Member Functions | |
VTKM_STATIC_ASSERT_MSG (std::is_const< T >::value==false, "You cannot use VecC with a const type as its template argument. " "Use either const VecC or VecCConst.") | |
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 |
|
private |