Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template vector_size

boost::compute::vector_size

Synopsis

// In header: <boost/compute/type_traits/vector_size.hpp>

template<typename T> 
struct vector_size {
};

Description

Meta-function returning the size (number of components) of a vector type T. For scalar types this function returns 1.

For example,

vector_size<float>::value == 1
vector_size<float4_>::value == 4


PrevUpHomeNext