All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AbsExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_ABSEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_ABSEXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
57 #include <blaze/util/InvalidType.h>
58 #include <blaze/util/mpl/If.h>
65 
66 
67 namespace blaze {
68 
69 //=================================================================================================
70 //
71 // CLASS DEFINITION
72 //
73 //=================================================================================================
74 
75 //*************************************************************************************************
85 template< typename T > // Type of the absolute value operand
87 {
88  private:
89  //**struct ScalarAbs****************************************************************************
91  template< typename ST >
92  struct ScalarAbs { typedef T Type; };
94  //**********************************************************************************************
95 
96  //**struct Failure******************************************************************************
98  struct Failure { typedef INVALID_TYPE Type; };
100  //**********************************************************************************************
101 
102  //**********************************************************************************************
106  //**********************************************************************************************
107 
108  //**********************************************************************************************
110  typedef typename If< IsMatrix<T>
111  , typename If< IsDenseMatrix<T>
112  , typename If< IsRowMajorMatrix<T>
115  >::Type
116  , typename If< IsRowMajorMatrix<T>
119  >::Type
120  >::Type
121  , typename If< IsVector<T>
122  , typename If< IsDenseVector<T>
123  , typename If< IsRowVector<T>
126  >::Type
127  , typename If< IsRowVector<T>
130  >::Type
131  >::Type
132  , typename If< IsNumeric<T>
133  , ScalarAbs<T>
134  , Failure
135  >::Type
136  >::Type
137  >::Type Tmp;
138 
139  typedef typename RemoveReference< typename RemoveCV<T>::Type >::Type Type1;
141  //**********************************************************************************************
142 
143  public:
144  //**********************************************************************************************
146  typedef typename SelectType< qualified, AbsExprTrait<Type1>, Tmp >::Type::Type Type;
148  //**********************************************************************************************
149 };
150 //*************************************************************************************************
151 
152 } // namespace blaze
153 
154 #endif
Evaluation of the expression type of a dense matrix absolute value operation.Via this type trait it i...
Definition: DMatAbsExprTrait.h:72
Header file for the DMatAbsExprTrait class template.
Header file for the TSVecAbsExprTrait class template.
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
Evaluation of the expression type of a dense vector absolute value operation.Via this type trait it i...
Definition: TDVecAbsExprTrait.h:72
Header file for the RemoveCV type trait.
Evaluation of the expression type of a sparse vector absolute value operation.Via this type trait it ...
Definition: SVecAbsExprTrait.h:72
Header file for the IsRowVector type trait.
Header file for the SVecAbsExprTrait class template.
Evaluation of the expression type of a dense matrix absolute value operation.Via this type trait it i...
Definition: TDMatAbsExprTrait.h:72
Header file for the IsVolatile type trait.
Header file for the TDVecAbsExprTrait class template.
Header file for the IsMatrix type trait.
Evaluation of the expression type of a sparse matrix absolute value operation.Via this type trait it ...
Definition: TSMatAbsExprTrait.h:72
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the If class template.
Header file for the DVecAbsExprTrait class template.
Evaluation of the expression type of a sparse vector absolute value operation.Via this type trait it ...
Definition: TSVecAbsExprTrait.h:72
Header file for the IsVector type trait.
Header file for the IsDenseMatrix type trait.
Evaluation of the expression type of a dense vector absolute value operation.Via this type trait it i...
Definition: DVecAbsExprTrait.h:72
Header file for the TSMatAbsExprTrait 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.
Header file for the IsReference type trait.
Header file for the RemoveReference type trait.
Compile time check for constant data types.The IsConst type trait tests whether or not the given temp...
Definition: IsConst.h:94
Header file for the SMatAbsExprTrait class template.
Header file for the IsDenseVector type trait.
Evaluation of the expression type of a sparse matrix absolute value operation.Via this type trait it ...
Definition: SMatAbsExprTrait.h:72
Header file for the TDMatAbsExprTrait class template.
Header file for the IsRowMajorMatrix type trait.
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:94
Evaluation of the return type of an absolute value expression.Via this type trait it is possible to e...
Definition: AbsExprTrait.h:86