* \brief Exposes a member typedef \p Type that names the corresponding CUDA vector type if one exists. Otherwise \p Type refers to the VectorHelper structure itself, which will wrap the corresponding \p x, \p y, etc. vector fields.
*/
template <typename T, int vec_elements> struct VectorHelper;
#ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document
enum
{
/// The maximum number of elements in CUDA vector types
MAX_VEC_ELEMENTS = 4,
};
/**
* Generic vector-1 type
*/
template <typename T>
struct VectorHelper<T, 1>
{
enum { BUILT_IN = false };
T x;
typedef VectorHelper<T, 1> Type;
};
/**
* Generic vector-2 type
*/
template <typename T>
struct VectorHelper<T, 2>
{
enum { BUILT_IN = false };
T x;
T y;
typedef VectorHelper<T, 2> Type;
};
/**
* Generic vector-3 type
*/
template <typename T>
struct VectorHelper<T, 3>
{
enum { BUILT_IN = false };
T x;
T y;
T z;
typedef VectorHelper<T, 3> Type;
};
/**
* Generic vector-4 type
*/
template <typename T>
struct VectorHelper<T, 4>
{
enum { BUILT_IN = false };
T x;
T y;
T z;
T w;
typedef VectorHelper<T, 4> Type;
};
/**
* Macro for expanding partially-specialized built-in vector types