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

Compile time evaluation of the maximum size of vectors and matrices. 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!
Efficient implementation of an arbitrary sized vector.
Definition: DynamicVector.h:223
Efficient implementation of a dynamically sized matrix with static memory.
Definition: HybridMatrix.h:256
Efficient implementation of a fixed-sized vector.
Definition: StaticVector.h:230
Compile time evaluation of the maximum size of vectors and matrices.
Definition: MaxSize.h:118

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