boost::compute::vector_size
// In header: <boost/compute/type_traits/vector_size.hpp> template<typename T> struct vector_size { };
Meta-function returning the size (number of components) of a vector type T. For scalar types this function returns 1.
T
1
For example,
vector_size<float>::value == 1 vector_size<float4_>::value == 4