All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SubExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_SUBEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_SUBEXPRTRAIT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
60 #include <blaze/util/InvalidType.h>
61 #include <blaze/util/mpl/If.h>
68 
69 
70 namespace blaze {
71 
72 //=================================================================================================
73 //
74 // CLASS DEFINITION
75 //
76 //=================================================================================================
77 
78 //*************************************************************************************************
88 template< typename T1 // Type of the left-hand side subtraction operand
89  , typename T2 > // Type of the right-hand side subtraction operand
91 {
92  private:
93  //**struct Failure******************************************************************************
95  struct Failure { typedef INVALID_TYPE Type; };
97  //**********************************************************************************************
98 
99  //**********************************************************************************************
104  //**********************************************************************************************
105 
106  public:
107  //**********************************************************************************************
109  typedef typename If< IsMatrix<T1>
110  , typename If< IsMatrix<T2>
111  , typename If< IsDenseMatrix<T1>
112  , typename If< IsDenseMatrix<T2>
113  , typename If< IsRowMajorMatrix<T1>
114  , typename If< IsRowMajorMatrix<T2>
117  >::Type
118  , typename If< IsRowMajorMatrix<T2>
121  >::Type
122  >::Type
123  , typename If< IsRowMajorMatrix<T1>
124  , typename If< IsRowMajorMatrix<T2>
127  >::Type
128  , typename If< IsRowMajorMatrix<T2>
131  >::Type
132  >::Type
133  >::Type
134  , typename If< IsDenseMatrix<T2>
135  , typename If< IsRowMajorMatrix<T1>
136  , typename If< IsRowMajorMatrix<T2>
139  >::Type
140  , typename If< IsRowMajorMatrix<T2>
143  >::Type
144  >::Type
145  , typename If< IsRowMajorMatrix<T1>
146  , typename If< IsRowMajorMatrix<T2>
149  >::Type
150  , typename If< IsRowMajorMatrix<T2>
153  >::Type
154  >::Type
155  >::Type
156  >::Type
157  , Failure
158  >::Type
159  , typename If< IsVector<T1>
160  , typename If< IsVector<T2>
161  , typename If< IsDenseVector<T1>
162  , typename If< IsDenseVector<T2>
163  , typename If< IsTransposeVector<T1>
164  , typename If< IsTransposeVector<T2>
166  , Failure
167  >::Type
168  , typename If< IsTransposeVector<T2>
169  , Failure
171  >::Type
172  >::Type
173  , typename If< IsTransposeVector<T1>
174  , typename If< IsTransposeVector<T2>
176  , Failure
177  >::Type
178  , typename If< IsTransposeVector<T2>
179  , Failure
181  >::Type
182  >::Type
183  >::Type
184  , typename If< IsDenseVector<T2>
185  , typename If< IsTransposeVector<T1>
186  , typename If< IsTransposeVector<T2>
188  , Failure
189  >::Type
190  , typename If< IsTransposeVector<T2>
191  , Failure
193  >::Type
194  >::Type
195  , typename If< IsTransposeVector<T1>
196  , typename If< IsTransposeVector<T2>
198  , Failure
199  >::Type
200  , typename If< IsTransposeVector<T2>
201  , Failure
203  >::Type
204  >::Type
205  >::Type
206  >::Type
207  , Failure
208  >::Type
209  , typename If< IsNumeric<T1>
210  , typename If< IsNumeric<T2>
212  , Failure
213  >::Type
214  , Failure
215  >::Type
216  >::Type
217  >::Type Tmp;
218 
219  typedef typename RemoveReference< typename RemoveCV<T1>::Type >::Type Type1;
220  typedef typename RemoveReference< typename RemoveCV<T2>::Type >::Type Type2;
222  //**********************************************************************************************
223 
224  public:
225  //**********************************************************************************************
227  typedef typename SelectType< qualified, SubExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
229  //**********************************************************************************************
230 };
231 //*************************************************************************************************
232 
233 } // namespace blaze
234 
235 #endif