All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AbsExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_ABSEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_ABSEXPRTRAIT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
44 #include <blaze/util/InvalidType.h>
45 #include <blaze/util/mpl/If.h>
52 
53 
54 namespace blaze {
55 
56 //=================================================================================================
57 //
58 // CLASS DEFINITION
59 //
60 //=================================================================================================
61 
62 //*************************************************************************************************
72 template< typename T > // Type of the absolute value operand
74 {
75  private:
76  //**struct ScalarAbs****************************************************************************
78  template< typename ST >
79  struct ScalarAbs { typedef T Type; };
81  //**********************************************************************************************
82 
83  //**struct Failure******************************************************************************
85  struct Failure { typedef INVALID_TYPE Type; };
87  //**********************************************************************************************
88 
89  //**********************************************************************************************
93  //**********************************************************************************************
94 
95  //**********************************************************************************************
97  typedef typename If< IsMatrix<T>
98  , typename If< IsDenseMatrix<T>
99  , typename If< IsRowMajorMatrix<T>
102  >::Type
103  , typename If< IsRowMajorMatrix<T>
106  >::Type
107  >::Type
108  , typename If< IsVector<T>
109  , typename If< IsDenseVector<T>
110  , typename If< IsTransposeVector<T>
113  >::Type
114  , typename If< IsTransposeVector<T>
117  >::Type
118  >::Type
119  , typename If< IsNumeric<T>
120  , ScalarAbs<T>
121  , Failure
122  >::Type
123  >::Type
124  >::Type Tmp;
125 
126  typedef typename RemoveReference< typename RemoveCV<T>::Type >::Type Type1;
128  //**********************************************************************************************
129 
130  public:
131  //**********************************************************************************************
133  typedef typename SelectType< qualified, AbsExprTrait<Type1>, Tmp >::Type::Type Type;
135  //**********************************************************************************************
136 };
137 //*************************************************************************************************
138 
139 } // namespace blaze
140 
141 #endif