| Home | Libraries | People | FAQ | More

## 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