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
TSVecScalarDivExprTrait.h
Go to the documentation of this file.
1
//=================================================================================================
20
//=================================================================================================
21
22
#ifndef _BLAZE_MATH_TRAITS_TSVECSCALARDIVEXPRTRAIT_H_
23
#define _BLAZE_MATH_TRAITS_TSVECSCALARDIVEXPRTRAIT_H_
24
25
26
//*************************************************************************************************
27
// Includes
28
//*************************************************************************************************
29
30
#include <
blaze/math/expressions/Forward.h
>
31
#include <
blaze/math/traits/DivTrait.h
>
32
#include <
blaze/math/typetraits/BaseElementType.h
>
33
#include <
blaze/math/typetraits/IsSparseVector.h
>
34
#include <
blaze/math/typetraits/IsTransposeVector.h
>
35
#include <
blaze/util/InvalidType.h
>
36
#include <
blaze/util/SelectType.h
>
37
#include <
blaze/util/typetraits/IsFloatingPoint.h
>
38
#include <
blaze/util/typetraits/IsNumeric.h
>
39
#include <
blaze/util/typetraits/IsConst.h
>
40
#include <
blaze/util/typetraits/IsReference.h
>
41
#include <
blaze/util/typetraits/IsVolatile.h
>
42
#include <
blaze/util/typetraits/RemoveCV.h
>
43
#include <
blaze/util/typetraits/RemoveReference.h
>
44
45
46
namespace
blaze {
47
48
//=================================================================================================
49
//
50
// CLASS DEFINITION
51
//
52
//=================================================================================================
53
54
//*************************************************************************************************
59
template
<
typename
VT
60
,
typename
ST
61
,
bool
Condition >
62
struct
TSVecScalarDivExprTraitHelper
63
{
64
private
:
65
//**********************************************************************************************
66
typedef
typename
DivTrait<typename BaseElementType<VT>::Type,ST>::Type ElementType;
67
//**********************************************************************************************
68
69
public
:
70
//**********************************************************************************************
71
typedef
typename
SelectType< IsFloatingPoint<ElementType>::value
72
,
SVecScalarMultExpr<VT,ElementType,true>
73
,
SVecScalarDivExpr<VT,ElementType,true>
>::Type Type;
74
//**********************************************************************************************
75
};
77
//*************************************************************************************************
78
79
80
//*************************************************************************************************
85
template
<
typename
VT
86
,
typename
ST >
87
struct
TSVecScalarDivExprTraitHelper<VT,ST,false>
88
{
89
public
:
90
//**********************************************************************************************
91
typedef
INVALID_TYPE Type;
92
//**********************************************************************************************
93
};
95
//*************************************************************************************************
96
97
98
//*************************************************************************************************
108
template
<
typename
VT
// Type of the left-hand side sparse vector
109
,
typename
ST >
// Type of the right-hand side scalar
110
struct
TSVecScalarDivExprTrait
111
{
112
private
:
113
//**********************************************************************************************
115
enum
{ qualified =
IsConst<VT>::value
||
IsVolatile<VT>::value
||
IsReference<VT>::value
||
116
IsConst<ST>::value
||
IsVolatile<ST>::value
||
IsReference<ST>::value
};
117
118
enum
{ condition =
IsSparseVector<VT>::value
&&
IsTransposeVector<VT>::value
&&
119
IsNumeric<ST>::value
};
121
//**********************************************************************************************
122
123
//**********************************************************************************************
125
typedef
TSVecScalarDivExprTraitHelper<VT,ST,condition> Tmp;
126
127
typedef
typename
RemoveReference< typename RemoveCV<VT>::Type
>::Type Type1;
128
typedef
typename
RemoveReference< typename RemoveCV<ST>::Type
>::Type Type2;
130
//**********************************************************************************************
131
132
public
:
133
//**********************************************************************************************
135
typedef
typename
SelectType< qualified, TSVecScalarDivExprTrait<Type1,Type2>
, Tmp >::Type::Type Type;
137
//**********************************************************************************************
138
};
139
//*************************************************************************************************
140
141
}
// namespace blaze
142
143
#endif
Generated on Sun Jan 20 2013 08:14:38 by
1.8.3