Classes | Macros
Type traits

Classes

struct  blaze::Columns< T >
 Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the number of columns of the given matrix type at compile time. In case the given type T is a matrix type with a fixed number of columns (e.g. StaticMatrix), the value member constant is set to the according number of columns. In all other cases, value is set to 0. More...
 
struct  blaze::HasConstDataAccess< T >
 Compile time check for low-level access to constant data.This type trait tests whether the given data type provides a low-level access to constant data via a const 'data' member function. In case the according member function is provided, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. Examples: More...
 
struct  blaze::HasMutableDataAccess< T >
 Compile time check for low-level access to mutable data.This type trait tests whether the given data type provides a low-level access to mutable data via a non-const 'data' member function. In case the according member function is provided, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. Examples: More...
 
struct  blaze::IsAbsExpr< T >
 Compile time check whether the given type is an absolute value expression template.This type trait class tests whether or not the given type Type is an absolute value expression template. In order to qualify as a valid absolute value expression template, the given type has to derive (publicly or privately) from the AbsExpr base class. In case the given type is a valid absolute value expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsAdaptor< T >
 Compile time check for adaptors.This type trait tests whether the given template parameter is an adaptor type (for instance LowerMatrix, UpperMatrix, or SymmetricMatrix). In case the type is an adaptor type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. The following example demonstrates this by means of the mentioned matrix adaptors: More...
 
struct  blaze::IsAddExpr< T >
 Compile time check whether the given type is an addition expression template.This type trait class tests whether or not the given type Type is an addition expression template (i.e. an expression representing a vector addition or a matrix addition). In order to qualify as a valid addition expression template, the given type has to derive (publicly or privately) from the AddExpr base class. In case the given type is a valid addition expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsAligned< T >
 Compile time check for the alignment of data types.This type trait tests whether the given data type guarantees to provide aligned data values with respect to the requirements of the available instruction set. For instance, vectorizable data types such as built-in and complex data types are required to be 16-bit aligned for SSE, 32-bit aligned for AVX, and 64-bit aligned for MIC. In case the data type is properly aligned, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. Examples: More...
 
struct  blaze::IsBlasCompatible< T >
 Compile time check for data types.This type trait tests whether or not the given template parameter is a data type compatible to the BLAS standard. The BLAS standard supports float, double, complex<float> and complex<double> values. If the type is BLAS compatible, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsColumn< T >
 Compile time check for columns.This type trait tests whether or not the given template parameter is a column (i.e. dense or sparse column). In case the type is a column, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsColumnMajorMatrix< T >
 Compile time check for column-major matrix types.This type trait tests whether or not the given template argument is a column-major dense or sparse matrix type (i.e., a matrix whose storage order is set to true). In case the type is a column-major matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsColumnVector< T >
 Compile time check for column vector types.This type trait tests whether or not the given template argument is a column dense or sparse vector type (i.e. a vector whose transposition flag is set to blaze::columnVector). In case the type is a column vector type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsComputation< T >
 Compile time check whether the given type is a computational expression template.This type trait class tests whether or not the given type Type is a computational expression template (i.e. a mathematical operation such as an addition, a subtraction, a multiplication, a division, an absolute value calculation, ...). In order to qualify as a valid computational expression template, the given type has to derive (publicly or privately) from the Computation base class. In case the given type is a valid computational expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsConjExpr< T >
 Compile time check whether the given type is a complex conjugate expression template.This type trait class tests whether or not the given type Type is a complex conjugate expression template. In order to qualify as a valid complex conjugate expression template, the given type has to derive (publicly or privately) from the ConjExpr base class. In case the given type is a valid complex conjugate expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsCrossExpr< T >
 Compile time check whether the given type is a cross product expression template.This type trait class tests whether or not the given type Type is a cross product expression template. In order to qualify as a valid cross product expression template, the given type has to derive (publicly or privately) from the CrossExpr base class. In case the given type is a valid cross product expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsCustom< T >
 Compile time check for custom data types.This type trait tests whether the given data type is a custom data type, i.e. a custom vector or a custom matrix. In case the data type a custom data type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. Examples: More...
 
struct  blaze::IsDenseMatrix< T >
 Compile time check for dense matrix types.This type trait tests whether or not the given template parameter is a dense, N-dimensional matrix type. In case the type is a dense matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise yes is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsDenseVector< T >
 Compile time check for dense vector types.This type trait tests whether or not the given template parameter is a dense, N-dimensional vector type. In case the type is a dense vector type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsDiagonal< T >
 Compile time check for diagonal matrices.This type trait tests whether or not the given template parameter is a diagonal matrix type (i.e. a matrix type that is guaranteed to be diagonal at compile time). In case the type is a diagonal matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsDivExpr< T >
 Compile time check whether the given type is a division expression template.This type trait class tests whether or not the given type Type is a division expression template (i.e. an expression representing a vector/scalar division or a matrix/scalar division). In order to qualify as a valid division expression template, the given type has to derive (publicly or privately) from the DivExpr base class. In case the given type is a valid division expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsEvalExpr< T >
 Compile time check whether the given type is an evaluation expression template.This type trait class tests whether or not the given type Type is an evaluation expression template. In order to qualify as a valid evaluation expression template, the given type has to derive (publicly or privately) from the EvalExpr base class. In case the given type is a valid evaluation expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsExpression< T >
 Compile time check whether the given type is an expression template.This type trait class tests whether or not the given type Type is a Blaze expression template. In order to qualify as a valid expression template, the given type has to derive (publicly or privately) from the Expression base class. In case the given type is a valid expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsGeneral< T >
 Compile time check for general matrices.This type trait tests whether or not the given template parameter is a general matrix type (i.e. a matrix type that is neither symmetric, Hermitian, lower triangular or upper triangular at compile time). In case the type is a general matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsHermitian< T >
 Compile time check for Hermitian matrices.This type trait tests whether or not the given template parameter is an Hermitian matrix type (i.e. a matrix type that is guaranteed to be Hermitian at compile time). In case the type is a Hermitian matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsIdentity< T >
 Compile time check for identity matrices.This type trait tests whether or not the given template parameter is an identity matrix type (i.e. a matrix type that is guaranteed to be an identity matrix at compile time). In case the type is an identity matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsImagExpr< T >
 Compile time check whether the given type is a imaginary part expression template.This type trait class tests whether or not the given type Type is a imaginary part expression template. In order to qualify as a valid imaginary part expression template, the given type has to derive (publicly or privately) from the ImagExpr base class. In case the given type is a valid imaginary part expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsInvertible< T >
 Compile time check for data types.This type trait tests whether or not the given template parameter is invertible. The type is considered to be invertible if it is either BLAS compatible (i.e. float, double, complex<float>, or complex<double>), long double, or any dense matrix type with a BLAS compatible element type. If the given type is invertible, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsLower< T >
 Compile time check for lower triangular matrices.This type trait tests whether or not the given template parameter is a lower triangular matrix type (i.e. a matrix type that is guaranteed to be lower triangular at compile time). This also includes lower unitriangular and strictly lower triangular matrices. In case the type is a lower triangular matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatAbsExpr< T >
 Compile time check whether the given type is a matrix absolute value expression template.This type trait class tests whether or not the given type Type is a matrix absolute value expression template. In order to qualify as a valid matrix absolute value expression template, the given type has to derive (publicly or privately) from the MatAbsExpr base class. In case the given type is a valid matrix absolute value expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatConjExpr< T >
 Compile time check whether the given type is a matrix complex conjugate expression template.This type trait class tests whether or not the given type Type is a matrix complex conjugate expression template. In order to qualify as a valid matrix complex conjugate expression template, the given type has to derive (publicly or privately) from the MatConjExpr base class. In case the given type is a valid matrix complex conjugate expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatEvalExpr< T >
 Compile time check whether the given type is a matrix evaluation expression template.This type trait class tests whether or not the given type Type is a matrix evaluation expression template. In order to qualify as a valid matrix evaluation expression template, the given type has to derive (publicly or privately) from the MatEvalExpr base class. In case the given type is a valid matrix evaluation expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatImagExpr< T >
 Compile time check whether the given type is a matrix imaginary part expression template.This type trait class tests whether or not the given type Type is a matrix imaginary part expression template. In order to qualify as a valid matrix imaginary part expression template, the given type has to derive (publicly or privately) from the MatImagExpr base class. In case the given type is a valid matrix imaginary part expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatInvExpr< T >
 Compile time check whether the given type is a matrix inversion expression template.This type trait class tests whether or not the given type Type is a matrix inversion expression template. In order to qualify as a valid matrix inversion expression template, the given type has to derive (publicly or privately) from the MatInvExpr base class. In case the given type is a valid matrix inversion expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatMatAddExpr< T >
 Compile time check whether the given type is a matrix/matrix addition expression template.This type trait class tests whether or not the given type Type is a matrix/matrix addition expression template. In order to qualify as a valid matrix addition expression template, the given type has to derive (publicly or privately) from the MatMatAddExpr base class. In case the given type is a valid matrix addition expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatMatMultExpr< T >
 Compile time check whether the given type is a matrix/matrix multiplication expression template.This type trait class tests whether or not the given type Type is a matrix/matrix multiplication expression template. In order to qualify as a valid matrix multiplication expression template, the given type has to derive (publicly or privately) from the MatMatMultExpr base class. In case the given type is a valid matrix multiplication expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatMatSubExpr< T >
 Compile time check whether the given type is a matrix/matrix subtraction expression template.This type trait class tests whether or not the given type Type is a matrix/matrix subtraction expression template. In order to qualify as a valid matrix subtraction expression template, the given type has to derive (publicly or privately) from the MatMatSubExpr base class. In case the given type is a valid matrix subtraction expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatRealExpr< T >
 Compile time check whether the given type is a matrix real part expression template.This type trait class tests whether or not the given type Type is a matrix real part expression template. In order to qualify as a valid matrix real part expression template, the given type has to derive (publicly or privately) from the MatRealExpr base class. In case the given type is a valid matrix real part expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatrix< T >
 Compile time check for matrix types.This type trait tests whether or not the given template parameter is a N-dimensional dense or sparse matrix type. In case the type is a matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise yes is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatScalarDivExpr< T >
 Compile time check whether the given type is a matrix/scalar division expression template.This type trait class tests whether or not the given type Type is a matrix/scalar division expression template. In order to qualify as a valid matrix/scalar division expression template, the given type has to derive (publicly or privately) from the MatScalarDivExpr base class. In case the given type is a valid matrix/scalar division expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatScalarMultExpr< T >
 Compile time check whether the given type is a matrix/scalar multiplication expression template.This type trait class tests whether or not the given type Type is a matrix/scalar multiplication expression template. In order to qualify as a valid matrix/scalar multiplication expression template, the given type has to derive (publicly or privately) from the MatScalarMultExpr base class. In case the given type is a valid matrix/scalar multiplication expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatSerialExpr< T >
 Compile time check whether the given type is a matrix serial evaluation expression template.This type trait class tests whether or not the given type Type is a matrix serial evaluation expression template. In order to qualify as a valid matrix serial evaluation expression template, the given type has to derive (publicly or privately) from the MatSerialExpr base class. In case the given type is a valid matrix serial evaluation expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatTransExpr< T >
 Compile time check whether the given type is a matrix transposition expression template.This type trait class tests whether or not the given type Type is a matrix transposition expression template. In order to qualify as a valid matrix transposition expression template, the given type has to derive (publicly or privately) from the MatTransExpr base class. In case the given type is a valid matrix transposition expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMatVecMultExpr< T >
 Compile time check whether the given type is a matrix/vector multiplication expression template.This type trait class tests whether or not the given type Type is a matrix/vector multiplication expression template. In order to qualify as a valid matrix/vector multiplication expression template, the given type has to derive (publicly or privately) from the MatVecMultExpr base class. In case the given type is a valid matrix/vector multiplication expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsMultExpr< T >
 Compile time check whether the given type is a multiplication expression template.This type trait class tests whether or not the given type Type is a multiplication expression template (i.e. an expression representing an element-wise vector multiplication, a matrix/vector multiplication, a vector/matrix multiplication, or a matrix multiplication). In order to qualify as a valid multiplication expression template, the given type has to derive (publicly or privately) from the MultExpr base class. In case the given type is a valid multiplication expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsPadded< T >
 Compile time check for data types with padding.This type trait tests whether the given data type employs or simulates padding such that no special treatment of remainder elements is necessary for vectorized operations on the type. In case the data type is padded, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. Examples: More...
 
struct  blaze::IsProxy< T >
 Compile time check for proxy types.This type trait tests whether or not the given template parameter is a proxy type (i.e. derived from the blaze::Proxy class template). In case the type is a proxy, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsRealExpr< T >
 Compile time check whether the given type is a real part expression template.This type trait class tests whether or not the given type Type is a real part expression template. In order to qualify as a valid real part expression template, the given type has to derive (publicly or privately) from the RealExpr base class. In case the given type is a valid real part expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsResizable< T >
 Compile time check for resizable data types.This type trait tests whether the given data type is a resizable data type. In case the data type can be resized (via the resize() function), the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. Examples: More...
 
struct  blaze::IsRestricted< T >
 Compile time check for data types with restricted data access.This type trait tests whether the given data type has a restricted data access. Examples are the LowerMatrix and UpperMatrix adaptors that don't allow write access to the elements in the upper or lower part of the matrix, respectively. In case the data type has a restricted data access, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. Examples: More...
 
struct  blaze::IsRow< T >
 Compile time check for rows.This type trait tests whether or not the given template parameter is a row (i.e. dense or sparse row). In case the type is a row, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsRowMajorMatrix< T >
 Compile time check for row-major matrix types.This type trait tests whether or not the given template argument is a row-major dense or sparse matrix type (i.e., a matrix whose storage order is set to true). In case the type is a row-major matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsRowVector< T >
 Compile time check for row vector types.This type trait tests whether or not the given template argument is a row dense or sparse vector type (i.e. a vector whose transposition flag is set to blaze::rowVector). In case the type is a row vector type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsSerialExpr< T >
 Compile time check whether the given type is a serial evaluation expression template.This type trait class tests whether or not the given type Type is a serial evaluation expression template. In order to qualify as a valid serial evaluation expression template, the given type has to derive (publicly or privately) from the SerialExpr base class. In case the given type is a valid serial evaluation expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsSMPAssignable< T >
 Compile time check for data types.This type trait tests whether or not the given template parameter is an SMP-assignable data type (i.e. if it is a data type that can possibly and efficiently be assigned by several threads). In this context, built-in data types as well as complex numbers are non-SMP-assignable, whereas several vector and matrix types (as for instance DynamicVector and DynamicMatrix) can be SMP-assignable. If the type is SMP-assignable, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsSparseElement< T >
 Compile time check whether the given type is a sparse element type.This type trait class tests whether or not the given type Type is a Blaze sparse element type, i.e. if the type implements the sparse element concept by providing a value() and an index() member function. In order to qualify as a valid sparse element type, the given type has to derive (publicly or privately) from the SparseElement base class. In case the given type is a valid sparse element, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsSparseMatrix< T >
 Compile time check for sparse matrix types.This type trait tests whether or not the given template parameter is a sparse, N-dimensional matrix type. In case the type is a sparse matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsSparseVector< T >
 Compile time check for sparse vector types.This type trait tests whether or not the given template parameter is a sparse, N-dimensional vector type. In case the type is a sparse vector type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsSquare< T >
 Compile time check for square matrices.This type trait tests whether or not the given template parameter is a square matrix type (i.e. a matrix type that is guaranteed to be square at compile time). In case the type is a square matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsStrictlyLower< T >
 Compile time check for strictly lower triangular matrices.This type trait tests whether or not the given template parameter is a strictly lower triangular matrix type (i.e. a matrix type that is guaranteed to be strictly lower triangular at compile time). In case the type is a strictly lower triangular matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsStrictlyTriangular< T >
 Compile time check for strictly triangular matrix types.This type trait tests whether or not the given template parameter is a strictly lower or upper triangular matrix type. In case the type is a triangular matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise yes is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsStrictlyUpper< T >
 Compile time check for strictly upper triangular matrices.This type trait tests whether or not the given template parameter is a strictly upper triangular matrix type (i.e. a matrix type that is guaranteed to be strictly upper triangular at compile time). In case the type is a strictly upper triangular matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsSubExpr< T >
 Compile time check whether the given type is a subtraction expression template.This type trait class tests whether or not the given type Type is a subtraction expression template (i.e. an expression representing a vector subtraction or a matrix subtraction). In order to qualify as a valid subtraction expression template, the given type has to derive (publicly or privately) from the SubExpr base class. In case the given type is a valid subtraction expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsSubmatrix< T >
 Compile time check for submatrices.This type trait tests whether or not the given template parameter is a submatrix (i.e. dense or sparse submatrix). In case the type is a submatrix, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
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. dense or sparse subvector). In case the type is a subvector, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsSymmetric< T >
 Compile time check for symmetric matrices.This type trait tests whether or not the given template parameter is a symmetric matrix type (i.e. a matrix type that is guaranteed to be symmetric at compile time). In case the type is a symmetric matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsTemporary< T >
 Compile time check whether the given type is a temporary vector or matrix type.This type trait class tests whether the given type is a temporary vector or matrix type, i.e. can be used for a temporary vector or matrix. In case the given type can be used as temporary, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsTransExpr< T >
 Compile time check whether the given type is a transposition expression template.This type trait class tests whether or not the given type Type is a transposition expression template (i.e. an expression representing a vector transposition or a matrix transposition). In order to qualify as a valid transposition expression template, the given type has to derive (publicly or privately) from the TransExpr base class. In case the given type is a valid transposition expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsTriangular< T >
 Compile time check for triangular matrix types.This type trait tests whether or not the given template parameter is a lower or upper triangular matrix type. In case the type is a triangular matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise yes is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsTVecMatMultExpr< T >
 Compile time check whether the given type is a vector/matrix multiplication expression template.This type trait class tests whether or not the given type Type is a vector/matrix multiplication expression template. In order to qualify as a valid vector/matrix multiplication expression template, the given type has to derive (publicly or privately) from the TVecMatMultExpr base class. In case the given type is a valid vector/matrix multiplication expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsUniLower< T >
 Compile time check for lower unitriangular matrices.This type trait tests whether or not the given template parameter is a lower unitriangular matrix type (i.e. a matrix type that is guaranteed to be lower unitriangular at compile time). In case the type is a lower unitriangular matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsUniTriangular< T >
 Compile time check for unitriangular matrix types.This type trait tests whether or not the given template parameter is a lower or upper unitriangular matrix type. In case the type is an unitriangular matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise yes is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsUniUpper< T >
 Compile time check for upper unitriangular matrices.This type trait tests whether or not the given template parameter is an upper unitriangular matrix type (i.e. a matrix type that is guaranteed to be upper unitriangular at compile time). In case the type is an upper unitriangular matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsUpper< T >
 Compile time check for upper triangular matrices.This type trait tests whether or not the given template parameter is an upper triangular matrix type (i.e. a matrix type that is guaranteed to be upper triangular at compile time). This also includes upper unitriangular and strictly upper triangular matrices. In case the type is an upper triangular matrix type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecAbsExpr< T >
 Compile time check whether the given type is a vector absolute value expression template.This type trait class tests whether or not the given type Type is a vector absolute value expression template. In order to qualify as a valid vector absolute value expression template, the given type has to derive (publicly or privately) from the VecAbsExpr base class. In case the given type is a valid vector absolute value expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecConjExpr< T >
 Compile time check whether the given type is a vector complex conjugate expression template.This type trait class tests whether or not the given type Type is a vector complex conjugate expression template. In order to qualify as a valid vector complex conjugate expression template, the given type has to derive (publicly or privately) from the VecConjExpr base class. In case the given type is a valid vector complex conjugate expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecEvalExpr< T >
 Compile time check whether the given type is a vector evaluation expression template.This type trait class tests whether or not the given type Type is a vector evaluation expression template. In order to qualify as a valid vector evaluation expression template, the given type has to derive (publicly or privately) from the VecEvalExpr base class. In case the given type is a valid vector evaluation expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecImagExpr< T >
 Compile time check whether the given type is a vector imaginary part expression template.This type trait class tests whether or not the given type Type is a vector imaginary part expression template. In order to qualify as a valid vector imaginary part expression template, the given type has to derive (publicly or privately) from the VecImagExpr base class. In case the given type is a valid vector imaginary part expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecRealExpr< T >
 Compile time check whether the given type is a vector real part expression template.This type trait class tests whether or not the given type Type is a vector real part expression template. In order to qualify as a valid vector real part expression template, the given type has to derive (publicly or privately) from the VecRealExpr base class. In case the given type is a valid vector real part expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecScalarDivExpr< T >
 Compile time check whether the given type is a vector/scalar division expression template.This type trait class tests whether or not the given type Type is a vector/scalar division expression template. In order to qualify as a valid vector/scalar division expression template, the given type has to derive (publicly or privately) from the VecScalarDivExpr base class. In case the given type is a valid vector/scalar division expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecScalarMultExpr< T >
 Compile time check whether the given type is a vector/scalar multiplication expression template.This type trait class tests whether or not the given type Type is a vector/scalar multiplication expression template. In order to qualify as a valid vector/scalar multiplication expression template, the given type has to derive (publicly or privately) from the VecScalarMultExpr base class. In case the given type is a valid vector/scalar multiplication expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecSerialExpr< T >
 Compile time check whether the given type is a vector serial evaluation expression template.This type trait class tests whether or not the given type Type is a vector serial evaluation expression template. In order to qualify as a valid vector serial evaluation expression template, the given type has to derive (publicly or privately) from the VecSerialExpr base class. In case the given type is a valid vector serial evaluation expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVector< T >
 Compile time check for vector types.This type trait tests whether or not the given template parameter is a N-dimensional dense or sparse vector type. In case the type is a vector type, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecTransExpr< T >
 Compile time check whether the given type is a vector transposition expression template.This type trait class tests whether or not the given type Type is a vector transposition expression template. In order to qualify as a valid vector transposition expression template, the given type has to derive (publicly or privately) from the VecTransExpr base class. In case the given type is a valid vector transposition expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecTVecMultExpr< T >
 Compile time check whether the given type is an outer product expression template.This type trait class tests whether or not the given type Type is an outer product expression template (i.e. an expression representing the multiplication between a column vector and a row vector). In order to qualify as a valid outer product expression template, the given type has to derive (publicly or privately) from the VecTVecMultExpr base class. In case the given type is a valid outer product expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecVecAddExpr< T >
 Compile time check whether the given type is a vector/vector addition expression template.This type trait class tests whether or not the given type Type is a vector/vector addition expression template. In order to qualify as a valid vector addition expression template, the given type has to derive (publicly or privately) from the VecVecAddExpr base class. In case the given type is a valid vector addition expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecVecMultExpr< T >
 Compile time check whether the given type is a vector/vector multiplication expression template.This type trait class tests whether or not the given type Type is a vector/vector multiplication expression template. In order to qualify as a valid vector multiplication expression template, the given type has to derive (publicly or privately) from the VecVecMultExpr base class. In case the given type is a valid vector multiplication expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsVecVecSubExpr< T >
 Compile time check whether the given type is a vector/vector subtraction expression template.This type trait class tests whether or not the given type Type is a vector/vector subtraction expression template. In order to qualify as a valid vector subtraction expression template, the given type has to derive (publicly or privately) from the VecVecSubExpr base class. In case the given type is a valid vector subtraction expression template, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::IsView< T >
 Compile time check for views.This type trait tests whether or not the given template parameter is a view (i.e. subvector, submatrix, row, column, ...). In case the type is a view, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::RemoveAdaptor< T >
 Removal of top level adaptor types.In case the given type is an adaptor type (SymmetricMatrix, LowerMatrix, UpperMatrix, ...), the RemoveAdaptor type trait removes the adaptor and extracts the contained general matrix type. Else the given type is returned as is. Note that cv-qualifiers are preserved. More...
 
struct  blaze::RequiresEvaluation< T >
 Compile time check to query the requirement to evaluate an expression.Via this type trait it is possible to determine whether a given vector or matrix expression type requires an intermediate evaluation in the context of a compound expression. In case the given type requires an evaluation, the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...
 
struct  blaze::Rows< T >
 Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of rows of the given matrix type at compile time. In case the given type T is a matrix type with a fixed number of rows (e.g. StaticMatrix), the value member constant is set to the according number of rows. In all other cases, value is set to 0. More...
 
struct  blaze::Size< T >
 Compile time evaluation of the size of a vector.The Size type trait evaluates the size of the given vector type at compile time. In case the given type T is a vector type with a fixed size (e.g. StaticVector), the value member constant is set to the according size. In all other cases, value is set to 0. More...
 
struct  blaze::StorageOrder< T >
 Evaluation of the storage order of a given matrix type.Via this type trait it is possible to evaluate the storage order of a given matrix type. In case the given type is a row-major matrix type the nested boolean value is set to rowMajor, in case it is a column-major matrix type it is set to columnMajor. If the given type is not a matrix type a compilation error is created. More...
 
struct  blaze::TransposeFlag< T >
 Evaluation of the transpose flag of a given matrix type.Via this type trait it is possible to evaluate the transpose flag of a given vector type. In case the given type is a row vector type the nested boolean value is set to rowVector, in case it is a column vector type it is set to columnVector. If the given type is not a vector type a compilation error is created. More...
 
struct  blaze::UnderlyingBuiltin< T >
 Evaluation of the underlying builtin element type of a given data type.Via this type trait it is possible to evaluate the underlying fundamental element type at the heart of a given data type. Examples: More...
 
struct  blaze::UnderlyingElement< T >
 Evaluation of the element type of a given data type.Via this type trait it is possible to evaluate the element type of a given data type. Examples: More...
 
struct  blaze::UnderlyingNumeric< T >
 Evaluation of the underlying numeric element type of a given data type.Via this type trait it is possible to evaluate the underlying numeric (fundamental or complex) element type at the heart of a given data type. Examples: More...
 

Macros

#define BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT(TYPE_TRAIT_NAME, MEMBER_NAME, FALLBACK_TYPE)
 Macro for the creation of a type trait to acquire member types.This macro creates the definition of a type trait TYPE_TRAIT_NAME that can determine a specified member type of a given type. The first macro parameter TYPE_TRAIT_NAME specifies the resulting name of the type trait. The second parameter MEMBER_NAME specifies the name of the member type to be acquired and the third parameter FALLBACK_TYPE specifies the type to acquire in case the given type doesn't contain the specified member type. The following example demonstrates the use of the macro and the resulting type trait: More...
 
#define BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT(TYPE_TRAIT_NAME, MEMBER_NAME)
 Macro for the creation of a type trait for compile time checks for member data and functions.This macro creates the definition of a type trait TYPE_TRAIT_NAME that can determine whether the specified element MEMBER_NAME is a data or function member of a given type. The following example demonstrates the use of the macro and the resulting type trait: More...
 
#define BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT(TYPE_TRAIT_NAME, MEMBER_NAME)
 Macro for the creation of a type trait for compile time checks for member types.This macro creates the definition of a type trait TYPE_TRAIT_NAME that can determine whether the specified element MEMBER_NAME is a type member of a given type. The following example demonstrates the use of the macro and the resulting type trait: More...
 
#define BLAZE_CREATE_HAS_MEMBER_TYPE_TRAIT(TYPE_TRAIT_NAME, MEMBER_NAME)
 Macro for the creation of a type trait for compile time checks for members.This macro creates the definition of a type trait TYPE_TRAIT_NAME that can determine whether the specified element MEMBER_NAME is a data, function, or type member of a given type. The following example demonstrates the use of the macro and the resulting type trait: More...
 

Detailed Description

Macro Definition Documentation

#define BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT (   TYPE_TRAIT_NAME,
  MEMBER_NAME,
  FALLBACK_TYPE 
)
Value:
\
template< typename Type1233 > \
struct TYPE_TRAIT_NAME \
{ \
private: \
struct SUCCESS { typedef typename Type1233::MEMBER_NAME Type; }; \
struct FAILURE { typedef FALLBACK_TYPE Type; }; \
BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT( LOCAL_TYPE_TRAIT, MEMBER_NAME ); \
\
public: \
, SUCCESS \
, FAILURE \
>::Type::Type Type; \
};
Compile time type selection.The If class template selects one of the two given types T2 and T3 depend...
Definition: If.h:112
#define BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT(TYPE_TRAIT_NAME, MEMBER_NAME)
Macro for the creation of a type trait for compile time checks for member types.This macro creates th...
Definition: HasMember.h:187

Macro for the creation of a type trait to acquire member types.This macro creates the definition of a type trait TYPE_TRAIT_NAME that can determine a specified member type of a given type. The first macro parameter TYPE_TRAIT_NAME specifies the resulting name of the type trait. The second parameter MEMBER_NAME specifies the name of the member type to be acquired and the third parameter FALLBACK_TYPE specifies the type to acquire in case the given type doesn't contain the specified member type. The following example demonstrates the use of the macro and the resulting type trait:

1 struct MyType1 {
2  typedef float ElementType;
3 };
4 
5 struct MyType2 {
6  typedef double ElementType;
7 };
8 
9 struct MyType3 {};
10 
11 BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT( GetElementType, ElementType, int );
12 
13 GetElementType<MyType1>::Type // Results in 'float'
14 GetElementType<MyType2>::Type // Results in 'double'
15 GetElementType<MyType3>::Type // Results in 'int'

The macro results in the definition of a new class with the specified name TYPE_TRAIT_NAME within the current namespace. This may cause name collisions with any other entity called TYPE_TRAIT_NAME in the same namespace. Therefore it is advisable to create the type trait as locally as possible to minimize the probability of name collisions. Note however that the macro cannot be used within function scope since a template declaration cannot appear at block scope.

Please note that due to an error in the Intel compilers prior to version 14.0 the type trait generated from this macro does NOT work properly, i.e. will not correctly determine whether the specified element is a type member of the given type!

#define BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT (   TYPE_TRAIT_NAME,
  MEMBER_NAME 
)

Macro for the creation of a type trait for compile time checks for member data and functions.This macro creates the definition of a type trait TYPE_TRAIT_NAME that can determine whether the specified element MEMBER_NAME is a data or function member of a given type. The following example demonstrates the use of the macro and the resulting type trait:

1 class MyType {
2  public:
3  void publicCompute();
4 
5  private:
6  void privateCompute();
7 
8  int value_;
9 };
10 
11 BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT( HasPublicCompute , publicCompute );
12 BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT( HasPrivateCompute, privateCompute );
13 BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT( HasValue , value_ );
14 
15 BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT( HasEvaluate , evalute );
16 BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT( HasDetermine, determine );
17 BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT( HasData , data_ );
18 
19 HasPublicCompute<MyType>::value // Evaluates to 1
20 HasPrivateCompute<MyType>::Type // Results in TrueType
21 HasValue<MyType> // Is derived from TrueType
22 HasEvaluate<MyType>::value // Evaluates to 0
23 HasDetermine<MyType>::Type // Results in FalseType
24 HasData<MyType> // Is derived from FalseType

The macro results in the definition of a new class with the specified name TYPE_TRAIT_NAME within the current namespace. This may cause name collisions with any other entity called TYPE_TRAIT_NAME in the same namespace. Therefore it is advisable to create the type trait as locally as possible to minimize the probability of name collisions. Note however that the macro cannot be used within function scope since a template declaration cannot appear at block scope.

#define BLAZE_CREATE_HAS_MEMBER_TYPE_TRAIT (   TYPE_TRAIT_NAME,
  MEMBER_NAME 
)
Value:
\
template< typename Type1232 > \
struct TYPE_TRAIT_NAME##HELPER \
{ \
private: \
BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT( LOCAL_TYPE_TRAIT_1, MEMBER_NAME ); \
BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT( LOCAL_TYPE_TRAIT_2, MEMBER_NAME ); \
\
public: \
enum { value = LOCAL_TYPE_TRAIT_1<Type1232>::value || LOCAL_TYPE_TRAIT_2<Type1232>::value }; \
}; \
\
template< typename Type1232 > \
struct TYPE_TRAIT_NAME : public TYPE_TRAIT_NAME##HELPER<Type1232>::Type \
{ \
public: \
enum { value = TYPE_TRAIT_NAME##HELPER<Type1232>::value }; \
typedef typename TYPE_TRAIT_NAME##HELPER<Type1232>::Type Type; \
};
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59

Macro for the creation of a type trait for compile time checks for members.This macro creates the definition of a type trait TYPE_TRAIT_NAME that can determine whether the specified element MEMBER_NAME is a data, function, or type member of a given type. The following example demonstrates the use of the macro and the resulting type trait:

1 class MyType {
2  public:
3  void publicCompute();
4 
5  protected:
6  typedef float ProtectedType;
7 
8  private:
9  int value_;
10 };
11 
12 BLAZE_CREATE_HAS_MEMBER_TYPE_TRAIT( HasCompute , publicCompute );
13 BLAZE_CREATE_HAS_MEMBER_TYPE_TRAIT( HasProtectedType, ProtectedType );
14 BLAZE_CREATE_HAS_MEMBER_TYPE_TRAIT( HasValue , value_ );
15 
16 BLAZE_CREATE_HAS_MEMBER_TYPE_TRAIT( HasPublicType, PublicType );
17 BLAZE_CREATE_HAS_MEMBER_TYPE_TRAIT( HasDetermine , determine );
18 BLAZE_CREATE_HAS_MEMBER_TYPE_TRAIT( HasData , data_ );
19 
20 HasCompute<MyType>::value // Evaluates to 1
21 HasProtectedType<MyType>::Type // Results in TrueType
22 HasValue<MyType> // Is derived from TrueType
23 HasPublicType<MyType>::value // Evaluates to 0
24 HasDetermine<MyType>::Type // Results in FalseType
25 HasData<MyType> // Is derived from FalseType

The macro results in the definition of a new class with the specified name TYPE_TRAIT_NAME within the current namespace. This may cause name collisions with any other entity called TYPE_TRAIT_NAME in the same namespace. Therefore it is advisable to create the type trait as locally as possible to minimize the probability of name collisions. Note however that the macro cannot be used within function scope since a template declaration cannot appear at block scope.

Please note that due to an error in the Intel compilers prior to version 14.0 the type trait generated from this macro does NOT work properly, i.e. will not correctly determine whether the specified element is a type member of the given type!

#define BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT (   TYPE_TRAIT_NAME,
  MEMBER_NAME 
)

Macro for the creation of a type trait for compile time checks for member types.This macro creates the definition of a type trait TYPE_TRAIT_NAME that can determine whether the specified element MEMBER_NAME is a type member of a given type. The following example demonstrates the use of the macro and the resulting type trait:

1 class MyType {
2  public:
3  typedef int PublicType;
4 
5  protected:
6  typedef float ProtectedType;
7 
8  private:
9  typedef double PrivateType;
10 };
11 
12 BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT( HasPublicType , PublicType );
13 BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT( HasProtectedType, ProtectedType );
14 BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT( HasPrivateType , PrivateType );
15 
16 BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT( HasValueType , ValueType );
17 BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT( HasElementType, ElementTypeType );
18 BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT( HasDataType , DataType );
19 
20 HasPublicType<MyType>::value // Evaluates to 1
21 HasProtectedType<MyType>::Type // Results in TrueType
22 HasPrivateType<MyType> // Is derived from TrueType
23 HasValueType<MyType>::value // Evaluates to 0
24 HasElementType<MyType>::Type // Results in FalseType
25 HasDataType<MyType> // Is derived from FalseType

The macro results in the definition of a new class with the specified name TYPE_TRAIT_NAME within the current namespace. This may cause name collisions with any other entity called TYPE_TRAIT_NAME in the same namespace. Therefore it is advisable to create the type trait as locally as possible to minimize the probability of name collisions. Note however that the macro cannot be used within function scope since a template declaration cannot appear at block scope.

Please note that due to an error in the Intel compilers prior to version 14.0 the type trait generated from this macro does NOT work properly, i.e. will not correctly determine whether the specified element is a type member of the given type!