CUDPP
2.3
CUDA Data-Parallel Primitives Library
|
Utility template struct for generating small vector types from scalar types. More...
#include <cudpp_util.h>
Utility template struct for generating small vector types from scalar types.
Given a base scalar type (int
, float
, etc.) and a vector length (1 through 4) as template parameters, this struct defines a vector type (float3
, int4
, etc.) of the specified length and base type. For example:
This functionality is implemented using template specialization. Currently specializations for int, float, and unsigned int vectors of lengths 2-4 are defined. Note that this results in types being generated at compile time – there is no runtime cost. typeToVector is used by the optimized scan device
functions in scan_cta.cu.