ForEachExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_FOREACHEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_FOREACHEXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
57 #include <blaze/util/InvalidType.h>
58 #include <blaze/util/mpl/If.h>
59 #include <blaze/util/mpl/Or.h>
64 
65 
66 namespace blaze {
67 
68 //=================================================================================================
69 //
70 // CLASS DEFINITION
71 //
72 //=================================================================================================
73 
74 //*************************************************************************************************
84 template< typename T // Type of the forEach operand
85  , typename OP > // Type of the custom operation
87 {
88  private:
89  //**struct Failure******************************************************************************
91  struct Failure { using Type = INVALID_TYPE; };
93  //**********************************************************************************************
94 
95  //**********************************************************************************************
97  using Tmp = If_< IsMatrix<T>
102  , If_< IsRowMajorMatrix<T>
110  , If_< IsRowVector<T>
113  , Failure > >;
115  //**********************************************************************************************
116 
117  public:
118  //**********************************************************************************************
120  using Type = typename If_< Or< IsConst<T>, IsVolatile<T>, IsReference<T> >
122  , Tmp >::Type;
124  //**********************************************************************************************
125 };
126 //*************************************************************************************************
127 
128 
129 //*************************************************************************************************
142 template< typename T // Type of the forEach operand
143  , typename OP > // Type of the custom operation
145 //*************************************************************************************************
146 
147 } // namespace blaze
148 
149 #endif
Evaluation of the expression type of a dense vector custom operation.Via this type trait it is possib...
Definition: TDVecForEachExprTrait.h:75
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:75
Header file for the IsRowVector type trait.
Evaluation of the expression type of a sparse vector for-each operation.Via this type trait it is pos...
Definition: SVecForEachExprTrait.h:75
Header file for the IsVolatile type trait.
Header file for the IsMatrix type trait.
Header file for the Decay type trait.
Header file for the SVecForEachExprTrait class template.
Header file for the DVecForEachExprTrait class template.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Evaluation of the return type of a forEach expression.Via this type trait it is possible to evaluate ...
Definition: ForEachExprTrait.h:86
Header file for the Or class template.
Evaluation of the expression type of a sparse matrix for-each operation.Via this type trait it is pos...
Definition: TSMatForEachExprTrait.h:75
Evaluation of the expression type of a sparse vector for-each operation.Via this type trait it is pos...
Definition: TSVecForEachExprTrait.h:75
Header file for the TSMatForEachExprTrait class template.
Evaluation of the expression type of a dense matrix custom operation.Via this type trait it is possib...
Definition: TDMatForEachExprTrait.h:75
Header file for the TDMatForEachExprTrait class template.
Header file for the IsVector type trait.
Header file for the IsDenseMatrix type trait.
Header file for the IsConst type trait.
Utility type for generic codes.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
Evaluation of the expression type of a dense vector custom operation.Via this type trait it is possib...
Definition: DVecForEachExprTrait.h:75
Header file for the IsReference type trait.
Header file for the IsDenseVector type trait.
Header file for the SMatForEachExprTrait class template.
Header file for the IsRowMajorMatrix type trait.
Header file for the DMatForEachExprTrait class template.
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:75
Evaluation of the expression type of a dense matrix custom operation.Via this type trait it is possib...
Definition: DMatForEachExprTrait.h:75
typename ForEachExprTrait< T, OP >::Type ForEachExprTrait_
Auxiliary alias declaration for the ForEachExprTrait class template.The ForEachExprTrait_ alias decla...
Definition: ForEachExprTrait.h:144
Header file for the TSVecForEachExprTrait class template.
Evaluation of the expression type of a sparse matrix for-each operation.Via this type trait it is pos...
Definition: SMatForEachExprTrait.h:75
Header file for the TDVecForEachExprTrait class template.