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>
75 #include <blaze/util/mpl/Or.h>
82 
83 
84 namespace blaze {
85 
86 //=================================================================================================
87 //
88 // CLASS DEFINITION
89 //
90 //=================================================================================================
91 
92 //*************************************************************************************************
102 template< typename T1 // Type of the left-hand side addition operand
103  , typename T2 > // Type of the right-hand side addition operand
105 {
106  private:
107  //**struct Failure******************************************************************************
109  struct Failure { typedef INVALID_TYPE Type; };
111  //**********************************************************************************************
112 
113  //**********************************************************************************************
115  typedef typename If< IsMatrix<T1>
116  , typename If< IsMatrix<T2>
117  , typename If< IsDenseMatrix<T1>
118  , typename If< IsDenseMatrix<T2>
119  , typename If< IsRowMajorMatrix<T1>
120  , typename If< IsRowMajorMatrix<T2>
123  >::Type
124  , typename If< IsRowMajorMatrix<T2>
127  >::Type
128  >::Type
129  , typename If< IsRowMajorMatrix<T1>
130  , typename If< IsRowMajorMatrix<T2>
133  >::Type
134  , typename If< IsRowMajorMatrix<T2>
137  >::Type
138  >::Type
139  >::Type
140  , typename If< IsDenseMatrix<T2>
141  , typename If< IsRowMajorMatrix<T1>
142  , typename If< IsRowMajorMatrix<T2>
145  >::Type
146  , typename If< IsRowMajorMatrix<T2>
149  >::Type
150  >::Type
151  , typename If< IsRowMajorMatrix<T1>
152  , typename If< IsRowMajorMatrix<T2>
155  >::Type
156  , typename If< IsRowMajorMatrix<T2>
159  >::Type
160  >::Type
161  >::Type
162  >::Type
163  , Failure
164  >::Type
165  , typename If< IsVector<T1>
166  , typename If< IsVector<T2>
167  , typename If< IsDenseVector<T1>
168  , typename If< IsDenseVector<T2>
169  , typename If< IsRowVector<T1>
170  , typename If< IsRowVector<T2>
172  , Failure
173  >::Type
174  , typename If< IsRowVector<T2>
175  , Failure
177  >::Type
178  >::Type
179  , typename If< IsRowVector<T1>
180  , typename If< IsRowVector<T2>
182  , Failure
183  >::Type
184  , typename If< IsRowVector<T2>
185  , Failure
187  >::Type
188  >::Type
189  >::Type
190  , typename If< IsDenseVector<T2>
191  , typename If< IsRowVector<T1>
192  , typename If< IsRowVector<T2>
194  , Failure
195  >::Type
196  , typename If< IsRowVector<T2>
197  , Failure
199  >::Type
200  >::Type
201  , typename If< IsRowVector<T1>
202  , typename If< IsRowVector<T2>
204  , Failure
205  >::Type
206  , typename If< IsRowVector<T2>
207  , Failure
209  >::Type
210  >::Type
211  >::Type
212  >::Type
213  , Failure
214  >::Type
215  , typename If< IsNumeric<T1>
216  , typename If< IsNumeric<T2>
218  , Failure
219  >::Type
220  , Failure
221  >::Type
222  >::Type
223  >::Type Tmp;
224 
225  typedef typename RemoveReference< typename RemoveCV<T1>::Type >::Type Type1;
226  typedef typename RemoveReference< typename RemoveCV<T2>::Type >::Type Type2;
228  //**********************************************************************************************
229 
230  public:
231  //**********************************************************************************************
235  , AddExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
237  //**********************************************************************************************
238 };
239 //*************************************************************************************************
240 
241 } // namespace blaze
242 
243 #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:78
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:104
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:80
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:77
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:79
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:79
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:77
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:77
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:82
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:79
Evaluation of the expression type of a dense matrix/sparse matrix addition.Via this type trait it is ...
Definition: DMatSMatAddExprTrait.h:78
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:78
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:79
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:81
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the SMatSMatAddExprTrait class template.
Header file for the If class template.
Header file for the SVecSVecAddExprTrait class template.
Header file for the Or class template.
Evaluation of the expression type of a transpose dense vector/transpose sparse vector addition...
Definition: TDVecTSVecAddExprTrait.h:79
Header file for the TSMatTDMatAddExprTrait class template.
Evaluation of the expression type of a transpose sparse matrix/transpose sparse matrix addition...
Definition: TSMatTSMatAddExprTrait.h:78
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:80
Evaluation of the expression type of a sparse vector/sparse vector addition.Via this type trait it is...
Definition: SVecSVecAddExprTrait.h:77
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:138
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:78
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:78
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:78
Evaluation of the expression type of a transpose dense matrix/transpose dense matrix addition...
Definition: TDMatTDMatAddExprTrait.h:78
Evaluation of the expression type of a transpose sparse matrix/transpose dense matrix addition...
Definition: TSMatTDMatAddExprTrait.h:80
Evaluation of the expression type of a transpose sparse vector/transpose dense vector addition...
Definition: TSVecTDVecAddExprTrait.h:79
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:78