RealExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_REALEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_REALEXPRTRAIT_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>
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // CLASS DEFINITION
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
87 template< typename T > // Type of the real part operand
89 {
90  private:
91  //**struct Builtin******************************************************************************
93  template< typename ST >
94  struct Builtin { typedef T Type; };
96  //**********************************************************************************************
97 
98  //**struct Complex******************************************************************************
100  template< typename CT >
101  struct Complex { typedef typename CT::value_type Type; };
103  //**********************************************************************************************
104 
105  //**struct Failure******************************************************************************
107  struct Failure { typedef INVALID_TYPE Type; };
109  //**********************************************************************************************
110 
111  //**********************************************************************************************
113  typedef typename If< IsMatrix<T>
114  , typename If< IsDenseMatrix<T>
115  , typename If< IsRowMajorMatrix<T>
118  >::Type
119  , typename If< IsRowMajorMatrix<T>
122  >::Type
123  >::Type
124  , typename If< IsVector<T>
125  , typename If< IsDenseVector<T>
126  , typename If< IsRowVector<T>
129  >::Type
130  , typename If< IsRowVector<T>
133  >::Type
134  >::Type
135  , typename If< IsNumeric<T>
136  , typename If< IsComplex<T>
137  , Complex<T>
138  , Builtin<T>
139  >::Type
140  , Failure
141  >::Type
142  >::Type
143  >::Type Tmp;
144 
145  typedef typename RemoveReference< typename RemoveCV<T>::Type >::Type Type1;
147  //**********************************************************************************************
148 
149  public:
150  //**********************************************************************************************
152  typedef typename If< Or< IsConst<T>, IsVolatile<T>, IsReference<T> >
153  , RealExprTrait<Type1>, Tmp >::Type::Type Type;
155  //**********************************************************************************************
156 };
157 //*************************************************************************************************
158 
159 } // namespace blaze
160 
161 #endif
Compile time type selection.The If class template selects one of the two given types T2 and T3 depend...
Definition: If.h:112
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:94
Header file for the RemoveCV type trait.
Header file for the DVecRealExprTrait class template.
Header file for the IsRowVector type trait.
Header file for the TDVecRealExprTrait class template.
Header file for the IsVolatile type trait.
Header file for the IsMatrix type trait.
Evaluation of the expression type of a sparse matrix real part operation.Via this type trait it is po...
Definition: SMatRealExprTrait.h:77
Evaluation of the expression type of a dense vector real part operation.Via this type trait it is pos...
Definition: DVecRealExprTrait.h:77
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Evaluation of the expression type of a sparse vector real part operation.Via this type trait it is po...
Definition: SVecRealExprTrait.h:77
Header file for the Or class template.
Header file for the SVecRealExprTrait class template.
Header file for the TSVecRealExprTrait class template.
Evaluation of the expression type of a dense matrix real part operation.Via this type trait it is pos...
Definition: TDMatRealExprTrait.h:77
Evaluation of the expression type of a sparse vector real part operation.Via this type trait it is po...
Definition: TSVecRealExprTrait.h:77
Header file for the IsVector type trait.
Header file for the IsDenseMatrix type trait.
Header file for the DMatRealExprTrait class template.
Header file for the TDMatRealExprTrait class template.
Header file for the IsNumeric type trait.
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
Header file for the IsConst type trait.
Utility type for generic codes.
Evaluation of the expression type of a dense vector real part operation.Via this type trait it is pos...
Definition: TDVecRealExprTrait.h:77
Evaluation of the expression type of a dense matrix real part operation.Via this type trait it is pos...
Definition: DMatRealExprTrait.h:77
Header file for the IsReference type trait.
Header file for the RemoveReference type trait.
Header file for the IsDenseVector type trait.
Header file for the IsRowMajorMatrix type trait.
Header file for the SMatRealExprTrait class template.
Evaluation of the return type of a real part expression.Via this type trait it is possible to evaluat...
Definition: RealExprTrait.h:88
Header file for the TSMatRealExprTrait class template.
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:94
Header file for the IsComplex type trait.
Evaluation of the expression type of a sparse matrix real part operation.Via this type trait it is po...
Definition: TSMatRealExprTrait.h:77