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
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
30
#include <
blaze/math/traits/DMatDMatSubExprTrait.h
>
31
#include <
blaze/math/traits/DMatSMatSubExprTrait.h
>
32
#include <
blaze/math/traits/DMatTDMatSubExprTrait.h
>
33
#include <
blaze/math/traits/DMatTSMatSubExprTrait.h
>
34
#include <
blaze/math/traits/DVecDVecSubExprTrait.h
>
35
#include <
blaze/math/traits/DVecSVecSubExprTrait.h
>
36
#include <
blaze/math/traits/SMatDMatSubExprTrait.h
>
37
#include <
blaze/math/traits/SMatSMatSubExprTrait.h
>
38
#include <
blaze/math/traits/SMatTDMatSubExprTrait.h
>
39
#include <
blaze/math/traits/SMatTSMatSubExprTrait.h
>
40
#include <
blaze/math/traits/SubTrait.h
>
41
#include <
blaze/math/traits/SVecDVecSubExprTrait.h
>
42
#include <
blaze/math/traits/SVecSVecSubExprTrait.h
>
43
#include <
blaze/math/traits/TDMatDMatSubExprTrait.h
>
44
#include <
blaze/math/traits/TDMatSMatSubExprTrait.h
>
45
#include <
blaze/math/traits/TDMatTDMatSubExprTrait.h
>
46
#include <
blaze/math/traits/TDMatTSMatSubExprTrait.h
>
47
#include <
blaze/math/traits/TDVecTDVecSubExprTrait.h
>
48
#include <
blaze/math/traits/TDVecTSVecSubExprTrait.h
>
49
#include <
blaze/math/traits/TSMatDMatSubExprTrait.h
>
50
#include <
blaze/math/traits/TSMatSMatSubExprTrait.h
>
51
#include <
blaze/math/traits/TSMatTDMatSubExprTrait.h
>
52
#include <
blaze/math/traits/TSMatTSMatSubExprTrait.h
>
53
#include <
blaze/math/traits/TSVecTDVecSubExprTrait.h
>
54
#include <
blaze/math/traits/TSVecTSVecSubExprTrait.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 subtraction operand
89
,
typename
T2 >
// Type of the right-hand side subtraction operand
90
struct
SubExprTrait
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
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>
115
,
DMatDMatSubExprTrait<T1,T2>
116
,
DMatTDMatSubExprTrait<T1,T2>
117
>::Type
118
,
typename
If< IsRowMajorMatrix<T2>
119
,
TDMatDMatSubExprTrait<T1,T2>
120
,
TDMatTDMatSubExprTrait<T1,T2>
121
>::Type
122
>::Type
123
,
typename
If< IsRowMajorMatrix<T1>
124
,
typename
If< IsRowMajorMatrix<T2>
125
,
DMatSMatSubExprTrait<T1,T2>
126
,
DMatTSMatSubExprTrait<T1,T2>
127
>::Type
128
,
typename
If< IsRowMajorMatrix<T2>
129
,
TDMatSMatSubExprTrait<T1,T2>
130
,
TDMatTSMatSubExprTrait<T1,T2>
131
>::Type
132
>::Type
133
>::Type
134
,
typename
If< IsDenseMatrix<T2>
135
,
typename
If< IsRowMajorMatrix<T1>
136
,
typename
If< IsRowMajorMatrix<T2>
137
,
SMatDMatSubExprTrait<T1,T2>
138
,
SMatTDMatSubExprTrait<T1,T2>
139
>::Type
140
,
typename
If< IsRowMajorMatrix<T2>
141
,
TSMatDMatSubExprTrait<T1,T2>
142
,
TSMatTDMatSubExprTrait<T1,T2>
143
>::Type
144
>::Type
145
,
typename
If< IsRowMajorMatrix<T1>
146
,
typename
If< IsRowMajorMatrix<T2>
147
,
SMatSMatSubExprTrait<T1,T2>
148
,
SMatTSMatSubExprTrait<T1,T2>
149
>::Type
150
,
typename
If< IsRowMajorMatrix<T2>
151
,
TSMatSMatSubExprTrait<T1,T2>
152
,
TSMatTSMatSubExprTrait<T1,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>
165
,
TDVecTDVecSubExprTrait<T1,T2>
166
, Failure
167
>::Type
168
,
typename
If< IsTransposeVector<T2>
169
, Failure
170
,
DVecDVecSubExprTrait<T1,T2>
171
>::Type
172
>::Type
173
,
typename
If< IsTransposeVector<T1>
174
,
typename
If< IsTransposeVector<T2>
175
,
TDVecTSVecSubExprTrait<T1,T2>
176
, Failure
177
>::Type
178
,
typename
If< IsTransposeVector<T2>
179
, Failure
180
,
DVecSVecSubExprTrait<T1,T2>
181
>::Type
182
>::Type
183
>::Type
184
,
typename
If< IsDenseVector<T2>
185
,
typename
If< IsTransposeVector<T1>
186
,
typename
If< IsTransposeVector<T2>
187
,
TSVecTDVecSubExprTrait<T1,T2>
188
, Failure
189
>::Type
190
,
typename
If< IsTransposeVector<T2>
191
, Failure
192
,
SVecDVecSubExprTrait<T1,T2>
193
>::Type
194
>::Type
195
,
typename
If< IsTransposeVector<T1>
196
,
typename
If< IsTransposeVector<T2>
197
,
TSVecTSVecSubExprTrait<T1,T2>
198
, Failure
199
>::Type
200
,
typename
If< IsTransposeVector<T2>
201
, Failure
202
,
SVecSVecSubExprTrait<T1,T2>
203
>::Type
204
>::Type
205
>::Type
206
>::Type
207
, Failure
208
>::Type
209
,
typename
If< IsNumeric<T1>
210
,
typename
If< IsNumeric<T2>
211
,
SubTrait<T1,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
Generated on Fri May 24 2013 16:39:56 by
1.8.3.1