Blaze  3.6
blaze::MaxSize< T, N > Struct Template Reference

Compile time evaluation of the maximum size of vectors and matrices.The MaxSize type trait evaluates the maximum size of a particular dimension of the given vector or matrix type at compile time. In case the given type T is a vector or matrix type with a fixed maximum size (e.g. StaticVector, HybridVector, StaticMatrix, or HybridMatrix) and N is a valid dimension, the value member constant is set to the according size. In all other cases, value is set to -1. More...

#include <MaxSize.h>

Inherits blaze::MaxSizeHelper1< T, N >.

Detailed Description

template<typename T, size_t N>
struct blaze::MaxSize< T, N >

Compile time evaluation of the maximum size of vectors and matrices.

The MaxSize type trait evaluates the maximum size of a particular dimension of the given vector or matrix type at compile time. In case the given type T is a vector or matrix type with a fixed maximum size (e.g. StaticVector, HybridVector, StaticMatrix, or HybridMatrix) and N is a valid dimension, the value member constant is set to the according size. In all other cases, value is set to -1.

blaze::MaxSize< StaticVector<int,3UL>, 0UL >::value // Evaluates to 3
blaze::MaxSize< HybridMatrix<int,2UL,4UL>, 0UL >::value // Evaluates to 2 (the number of rows)
blaze::MaxSize< HybridMatrix<int,2UL,4UL>, 1UL >::value // Evaluates to 4 (the number of columns)
blaze::MaxSize< StaticVector<int,3UL>, 1UL >::value // Evaluates to -1; 1 is not a valid vector dimension!
blaze::MaxSize< DynamicVector<int>, 0UL >::value // Evaluates to -1; Maximum size not fixed at compile time!

The documentation for this struct was generated from the following file: