Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
blaze
math
traits
AddExprTrait.h
Go to the documentation of this file.
1
//=================================================================================================
20
//=================================================================================================
21
22
#ifndef _BLAZE_MATH_TRAITS_ADDEXPRTRAIT_H_
23
#define _BLAZE_MATH_TRAITS_ADDEXPRTRAIT_H_
24
25
26
//*************************************************************************************************
27
// Includes
28
//*************************************************************************************************
29
30
#include <
blaze/math/traits/AddTrait.h
>
31
#include <
blaze/math/traits/DMatDMatAddExprTrait.h
>
32
#include <
blaze/math/traits/DMatSMatAddExprTrait.h
>
33
#include <
blaze/math/traits/DMatTDMatAddExprTrait.h
>
34
#include <
blaze/math/traits/DMatTSMatAddExprTrait.h
>
35
#include <
blaze/math/traits/DVecDVecAddExprTrait.h
>
36
#include <
blaze/math/traits/DVecSVecAddExprTrait.h
>
37
#include <
blaze/math/traits/SMatDMatAddExprTrait.h
>
38
#include <
blaze/math/traits/SMatSMatAddExprTrait.h
>
39
#include <
blaze/math/traits/SMatTDMatAddExprTrait.h
>
40
#include <
blaze/math/traits/SMatTSMatAddExprTrait.h
>
41
#include <
blaze/math/traits/SVecDVecAddExprTrait.h
>
42
#include <
blaze/math/traits/SVecSVecAddExprTrait.h
>
43
#include <
blaze/math/traits/TDMatDMatAddExprTrait.h
>
44
#include <
blaze/math/traits/TDMatSMatAddExprTrait.h
>
45
#include <
blaze/math/traits/TDMatTDMatAddExprTrait.h
>
46
#include <
blaze/math/traits/TDMatTSMatAddExprTrait.h
>
47
#include <
blaze/math/traits/TDVecTDVecAddExprTrait.h
>
48
#include <
blaze/math/traits/TDVecTSVecAddExprTrait.h
>
49
#include <
blaze/math/traits/TSMatDMatAddExprTrait.h
>
50
#include <
blaze/math/traits/TSMatSMatAddExprTrait.h
>
51
#include <
blaze/math/traits/TSMatTDMatAddExprTrait.h
>
52
#include <
blaze/math/traits/TSMatTSMatAddExprTrait.h
>
53
#include <
blaze/math/traits/TSVecTDVecAddExprTrait.h
>
54
#include <
blaze/math/traits/TSVecTSVecAddExprTrait.h
>
55
#include <
blaze/math/typetraits/IsDenseMatrix.h
>
56
#include <
blaze/math/typetraits/IsMatrix.h
>
57
#include <
blaze/math/typetraits/IsRowMajorMatrix.h
>
58
#include <
blaze/math/typetraits/IsTransposeVector.h
>
59
#include <
blaze/math/typetraits/IsVector.h
>
60
#include <
blaze/util/InvalidType.h
>
61
#include <
blaze/util/mpl/If.h
>
62
#include <
blaze/util/typetraits/IsConst.h
>
63
#include <
blaze/util/typetraits/IsNumeric.h
>
64
#include <
blaze/util/typetraits/IsReference.h
>
65
#include <
blaze/util/typetraits/IsVolatile.h
>
66
#include <
blaze/util/typetraits/RemoveCV.h
>
67
#include <
blaze/util/typetraits/RemoveReference.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 addition operand
89
,
typename
T2 >
// Type of the right-hand side addition operand
90
struct
AddExprTrait
91
{
92
private
:
93
//**struct Failure******************************************************************************
95
struct
Failure {
typedef
INVALID_TYPE Type; };
97
//**********************************************************************************************
98
99
//**********************************************************************************************
101
enum
{ qualified =
IsConst<T1>::value
||
IsVolatile<T1>::value
||
IsReference<T1>::value
||
102
IsConst<T2>::value
||
IsVolatile<T2>::value
||
IsReference<T2>::value
};
104
//**********************************************************************************************
105
106
//**********************************************************************************************
108
typedef
typename
If< IsMatrix<T1>
109
,
typename
If< IsMatrix<T2>
110
,
typename
If< IsDenseMatrix<T1>
111
,
typename
If< IsDenseMatrix<T2>
112
,
typename
If< IsRowMajorMatrix<T1>
113
,
typename
If< IsRowMajorMatrix<T2>
114
,
DMatDMatAddExprTrait<T1,T2>
115
,
DMatTDMatAddExprTrait<T1,T2>
116
>::Type
117
,
typename
If< IsRowMajorMatrix<T2>
118
,
TDMatDMatAddExprTrait<T1,T2>
119
,
TDMatTDMatAddExprTrait<T1,T2>
120
>::Type
121
>::Type
122
,
typename
If< IsRowMajorMatrix<T1>
123
,
typename
If< IsRowMajorMatrix<T2>
124
,
DMatSMatAddExprTrait<T1,T2>
125
,
DMatTSMatAddExprTrait<T1,T2>
126
>::Type
127
,
typename
If< IsRowMajorMatrix<T2>
128
,
TDMatSMatAddExprTrait<T1,T2>
129
,
TDMatTSMatAddExprTrait<T1,T2>
130
>::Type
131
>::Type
132
>::Type
133
,
typename
If< IsDenseMatrix<T2>
134
,
typename
If< IsRowMajorMatrix<T1>
135
,
typename
If< IsRowMajorMatrix<T2>
136
,
SMatDMatAddExprTrait<T1,T2>
137
,
SMatTDMatAddExprTrait<T1,T2>
138
>::Type
139
,
typename
If< IsRowMajorMatrix<T2>
140
,
TSMatDMatAddExprTrait<T1,T2>
141
,
TSMatTDMatAddExprTrait<T1,T2>
142
>::Type
143
>::Type
144
,
typename
If< IsRowMajorMatrix<T1>
145
,
typename
If< IsRowMajorMatrix<T2>
146
,
SMatSMatAddExprTrait<T1,T2>
147
,
SMatTSMatAddExprTrait<T1,T2>
148
>::Type
149
,
typename
If< IsRowMajorMatrix<T2>
150
,
TSMatSMatAddExprTrait<T1,T2>
151
,
TSMatTSMatAddExprTrait<T1,T2>
152
>::Type
153
>::Type
154
>::Type
155
>::Type
156
, Failure
157
>::Type
158
,
typename
If< IsVector<T1>
159
,
typename
If< IsVector<T2>
160
,
typename
If< IsDenseVector<T1>
161
,
typename
If< IsDenseVector<T2>
162
,
typename
If< IsTransposeVector<T1>
163
,
typename
If< IsTransposeVector<T2>
164
,
TDVecTDVecAddExprTrait<T1,T2>
165
, Failure
166
>::Type
167
,
typename
If< IsTransposeVector<T2>
168
, Failure
169
,
DVecDVecAddExprTrait<T1,T2>
170
>::Type
171
>::Type
172
,
typename
If< IsTransposeVector<T1>
173
,
typename
If< IsTransposeVector<T2>
174
,
TDVecTSVecAddExprTrait<T1,T2>
175
, Failure
176
>::Type
177
,
typename
If< IsTransposeVector<T2>
178
, Failure
179
,
DVecSVecAddExprTrait<T1,T2>
180
>::Type
181
>::Type
182
>::Type
183
,
typename
If< IsDenseVector<T2>
184
,
typename
If< IsTransposeVector<T1>
185
,
typename
If< IsTransposeVector<T2>
186
,
TSVecTDVecAddExprTrait<T1,T2>
187
, Failure
188
>::Type
189
,
typename
If< IsTransposeVector<T2>
190
, Failure
191
,
SVecDVecAddExprTrait<T1,T2>
192
>::Type
193
>::Type
194
,
typename
If< IsTransposeVector<T1>
195
,
typename
If< IsTransposeVector<T2>
196
,
TSVecTSVecAddExprTrait<T1,T2>
197
, Failure
198
>::Type
199
,
typename
If< IsTransposeVector<T2>
200
, Failure
201
,
SVecSVecAddExprTrait<T1,T2>
202
>::Type
203
>::Type
204
>::Type
205
>::Type
206
, Failure
207
>::Type
208
,
typename
If< IsNumeric<T1>
209
,
typename
If< IsNumeric<T2>
210
,
AddTrait<T1,T2>
211
, Failure
212
>::Type
213
, Failure
214
>::Type
215
>::Type
216
>::Type Tmp;
217
218
typedef
typename
RemoveReference< typename RemoveCV<T1>::Type
>::Type Type1;
219
typedef
typename
RemoveReference< typename RemoveCV<T2>::Type
>::Type Type2;
221
//**********************************************************************************************
222
223
public
:
224
//**********************************************************************************************
226
typedef
typename
SelectType< qualified, AddExprTrait<Type1,Type2>
, Tmp >::Type::Type Type;
228
//**********************************************************************************************
229
};
230
//*************************************************************************************************
231
232
}
// namespace blaze
233
234
#endif
Generated on Sun Jan 20 2013 08:14:37 by
1.8.3