Blaze  3.6
blaze::IsSubvector< T > Struct Template Reference

Compile time check for subvectors.This type trait tests whether or not the given template parameter is a subvector (i.e. a view on the part of a dense or sparse vector). In case the type is a subvector, the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType. More...

#include <IsSubvector.h>

Inherits blaze::IntegralConstant< T, N >.

Detailed Description

template<typename T>
struct blaze::IsSubvector< T >

Compile time check for subvectors.

This type trait tests whether or not the given template parameter is a subvector (i.e. a view on the part of a dense or sparse vector). In case the type is a subvector, the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType.

using VectorType1 = blaze::StaticVector<int,10UL>;
using VectorType2 = blaze::DynamicVector<double>;
using VectorType3 = blaze::CompressedVector<float>;
VectorType1 a;
VectorType2 b( 100UL );
VectorType3 c( 200UL );
using SubvectorType1 = decltype( blaze::subvector<2UL,4UL>( a ) );
using SubvectorType2 = decltype( blaze::subvector<aligned>( b, 8UL 24UL ) );
using SubvectorType3 = decltype( blaze::subvector( c, 5UL, 13UL ) );
blaze::IsSubvector< volatile VectorType3 > // Is derived from FalseType

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