Blaze 3.9
Classes | Typedefs | Variables
Meta-Programming Language

Classes

struct  blaze::Bools<... >
 Auxiliary tool for unwrapping a pack of variadic boolean values. More...
 
struct  blaze::If< Condition >
 Compile time type selection. More...
 

Typedefs

template<typename T1 , typename T2 , typename... Ts>
using blaze::And_t = Bool_t< IsSame< Bools< true, T1::value, T2::value,(Ts::value)... >, Bools< T1::value, T2::value,(Ts::value)..., true > >::value >
 Compile time logical AND evaluation. More...
 
template<typename T1 , typename T2 >
using blaze::Equal_t = Bool_t<(T1::value==T2::value) >
 Compile time type comparison. More...
 
template<typename T1 , typename T2 >
using blaze::Greater_t = Bool_t<(T1::value > T2::value) >
 Compile time type comparison. More...
 
template<typename T1 , typename T2 >
using blaze::Less_t = Bool_t<(T1::value< T2::value) >
 Compile time type comparison. More...
 
template<typename T1 , typename T2 >
using blaze::Max_t = If_t< Less_t< T1, T2 >::value, T2, T1 >
 Compile time value evaluation. More...
 
template<typename T1 , typename T2 >
using blaze::Min_t = If_t< Less_t< T1, T2 >::value, T1, T2 >
 Compile time value evaluation. More...
 
template<typename T1 , typename T2 >
using blaze::Minus_t = IntegralConstant< CommonType_t< typename T1::ValueType, typename T2::ValueType >,(T1::value - T2::value) >
 Compile time integral subtraction. More...
 
template<typename T1 , typename T2 >
using blaze::Modulo_t = IntegralConstant< CommonType_t< typename T1::ValueType, typename T2::ValueType >,(T1::value % T2::value) >
 Compile time integral modulo operation. More...
 
template<typename T1 , typename T2 , typename... Ts>
using blaze::Nand_t = Bool_t< !IsSame< Bools< true, T1::value, T2::value,(Ts::value)... >, Bools< T1::value, T2::value,(Ts::value)..., true > >::value >
 Compile time logical NAND evaluation. More...
 
template<typename T1 , typename T2 , typename... Ts>
using blaze::Nor_t = Bool_t< IsSame< Bools< false, T1::value, T2::value,(Ts::value)... >, Bools< T1::value, T2::value,(Ts::value)..., false > >::value >
 Compile time logical 'not or' evaluation. More...
 
template<typename C >
using blaze::Not_t = Bool_t< !C::value >
 Compile time type negation. More...
 
template<typename T1 , typename T2 , typename... Ts>
using blaze::Or_t = Bool_t< !IsSame< Bools< false, T1::value, T2::value,(Ts::value)... >, Bools< T1::value, T2::value,(Ts::value)..., false > >::value >
 Compile time logical OR evaluation. More...
 
template<typename T1 , typename T2 >
using blaze::Plus_t = IntegralConstant< CommonType_t< typename T1::ValueType, typename T2::ValueType >,(T1::value+T2::value) >
 Compile time integral addition. More...
 
template<typename T1 , typename T2 >
using blaze::Times_t = IntegralConstant< CommonType_t< typename T1::ValueType, typename T2::ValueType >,(T1::value *T2::value) >
 Compile time integral multiplication. More...
 
template<typename T1 , typename T2 >
using blaze::Xor_t = Bool_t<(T1::value ^ T2::value) >
 Compile time bitwise XOR evaluation. More...
 

Variables

template<typename T1 , typename T2 , typename... Ts>
constexpr bool blaze::And_v = And_t<T1,T2,Ts...>::value
 Auxiliary variable template for the And_t alias. More...
 
template<typename T1 , typename T2 >
constexpr bool blaze::Equal_v = Equal_t<T1,T2>::value
 Auxiliary variable template for the Equal_t alias. More...
 
template<typename T1 , typename T2 >
constexpr bool blaze::Greater_v = Greater_t<T1,T2>::value
 Auxiliary variable template for the Greater_t alias. More...
 
template<typename T1 , typename T2 >
constexpr bool blaze::Less_v = Less_t<T1,T2>::value
 Auxiliary variable template for the Less_t alias. More...
 
template<typename T1 , typename T2 , typename... Ts>
constexpr bool blaze::Nand_v = Nand_t<T1,T2,Ts...>::value
 Auxiliary variable template for the Nand_t alias. More...
 
template<typename T1 , typename T2 , typename... Ts>
constexpr bool blaze::Nor_v = Nor_t<T1,T2,Ts...>::value
 Auxiliary variable template for the Nor_t alias. More...
 
template<typename C >
constexpr bool blaze::Not_v = Not_t<C>::value
 Auxiliary variable template for the Not_t alias. More...
 
template<typename T1 , typename T2 , typename... Ts>
constexpr bool blaze::Or_v = Or_t<T1,T2,Ts...>::value
 Auxiliary variable template for the Or_t alias. More...
 
template<typename T1 , typename T2 >
constexpr bool blaze::Xor_v = Xor_t<T1,T2>::value
 Auxiliary variable template for the Xor_t alias. More...
 

Detailed Description

Typedef Documentation

◆ And_t

template<typename T1 , typename T2 , typename... Ts>
using blaze::And_t = typedef Bool_t< IsSame< Bools< true, T1::value, T2::value, (Ts::value)... > , Bools< T1::value, T2::value, (Ts::value)..., true > >::value >

Compile time logical AND evaluation.

The And_t alias template performs at compile time a logical AND ('&&') evaluation of at least two compile time conditions:

using namespace blaze;
using Type = int;
And_t< IsIntegral<Type>, IsSigned<Type> >::value // Evaluates to 1
And_t< IsFloat<Type> , IsDouble<Type> >::value // Evaluates to 0
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
Compile time check for double precision floating point types.
Definition: IsDouble.h:76
Compile time check for floating point data types.
Definition: IsFloatingPoint.h:77
Compile time check for signed data types.
Definition: IsSigned.h:79

◆ Equal_t

template<typename T1 , typename T2 >
using blaze::Equal_t = typedef Bool_t< ( T1::value == T2::value ) >

Compile time type comparison.

The Equal_t alias template compares the two given types using the equality operator ('=='). In case T1::value is equal to T2::value, the nested value member is set to true. Otherwise it is set to false.

using namespace blaze;
Equal_t< Int_t<3>, Int_t<3> >::value // Evaluates to true
Equal_t< Int_t<5>, Long_t<5> >::value // Evaluates to true
Equal_t< Long_t<0>, Int_t<4> >::value // Evaluates to false

◆ Greater_t

template<typename T1 , typename T2 >
using blaze::Greater_t = typedef Bool_t< ( T1::value > T2::value ) >

Compile time type comparison.

The Greater_t alias template compares the two given types using the greater-than operator ('>'). In case T1::value is greater than T2::value, the nested value member is set to 1. Otherwise it is set to 0.

using namespace blaze;
Greater_t< Int_t<5> , Int_t<2> >::value // Evaluates to true
Greater_t< Int_t<5> , Long_t<2> >::value // Evaluates to true
Greater_t< Long_t<2>, Int_t<2> >::value // Evaluates to false
Greater_t< Int_t<2> , Long_t<5> >::value // Evaluates to false
Greater_t< Int_t<5> , Int_t<2> >::ValueType // Results in bool

◆ Less_t

template<typename T1 , typename T2 >
using blaze::Less_t = typedef Bool_t< ( T1::value < T2::value ) >

Compile time type comparison.

The Less_t alias template compares the two given types using the less-than operator ('<'). In case T1::value is less than T2::value, the nested value member is set to 1. Otherwise it is set to 0.

using namespace blaze;
Less_t< Int_t<2> , Int_t<5> >::value // Evaluates to true
Less_t< Long_t<2>, Int_t<5> >::value // Evaluates to true
Less_t< Int_t<2> , Long_t<2> >::value // Evaluates to false
Less_t< Long_t<5>, Int_t<2> >::value // Evaluates to false
Less_t< Int_t<2>, Int_t<5> >::ValueType // Results in bool

◆ Max_t

template<typename T1 , typename T2 >
using blaze::Max_t = typedef If_t< Less_t<T1,T2>::value, T2, T1 >

Compile time value evaluation.

The Max_t alias template selects the larger of the two given template arguments T1 and T2. In order for Max_t to be able to determine the larger type, both arguments are required to have a nested member value. The result of the minimum operation can be accessed via the nested member value, the resulting type is available via the nested type ValueType.

blaze::Max_t< Int_t<3> , Int_t<2> >::value // Results in 3
blaze::Max_t< Long_t<3>, Int_t<2> >::ValueType // Results in long
blaze::Max_t< Int_t<3> , Long_t<2> >::ValueType // Results in int
If_t< Less_t< T1, T2 >::value, T2, T1 > Max_t
Compile time value evaluation.
Definition: Max.h:73

◆ Min_t

template<typename T1 , typename T2 >
using blaze::Min_t = typedef If_t< Less_t<T1,T2>::value, T1, T2 >

Compile time value evaluation.

The Min_t alias template selects the smaller of the two given template arguments T1 and T2. In order for Min_t to be able to determine the smaller type, both arguments are required to have a nested member value. The result of the minimum operation can be accessed via the nested member value, the resulting type is available via the nested type ValueType.

blaze::Min_t< Int_t<3> , Int_t<2> >::value // Results in 2
blaze::Min_t< Long_t<3>, Int_t<2> >::ValueType // Results in int
blaze::Min_t< Int_t<3> , Long_t<2> >::ValueType // Results in long
If_t< Less_t< T1, T2 >::value, T1, T2 > Min_t
Compile time value evaluation.
Definition: Min.h:73

◆ Minus_t

template<typename T1 , typename T2 >
using blaze::Minus_t = typedef IntegralConstant< CommonType_t< typename T1::ValueType, typename T2::ValueType > , ( T1::value - T2::value ) >

Compile time integral subtraction.

The Minus_t alias template returns the difference of the two given template arguments T1 and T2. In order for Minus_t to be able to subtract the two types, both arguments are required to have a nested member value. The result of the subtraction can be accessed via the nested member value, the resulting type is available via the nested type ValueType.

blaze::Minus_t< Int_t<3> , Int_t<2> >::value // Results in 5
blaze::Minus_t< Long_t<3>, Int_t<2> >::ValueType // Results in long
blaze::Minus_t< Int_t<3> , Long_t<2> >::ValueType // Results in long

◆ Modulo_t

template<typename T1 , typename T2 >
using blaze::Modulo_t = typedef IntegralConstant< CommonType_t< typename T1::ValueType, typename T2::ValueType > , ( T1::value % T2::value ) >

Compile time integral modulo operation.

The Modulo_t alias template returns the result of a modulo operation between the two given template arguments T1 and T2. In order for Modulo_t to be able to perform the operation with the given two types, both arguments are required to have a nested member value. The result of the modulo operation can be accessed via the nested member value, the resulting type is available via the nested type ValueType.

blaze::Modulo_t< Int_t<3> , Int_t<2> >::value // Results in 1
blaze::Modulo_t< Long_t<3>, Int_t<2> >::ValueType // Results in long
blaze::Modulo_t< Int_t<3> , Long_t<2> >::ValueType // Results in long

◆ Nand_t

template<typename T1 , typename T2 , typename... Ts>
using blaze::Nand_t = typedef Bool_t< !IsSame< Bools< true, T1::value, T2::value, (Ts::value)... > , Bools< T1::value, T2::value, (Ts::value)..., true > >::value >

Compile time logical NAND evaluation.

The Nand_t alias template performs at compile time a logical NAND evaluation of at least two compile time conditions:

using namespace blaze;
using Type = int;
Nand_t< IsFloat<Type> , IsDouble<Type> >::value // Evaluates to 1
Nand_t< IsIntegral<Type>, IsSigned<Type> >::value // Evaluates to 0

◆ Nor_t

template<typename T1 , typename T2 , typename... Ts>
using blaze::Nor_t = typedef Bool_t< IsSame< Bools< false, T1::value, T2::value, (Ts::value)... > , Bools< T1::value, T2::value, (Ts::value)..., false > >::value >

Compile time logical 'not or' evaluation.

The Nor_t alias template performs at compile time a logical 'not or' evaluation of at least two compile time conditions:

using namespace blaze;
using Type = int;
Nor_t< IsFloat<Type> , IsDouble<Type> >::value // Evaluates to 1
Nor_t< IsIntegral<Type>, IsSigned<Type> >::value // Evaluates to 0

◆ Not_t

template<typename C >
using blaze::Not_t = typedef Bool_t< !C::value >

Compile time type negation.

The Not_t alias template negates the given compile time condition. In case the given condition would evaluate to true, the nested member enumeration is set to false and vice versa:

using namespace blaze;
Not_t< IsIntegral<int> >::value // Evaluates to false
Not_t< IsDouble<int> >::value // Evaluates to true
Not_t< IsSigned<int> >::ValueType // Results in bool

◆ Or_t

template<typename T1 , typename T2 , typename... Ts>
using blaze::Or_t = typedef Bool_t< !IsSame< Bools< false, T1::value, T2::value, (Ts::value)... > , Bools< T1::value, T2::value, (Ts::value)..., false > >::value >

Compile time logical OR evaluation.

The Or_t alias template performs at compile time a logical OR ('||') evaluation of at least two compile time conditions:

using namespace blaze;
using Type = int;
Or_t< IsIntegral<Type>, IsSigned<Type> >::value // Evaluates to 1
Or_t< IsIntegral<Type>, IsFloatingPoint<Type> >::value // Evaluates to 1
Or_t< IsFloat<Type> , IsDouble<Type> >::value // Evaluates to 0

◆ Plus_t

template<typename T1 , typename T2 >
using blaze::Plus_t = typedef IntegralConstant< CommonType_t< typename T1::ValueType, typename T2::ValueType > , ( T1::value + T2::value ) >

Compile time integral addition.

The Plus_t alias template returns the sum of the two given template arguments T1 and T2. In order for Plus_t to be able to add the two types, both arguments are required to have a nested member value. The result of the addition can be accessed via the nested member value, the resulting type is available via the nested type ValueType.

blaze::Plus_t< Int_t<3> , Int_t<2> >::value // Results in 5
blaze::Plus_t< Long_t<3>, Int_t<2> >::ValueType // Results in long
blaze::Plus_t< Int_t<3> , Long_t<2> >::ValueType // Results in long

◆ Times_t

template<typename T1 , typename T2 >
using blaze::Times_t = typedef IntegralConstant< CommonType_t< typename T1::ValueType, typename T2::ValueType > , ( T1::value * T2::value ) >

Compile time integral multiplication.

The Times_t alias template returns the product of the two given template arguments T1 and T2. In order for Times_t to be able to multiply the two types, both arguments are required to have a nested member value. The result of the multiplication can be accessed via the nested member value, the resulting type is available via the nested type ValueType.

blaze::Times_t< Int_t<3> , Int_t<2> >::value // Results in 6
blaze::Times_t< Long_t<3>, Int_t<2> >::ValueType // Results in long
blaze::Times_t< Int_t<3> , Long_t<2> >::ValueType // Results in long

◆ Xor_t

template<typename T1 , typename T2 >
using blaze::Xor_t = typedef Bool_t< ( T1::value ^ T2::value ) >

Compile time bitwise XOR evaluation.

The Xor_t alias template performs at compile time a bitwise XOR evaluation of the two given compile time conditions:

using namespace blaze;
using Type = int;
Xor_t< IsSigned<Type> , IsUnsigned<Type> >::value // Evaluates to 1
Xor_t< IsSigned<Type> , IsIntegral<Type> >::value // Evaluates to 0
Compile time check for integral data types.
Definition: IsIntegral.h:77
Compile time check for unsigned data types.
Definition: IsUnsigned.h:79

Variable Documentation

◆ And_v

template<typename T1 , typename T2 , typename... Ts>
constexpr bool blaze::And_v = And_t<T1,T2,Ts...>::value
constexpr

Auxiliary variable template for the And_t alias.

The And_v variable template provides a convenient shortcut to access the nested value of the And_t alias. For instance, given the types T1 and T2 the following two statements are identical:

constexpr bool value1 = And_t<T1,T2>::value;
constexpr bool value2 = And_v<T1,T2>;

◆ Equal_v

template<typename T1 , typename T2 >
constexpr bool blaze::Equal_v = Equal_t<T1,T2>::value
constexpr

Auxiliary variable template for the Equal_t alias.

The Equal_v variable template provides a convenient shortcut to access the nested value of the Equal_t alias. For instance, given the types T1 and T2 the following two statements are identical:

constexpr bool value1 = Equal_t<T1,T2>::value;
constexpr bool value2 = Equal_v<T1,T2>;

◆ Greater_v

template<typename T1 , typename T2 >
constexpr bool blaze::Greater_v = Greater_t<T1,T2>::value
constexpr

Auxiliary variable template for the Greater_t alias.

The Greater_v variable template provides a convenient shortcut to access the nested value of the Greater_t alias. For instance, given the types T1 and T2 the following two statements are identical:

constexpr bool value1 = Greater_t<T1,T2>::value;
constexpr bool value2 = Greater_v<T1,T2>;

◆ Less_v

template<typename T1 , typename T2 >
constexpr bool blaze::Less_v = Less_t<T1,T2>::value
constexpr

Auxiliary variable template for the Less_t alias.

The Less_v variable template provides a convenient shortcut to access the nested value of the Less_t alias. For instance, given the types T1 and T2 the following two statements are identical:

constexpr bool value1 = Less_t<T1,T2>::value;
constexpr bool value2 = Less_v<T1,T2>;

◆ Nand_v

template<typename T1 , typename T2 , typename... Ts>
constexpr bool blaze::Nand_v = Nand_t<T1,T2,Ts...>::value
constexpr

Auxiliary variable template for the Nand_t alias.

The Nand_v variable template provides a convenient shortcut to access the nested value of the Nand_t alias. For instance, given the types T1 and T2 the following two statements are identical:

constexpr bool value1 = Nand_t<T1,T2>::value;
constexpr bool value2 = Nand_v<T1,T2>;

◆ Nor_v

template<typename T1 , typename T2 , typename... Ts>
constexpr bool blaze::Nor_v = Nor_t<T1,T2,Ts...>::value
constexpr

Auxiliary variable template for the Nor_t alias.

The Nor_v variable template provides a convenient shortcut to access the nested value of the Nor_t alias. For instance, given the types T1 and T2 the following two statements are identical:

constexpr bool value1 = Nor_t<T1,T2>::value;
constexpr bool value2 = Nor_v<T1,T2>;

◆ Not_v

template<typename C >
constexpr bool blaze::Not_v = Not_t<C>::value
constexpr

Auxiliary variable template for the Not_t alias.

The Not_v variable template provides a convenient shortcut to access the nested value of the Not_t alias. For instance, given the type C the following two statements are identical:

constexpr bool value1 = Not_t<C>::value;
constexpr bool value2 = Not_v<C>;

◆ Or_v

template<typename T1 , typename T2 , typename... Ts>
constexpr bool blaze::Or_v = Or_t<T1,T2,Ts...>::value
constexpr

Auxiliary variable template for the Or_t alias.

The Or_v variable template provides a convenient shortcut to access the nested value of the Or_t alias. For instance, given the types T1 and T2 the following two statements are identical:

constexpr bool value1 = Or_t<T1,T2>::value;
constexpr bool value2 = Or_t_v<T1,T2>;

◆ Xor_v

template<typename T1 , typename T2 >
constexpr bool blaze::Xor_v = Xor_t<T1,T2>::value
constexpr

Auxiliary variable template for the Xor_t alias.

The Xor_v variable template provides a convenient shortcut to access the nested value of the Xor_t alias. For instance, given the types T1 and T2 the following two statements are identical:

constexpr bool value1 = Xor_t<T1,T2>::value;
constexpr bool value2 = Xor_v<T1,T2>;