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
DivExprTrait.h
Go to the documentation of this file.
1
//=================================================================================================
20
//=================================================================================================
21
22
#ifndef _BLAZE_MATH_TRAITS_DIVEXPRTRAIT_H_
23
#define _BLAZE_MATH_TRAITS_DIVEXPRTRAIT_H_
24
25
26
//*************************************************************************************************
27
// Includes
28
//*************************************************************************************************
29
30
#include <
blaze/math/traits/DivTrait.h
>
31
#include <
blaze/math/traits/DMatScalarDivExprTrait.h
>
32
#include <
blaze/math/traits/DVecScalarDivExprTrait.h
>
33
#include <
blaze/math/traits/SMatScalarDivExprTrait.h
>
34
#include <
blaze/math/traits/SVecScalarDivExprTrait.h
>
35
#include <
blaze/math/traits/TDMatScalarDivExprTrait.h
>
36
#include <
blaze/math/traits/TDVecScalarDivExprTrait.h
>
37
#include <
blaze/math/traits/TSMatScalarDivExprTrait.h
>
38
#include <
blaze/math/traits/TSVecScalarDivExprTrait.h
>
39
#include <
blaze/math/typetraits/IsDenseMatrix.h
>
40
#include <
blaze/math/typetraits/IsMatrix.h
>
41
#include <
blaze/math/typetraits/IsRowMajorMatrix.h
>
42
#include <
blaze/math/typetraits/IsTransposeVector.h
>
43
#include <
blaze/math/typetraits/IsVector.h
>
44
#include <
blaze/util/InvalidType.h
>
45
#include <
blaze/util/mpl/If.h
>
46
#include <
blaze/util/typetraits/IsConst.h
>
47
#include <
blaze/util/typetraits/IsNumeric.h
>
48
#include <
blaze/util/typetraits/IsReference.h
>
49
#include <
blaze/util/typetraits/IsVolatile.h
>
50
#include <
blaze/util/typetraits/RemoveCV.h
>
51
#include <
blaze/util/typetraits/RemoveReference.h
>
52
53
54
namespace
blaze {
55
56
//=================================================================================================
57
//
58
// CLASS DEFINITION
59
//
60
//=================================================================================================
61
62
//*************************************************************************************************
72
template
<
typename
T1
// Type of the left-hand side division operand
73
,
typename
T2 >
// Type of the right-hand side division operand
74
struct
DivExprTrait
75
{
76
private
:
77
//**struct Failure******************************************************************************
79
struct
Failure {
typedef
INVALID_TYPE Type; };
81
//**********************************************************************************************
82
83
//**********************************************************************************************
85
enum
{ qualified =
IsConst<T1>::value
||
IsVolatile<T1>::value
||
IsReference<T1>::value
||
86
IsConst<T2>::value
||
IsVolatile<T2>::value
||
IsReference<T2>::value
};
88
//**********************************************************************************************
89
90
//**********************************************************************************************
92
typedef
typename
If< IsMatrix<T1>
93
,
typename
If< IsDenseMatrix<T1>
94
,
typename
If< IsRowMajorMatrix<T1>
95
,
typename
If< IsNumeric<T2>
96
,
DMatScalarDivExprTrait<T1,T2>
97
, Failure
98
>::Type
99
,
typename
If< IsNumeric<T2>
100
,
TDMatScalarDivExprTrait<T1,T2>
101
, Failure
102
>::Type
103
>::Type
104
,
typename
If< IsRowMajorMatrix<T1>
105
,
typename
If< IsNumeric<T2>
106
,
SMatScalarDivExprTrait<T1,T2>
107
, Failure
108
>::Type
109
,
typename
If< IsNumeric<T2>
110
,
TSMatScalarDivExprTrait<T1,T2>
111
, Failure
112
>::Type
113
>::Type
114
>::Type
115
,
typename
If< IsVector<T1>
116
,
typename
If< IsDenseVector<T1>
117
,
typename
If< IsTransposeVector<T1>
118
,
typename
If< IsNumeric<T2>
119
,
TDVecScalarDivExprTrait<T1,T2>
120
, Failure
121
>::Type
122
,
typename
If< IsNumeric<T2>
123
,
DVecScalarDivExprTrait<T1,T2>
124
, Failure
125
>::Type
126
>::Type
127
,
typename
If< IsTransposeVector<T1>
128
,
typename
If< IsNumeric<T2>
129
,
TSVecScalarDivExprTrait<T1,T2>
130
, Failure
131
>::Type
132
,
typename
If< IsNumeric<T2>
133
,
SVecScalarDivExprTrait<T1,T2>
134
, Failure
135
>::Type
136
>::Type
137
>::Type
138
,
typename
If< IsNumeric<T1>
139
,
typename
If< IsNumeric<T2>
140
,
DivTrait<T1,T2>
141
, Failure
142
>::Type
143
, Failure
144
>::Type
145
>::Type
146
>::Type Tmp;
147
148
typedef
typename
RemoveReference< typename RemoveCV<T1>::Type
>::Type Type1;
149
typedef
typename
RemoveReference< typename RemoveCV<T2>::Type
>::Type Type2;
151
//**********************************************************************************************
152
153
public
:
154
//**********************************************************************************************
156
typedef
typename
SelectType< qualified, DivExprTrait<Type1,Type2>
, Tmp >::Type::Type Type;
158
//**********************************************************************************************
159
};
160
//*************************************************************************************************
161
162
}
// namespace blaze
163
164
#endif
Generated on Fri May 24 2013 16:39:55 by
1.8.3.1