All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SubExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_SUBEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_SUBEXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
73 #include <blaze/util/InvalidType.h>
74 #include <blaze/util/mpl/If.h>
81 
82 
83 namespace blaze {
84 
85 //=================================================================================================
86 //
87 // CLASS DEFINITION
88 //
89 //=================================================================================================
90 
91 //*************************************************************************************************
101 template< typename T1 // Type of the left-hand side subtraction operand
102  , typename T2 > // Type of the right-hand side subtraction operand
104 {
105  private:
106  //**struct Failure******************************************************************************
108  struct Failure { typedef INVALID_TYPE Type; };
110  //**********************************************************************************************
111 
112  //**********************************************************************************************
117  //**********************************************************************************************
118 
119  public:
120  //**********************************************************************************************
122  typedef typename If< IsMatrix<T1>
123  , typename If< IsMatrix<T2>
124  , typename If< IsDenseMatrix<T1>
125  , typename If< IsDenseMatrix<T2>
126  , typename If< IsRowMajorMatrix<T1>
127  , typename If< IsRowMajorMatrix<T2>
130  >::Type
131  , typename If< IsRowMajorMatrix<T2>
134  >::Type
135  >::Type
136  , typename If< IsRowMajorMatrix<T1>
137  , typename If< IsRowMajorMatrix<T2>
140  >::Type
141  , typename If< IsRowMajorMatrix<T2>
144  >::Type
145  >::Type
146  >::Type
147  , typename If< IsDenseMatrix<T2>
148  , typename If< IsRowMajorMatrix<T1>
149  , typename If< IsRowMajorMatrix<T2>
152  >::Type
153  , typename If< IsRowMajorMatrix<T2>
156  >::Type
157  >::Type
158  , typename If< IsRowMajorMatrix<T1>
159  , typename If< IsRowMajorMatrix<T2>
162  >::Type
163  , typename If< IsRowMajorMatrix<T2>
166  >::Type
167  >::Type
168  >::Type
169  >::Type
170  , Failure
171  >::Type
172  , typename If< IsVector<T1>
173  , typename If< IsVector<T2>
174  , typename If< IsDenseVector<T1>
175  , typename If< IsDenseVector<T2>
176  , typename If< IsRowVector<T1>
177  , typename If< IsRowVector<T2>
179  , Failure
180  >::Type
181  , typename If< IsRowVector<T2>
182  , Failure
184  >::Type
185  >::Type
186  , typename If< IsRowVector<T1>
187  , typename If< IsRowVector<T2>
189  , Failure
190  >::Type
191  , typename If< IsRowVector<T2>
192  , Failure
194  >::Type
195  >::Type
196  >::Type
197  , typename If< IsDenseVector<T2>
198  , typename If< IsRowVector<T1>
199  , typename If< IsRowVector<T2>
201  , Failure
202  >::Type
203  , typename If< IsRowVector<T2>
204  , Failure
206  >::Type
207  >::Type
208  , typename If< IsRowVector<T1>
209  , typename If< IsRowVector<T2>
211  , Failure
212  >::Type
213  , typename If< IsRowVector<T2>
214  , Failure
216  >::Type
217  >::Type
218  >::Type
219  >::Type
220  , Failure
221  >::Type
222  , typename If< IsNumeric<T1>
223  , typename If< IsNumeric<T2>
225  , Failure
226  >::Type
227  , Failure
228  >::Type
229  >::Type
230  >::Type Tmp;
231 
232  typedef typename RemoveReference< typename RemoveCV<T1>::Type >::Type Type1;
233  typedef typename RemoveReference< typename RemoveCV<T2>::Type >::Type Type2;
235  //**********************************************************************************************
236 
237  public:
238  //**********************************************************************************************
240  typedef typename SelectType< qualified, SubExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
242  //**********************************************************************************************
243 };
244 //*************************************************************************************************
245 
246 } // namespace blaze
247 
248 #endif
Header file for the TDMatTSMatSubExprTrait class template.
Evaluation of the expression type of a dense matrix/transpose dense matrix subtraction.Via this type trait it is possible to evaluate the resulting expression type of a dense matrix/transpose dense matrix subtraction. Given the row-major dense matrix type MT1 and the column-major dense matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a row-major dense matrix type or MT2 is not a column-major dense matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: DMatTDMatSubExprTrait.h:77
Evaluation of the expression type of a transpose dense matrix/dense matrix subtraction.Via this type trait it is possible to evaluate the resulting expression type of a transpose dense matrix/dense matrix subtraction. Given the column-major dense matrix type MT1 and the row-major dense matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a column-major dense matrix type or MT2 is not a row-major dense matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TDMatDMatSubExprTrait.h:76
Evaluation of the expression type of a dense matrix/dense matrix subtraction.Via this type trait it i...
Definition: DMatDMatSubExprTrait.h:75
Compile time type selection.The If class template selects one of the two given types T2 and T3 depend...
Definition: If.h:112
Header file for the subtraction trait.
Evaluation of the expression type of a transpose sparse matrix/sparse matrix subtraction.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse matrix/sparse matrix subtraction. Given the column-major sparse matrix type MT1 and the row-major sparse matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a column-major sparse matrix type or MT2 is not a row-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TSMatSMatSubExprTrait.h:77
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 DVecSVecSubExprTrait class template.
Header file for the DMatDMatSubExprTrait class template.
Header file for the SVecDVecSubExprTrait class template.
Header file for the IsRowVector type trait.
Header file for the SMatTSMatSubExprTrait class template.
Evaluation of the expression type of a dense vector/dense vector subtraction.Via this type trait it i...
Definition: DVecDVecSubExprTrait.h:75
Evaluation of the expression type of a transpose dense matrix/sparse matrix subtraction.Via this type trait it is possible to evaluate the resulting expression type of a transpose dense matrix/sparse matrix subtraction. Given the column-major dense matrix type MT1 and the row-major sparse matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a column-major dense matrix type or MT2 is not a row-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TDMatSMatSubExprTrait.h:78
Header file for the TDMatTDMatSubExprTrait class template.
Evaluation of the expression type of a transpose dense matrix/transpose sparse matrix subtraction...
Definition: TDMatTSMatSubExprTrait.h:78
Header file for the IsVolatile type trait.
Header file for the DMatTDMatSubExprTrait class template.
Header file for the SVecSVecSubExprTrait class template.
Evaluation of the expression type of a transpose sparse matrix/transpose sparse matrix subtraction...
Definition: TSMatTSMatSubExprTrait.h:76
Header file for the TDMatDMatSubExprTrait class template.
Header file for the IsMatrix type trait.
Header file for the DMatTSMatSubExprTrait class template.
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 TSVecTSVecSubExprTrait class template.
Header file for the SMatDMatSubExprTrait class template.
Header file for the If class template.
Evaluation of the expression type of a transpose dense vector/transpose sparse vector subtraction...
Definition: TDVecTSVecSubExprTrait.h:77
Evaluation of the expression type of a sparse vector/sparse vector subtraction.Via this type trait it...
Definition: SVecSVecSubExprTrait.h:75
Header file for the DMatSMatSubExprTrait class template.
Header file for the TDVecTDVecSubExprTrait class template.
Evaluation of the expression type of a transpose sparse vector/transpose sparse vector subtraction...
Definition: TSVecTSVecSubExprTrait.h:76
Evaluation of the return type of a subtraction expression.Via this type trait it is possible to evalu...
Definition: SubExprTrait.h:103
Header file for the TSMatDMatSubExprTrait class template.
Evaluation of the expression type of a sparse matrix/transpose dense matrix subtraction.Via this type trait it is possible to evaluate the resulting expression type of a sparse matrix/transpose dense matrix subtraction. Given the row-major sparse matrix type MT1 and the column-major dense matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a row-major sparse matrix type or MT2 is not a column-major dense matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: SMatTDMatSubExprTrait.h:78
Header file for the IsVector type trait.
Header file for the IsDenseMatrix type trait.
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.
Header file for the TDMatSMatSubExprTrait class template.
Utility type for generic codes.
Evaluation of the expression type of a sparse matrix/sparse matrix subtraction.Via this type trait it...
Definition: SMatSMatSubExprTrait.h:75
Header file for the SMatSMatSubExprTrait class template.
Evaluation of the expression type of a sparse matrix/transpose sparse matrix subtraction.Via this type trait it is possible to evaluate the resulting expression type of a sparse matrix/transpose sparse matrix subtraction. Given the row-major sparse matrix type MT1 and the column-major sparse matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a row-major sparse matrix type or MT2 is not a column-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: SMatTSMatSubExprTrait.h:77
Header file for the TDVecTSVecSubExprTrait class template.
Header file for the TSVecTDVecSubExprTrait class template.
Evaluation of the expression type of a sparse vector/dense vector subtraction.Via this type trait it ...
Definition: SVecDVecSubExprTrait.h:76
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 TSMatTDMatSubExprTrait class template.
Evaluation of the expression type of a transpose dense matrix/transpose dense matrix subtraction...
Definition: TDMatTDMatSubExprTrait.h:76
Header file for the IsRowMajorMatrix type trait.
Header file for the SMatTDMatSubExprTrait class template.
Evaluation of the expression type of a dense matrix/transpose sparse matrix subtraction.Via this type trait it is possible to evaluate the resulting expression type of a dense matrix/ transpose sparse matrix subtraction. Given the row-major dense matrix type MT1 and the column-major sparse matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a row-major dense matrix type or MT2 is not a column-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: DMatTSMatSubExprTrait.h:77
Header file for the TSMatTSMatSubExprTrait class template.
Evaluation of the expression type of a sparse matrix/dense matrix subtraction.Via this type trait it ...
Definition: SMatDMatSubExprTrait.h:76
Header file for the TSMatSMatSubExprTrait class template.
Evaluation of the expression type of a transpose sparse matrix/dense matrix subtraction.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse matrix/dense matrix subtraction. Given the column-major sparse matrix type MT1 and the row-major dense matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a column-major sparse matrix type or MT2 is not a row-major dense matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TSMatDMatSubExprTrait.h:77
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:94
Evaluation of the expression type of a dense vector/sparse vector subtraction.Via this type trait it ...
Definition: DVecSVecSubExprTrait.h:76
Base template for the SubTrait class.
Definition: SubTrait.h:141
Evaluation of the expression type of a transpose sparse matrix/transpose dense matrix subtraction...
Definition: TSMatTDMatSubExprTrait.h:78
Evaluation of the expression type of a transpose dense vector/transpose dense vector subtraction...
Definition: TDVecTDVecSubExprTrait.h:76
Evaluation of the expression type of a transpose sparse vector/transpose dense vector subtraction...
Definition: TSVecTDVecSubExprTrait.h:77
Evaluation of the expression type of a dense matrix/sparse matrix subtraction.Via this type trait it ...
Definition: DMatSMatSubExprTrait.h:76
Header file for the DVecDVecSubExprTrait class template.