All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AddExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_ADDEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_ADDEXPRTRAIT_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 addition operand
102  , typename T2 > // Type of the right-hand side addition operand
104 {
105  private:
106  //**struct Failure******************************************************************************
108  struct Failure { typedef INVALID_TYPE Type; };
110  //**********************************************************************************************
111 
112  //**********************************************************************************************
117  //**********************************************************************************************
118 
119  //**********************************************************************************************
121  typedef typename If< IsMatrix<T1>
122  , typename If< IsMatrix<T2>
123  , typename If< IsDenseMatrix<T1>
124  , typename If< IsDenseMatrix<T2>
125  , typename If< IsRowMajorMatrix<T1>
126  , typename If< IsRowMajorMatrix<T2>
129  >::Type
130  , typename If< IsRowMajorMatrix<T2>
133  >::Type
134  >::Type
135  , typename If< IsRowMajorMatrix<T1>
136  , typename If< IsRowMajorMatrix<T2>
139  >::Type
140  , typename If< IsRowMajorMatrix<T2>
143  >::Type
144  >::Type
145  >::Type
146  , typename If< IsDenseMatrix<T2>
147  , typename If< IsRowMajorMatrix<T1>
148  , typename If< IsRowMajorMatrix<T2>
151  >::Type
152  , typename If< IsRowMajorMatrix<T2>
155  >::Type
156  >::Type
157  , typename If< IsRowMajorMatrix<T1>
158  , typename If< IsRowMajorMatrix<T2>
161  >::Type
162  , typename If< IsRowMajorMatrix<T2>
165  >::Type
166  >::Type
167  >::Type
168  >::Type
169  , Failure
170  >::Type
171  , typename If< IsVector<T1>
172  , typename If< IsVector<T2>
173  , typename If< IsDenseVector<T1>
174  , typename If< IsDenseVector<T2>
175  , typename If< IsRowVector<T1>
176  , typename If< IsRowVector<T2>
178  , Failure
179  >::Type
180  , typename If< IsRowVector<T2>
181  , Failure
183  >::Type
184  >::Type
185  , typename If< IsRowVector<T1>
186  , typename If< IsRowVector<T2>
188  , Failure
189  >::Type
190  , typename If< IsRowVector<T2>
191  , Failure
193  >::Type
194  >::Type
195  >::Type
196  , typename If< IsDenseVector<T2>
197  , typename If< IsRowVector<T1>
198  , typename If< IsRowVector<T2>
200  , Failure
201  >::Type
202  , typename If< IsRowVector<T2>
203  , Failure
205  >::Type
206  >::Type
207  , typename If< IsRowVector<T1>
208  , typename If< IsRowVector<T2>
210  , Failure
211  >::Type
212  , typename If< IsRowVector<T2>
213  , Failure
215  >::Type
216  >::Type
217  >::Type
218  >::Type
219  , Failure
220  >::Type
221  , typename If< IsNumeric<T1>
222  , typename If< IsNumeric<T2>
224  , Failure
225  >::Type
226  , Failure
227  >::Type
228  >::Type
229  >::Type Tmp;
230 
231  typedef typename RemoveReference< typename RemoveCV<T1>::Type >::Type Type1;
232  typedef typename RemoveReference< typename RemoveCV<T2>::Type >::Type Type2;
234  //**********************************************************************************************
235 
236  public:
237  //**********************************************************************************************
239  typedef typename SelectType< qualified, AddExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
241  //**********************************************************************************************
242 };
243 //*************************************************************************************************
244 
245 } // namespace blaze
246 
247 #endif
Header file for the TDMatSMatAddExprTrait class template.
Evaluation of the expression type of a dense vector/sparse vector addition.Via this type trait it is ...
Definition: DVecSVecAddExprTrait.h:76
Header file for the DVecDVecAddExprTrait class template.
Evaluation of the return type of an addition expression.Via this type trait it is possible to evaluat...
Definition: AddExprTrait.h:103
Evaluation of the expression type of a dense matrix/transpose sparse matrix addition.Via this type trait it is possible to evaluate the resulting expression type of a dense matrix/transpose sparse matrix addition. 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: DMatTSMatAddExprTrait.h:78
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 TSVecTSVecAddExprTrait class template.
Evaluation of the expression type of a dense matrix/dense matrix addition.Via this type trait it is p...
Definition: DMatDMatAddExprTrait.h:75
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 sparse matrix/transpose sparse matrix addition.Via this type trait it is possible to evaluate the resulting expression type of a sparse matrix/transpose sparse matrix addition. 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: SMatTSMatAddExprTrait.h:77
Evaluation of the expression type of a transpose dense matrix/sparse matrix addition.Via this type trait it is possible to evaluate the resulting expression type of a transpose dense matrix/sparse matrix addition. 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: TDMatSMatAddExprTrait.h:77
Header file for the RemoveCV type trait.
Evaluation of the expression type of a dense vector/dense vector addition.Via this type trait it is p...
Definition: DVecDVecAddExprTrait.h:75
Header file for the DMatTDMatAddExprTrait class template.
Evaluation of the expression type of a sparse matrix/sparse matrix addition.Via this type trait it is...
Definition: SMatSMatAddExprTrait.h:75
Header file for the DMatSMatAddExprTrait class template.
Header file for the SMatDMatAddExprTrait class template.
Header file for the TSMatDMatAddExprTrait class template.
Header file for the IsRowVector type trait.
Header file for the TSVecTDVecAddExprTrait class template.
Header file for the SVecDVecAddExprTrait class template.
Evaluation of the expression type of a dense matrix/transpose dense matrix addition.Via this type trait it is possible to evaluate the resulting expression type of a dense matrix/transpose dense matrix addition. 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: DMatTDMatAddExprTrait.h:77
Evaluation of the expression type of a transpose sparse matrix/dense matrix addition.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse matrix/dense matrix addition. 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: TSMatDMatAddExprTrait.h:77
Evaluation of the expression type of a dense matrix/sparse matrix addition.Via this type trait it is ...
Definition: DMatSMatAddExprTrait.h:76
Header file for the TSMatSMatAddExprTrait class template.
Header file for the TDVecTSVecAddExprTrait class template.
Header file for the DVecSVecAddExprTrait class template.
Header file for the IsVolatile type trait.
Header file for the IsMatrix type trait.
Evaluation of the expression type of a transpose sparse vector/transpose sparse vector addition...
Definition: TSVecTSVecAddExprTrait.h:76
Evaluation of the expression type of a sparse matrix/transpose dense matrix addition.Via this type trait it is possible to evaluate the resulting expression type of a sparse matrix/transpose dense matrix addition. 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: SMatTDMatAddExprTrait.h:77
Evaluation of the expression type of a transpose dense matrix/dense matrix addition.Via this type trait it is possible to evaluate the resulting expression type of a transpose dense matrix/dense matrix addition. 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: TDMatDMatAddExprTrait.h:76
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 SMatSMatAddExprTrait class template.
Header file for the If class template.
Header file for the SVecSVecAddExprTrait class template.
Evaluation of the expression type of a transpose dense vector/transpose sparse vector addition...
Definition: TDVecTSVecAddExprTrait.h:77
Header file for the TSMatTDMatAddExprTrait class template.
Evaluation of the expression type of a transpose sparse matrix/transpose sparse matrix addition...
Definition: TSMatTSMatAddExprTrait.h:76
Header file for the IsVector type trait.
Header file for the IsDenseMatrix type trait.
Evaluation of the expression type of a transpose dense matrix/transpose sparse matrix addition...
Definition: TDMatTSMatAddExprTrait.h:78
Evaluation of the expression type of a sparse vector/sparse vector addition.Via this type trait it is...
Definition: SVecSVecAddExprTrait.h:75
Header file for the TDMatTSMatAddExprTrait 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.
Header file for the DMatTSMatAddExprTrait class template.
Base template for the AddTrait class.
Definition: AddTrait.h:141
Utility type for generic codes.
Header file for the addition trait.
Evaluation of the expression type of a sparse vector/dense vector addition.Via this type trait it is ...
Definition: SVecDVecAddExprTrait.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 TDMatTDMatAddExprTrait class template.
Header file for the IsRowMajorMatrix type trait.
Header file for the SMatTDMatAddExprTrait class template.
Header file for the TSMatTSMatAddExprTrait class template.
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 sparse matrix/dense matrix addition.Via this type trait it is ...
Definition: SMatDMatAddExprTrait.h:76
Header file for the DMatDMatAddExprTrait class template.
Header file for the SMatTSMatAddExprTrait class template.
Header file for the TDVecTDVecAddExprTrait class template.
Header file for the TDMatDMatAddExprTrait class template.
Evaluation of the expression type of a transpose dense vector/transpose dense vector addition...
Definition: TDVecTDVecAddExprTrait.h:76
Evaluation of the expression type of a transpose dense matrix/transpose dense matrix addition...
Definition: TDMatTDMatAddExprTrait.h:76
Evaluation of the expression type of a transpose sparse matrix/transpose dense matrix addition...
Definition: TSMatTDMatAddExprTrait.h:78
Evaluation of the expression type of a transpose sparse vector/transpose dense vector addition...
Definition: TSVecTDVecAddExprTrait.h:77
Evaluation of the expression type of a transpose sparse matrix/sparse matrix addition.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse matrix/sparse matrix addition. 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: TSMatSMatAddExprTrait.h:76