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
AbsExprTrait.h
Go to the documentation of this file.
1
//=================================================================================================
20
//=================================================================================================
21
22
#ifndef _BLAZE_MATH_TRAITS_ABSEXPRTRAIT_H_
23
#define _BLAZE_MATH_TRAITS_ABSEXPRTRAIT_H_
24
25
26
//*************************************************************************************************
27
// Includes
28
//*************************************************************************************************
29
30
#include <
blaze/math/traits/DMatAbsExprTrait.h
>
31
#include <
blaze/math/traits/DVecAbsExprTrait.h
>
32
#include <
blaze/math/traits/SMatAbsExprTrait.h
>
33
#include <
blaze/math/traits/SVecAbsExprTrait.h
>
34
#include <
blaze/math/traits/TDMatAbsExprTrait.h
>
35
#include <
blaze/math/traits/TDVecAbsExprTrait.h
>
36
#include <
blaze/math/traits/TSMatAbsExprTrait.h
>
37
#include <
blaze/math/traits/TSVecAbsExprTrait.h
>
38
#include <
blaze/math/typetraits/IsDenseMatrix.h
>
39
#include <
blaze/math/typetraits/IsDenseVector.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
T >
// Type of the absolute value operand
73
struct
AbsExprTrait
74
{
75
private
:
76
//**struct ScalarAbs****************************************************************************
78
template
<
typename
ST >
79
struct
ScalarAbs {
typedef
T Type; };
81
//**********************************************************************************************
82
83
//**struct Failure******************************************************************************
85
struct
Failure {
typedef
INVALID_TYPE Type; };
87
//**********************************************************************************************
88
89
//**********************************************************************************************
91
enum
{ qualified =
IsConst<T>::value
||
IsVolatile<T>::value
||
IsReference<T>::value
};
93
//**********************************************************************************************
94
95
//**********************************************************************************************
97
typedef
typename
If< IsMatrix<T>
98
,
typename
If< IsDenseMatrix<T>
99
,
typename
If< IsRowMajorMatrix<T>
100
,
DMatAbsExprTrait<T>
101
,
TDMatAbsExprTrait<T>
102
>::Type
103
,
typename
If< IsRowMajorMatrix<T>
104
,
SMatAbsExprTrait<T>
105
,
TSMatAbsExprTrait<T>
106
>::Type
107
>::Type
108
,
typename
If< IsVector<T>
109
,
typename
If< IsDenseVector<T>
110
,
typename
If< IsTransposeVector<T>
111
,
TDVecAbsExprTrait<T>
112
,
DVecAbsExprTrait<T>
113
>::Type
114
,
typename
If< IsTransposeVector<T>
115
,
TSVecAbsExprTrait<T>
116
,
SVecAbsExprTrait<T>
117
>::Type
118
>::Type
119
,
typename
If< IsNumeric<T>
120
, ScalarAbs<T>
121
, Failure
122
>::Type
123
>::Type
124
>::Type Tmp;
125
126
typedef
typename
RemoveReference< typename RemoveCV<T>::Type
>::Type Type1;
128
//**********************************************************************************************
129
130
public
:
131
//**********************************************************************************************
133
typedef
typename
SelectType< qualified, AbsExprTrait<Type1>
, Tmp >::Type::Type Type;
135
//**********************************************************************************************
136
};
137
//*************************************************************************************************
138
139
}
// namespace blaze
140
141
#endif
Generated on Sun Jul 28 2013 17:06:07 by
1.8.3.1