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
SVecScalarMultExprTrait.h
Go to the documentation of this file.
1
//=================================================================================================
20
//=================================================================================================
21
22
#ifndef _BLAZE_MATH_TRAITS_SVECSCALARMULTEXPRTRAIT_H_
23
#define _BLAZE_MATH_TRAITS_SVECSCALARMULTEXPRTRAIT_H_
24
25
26
//*************************************************************************************************
27
// Includes
28
//*************************************************************************************************
29
30
#include <
blaze/math/expressions/Forward.h
>
31
#include <
blaze/math/traits/MultTrait.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/typetraits/IsConst.h
>
37
#include <
blaze/util/typetraits/IsNumeric.h
>
38
#include <
blaze/util/typetraits/IsReference.h
>
39
#include <
blaze/util/typetraits/IsVolatile.h
>
40
#include <
blaze/util/typetraits/RemoveCV.h
>
41
#include <
blaze/util/typetraits/RemoveReference.h
>
42
43
44
namespace
blaze {
45
46
//=================================================================================================
47
//
48
// CLASS DEFINITION
49
//
50
//=================================================================================================
51
52
//*************************************************************************************************
57
template
<
typename
VT
58
,
typename
ST
59
,
bool
Condition >
60
struct
SVecScalarMultExprTraitHelper
61
{
62
private
:
63
//**********************************************************************************************
64
typedef
typename
MultTrait<typename BaseElementType<VT>::Type,ST>::Type ElementType;
65
//**********************************************************************************************
66
67
public
:
68
//**********************************************************************************************
69
typedef
SVecScalarMultExpr<VT,ElementType,false>
Type;
70
//**********************************************************************************************
71
};
73
//*************************************************************************************************
74
75
76
//*************************************************************************************************
81
template
<
typename
VT
82
,
typename
ST >
83
struct
SVecScalarMultExprTraitHelper<VT,ST,false>
84
{
85
public
:
86
//**********************************************************************************************
87
typedef
INVALID_TYPE Type;
88
//**********************************************************************************************
89
};
91
//*************************************************************************************************
92
93
94
//*************************************************************************************************
104
template
<
typename
VT
// Type of the left-hand side sparse vector
105
,
typename
ST >
// Type of the right-hand side scalar
106
struct
SVecScalarMultExprTrait
107
{
108
private
:
109
//**********************************************************************************************
111
enum
{ qualified =
IsConst<VT>::value
||
IsVolatile<VT>::value
||
IsReference<VT>::value
||
112
IsConst<ST>::value
||
IsVolatile<ST>::value
||
IsReference<ST>::value
};
113
114
enum
{ condition =
IsSparseVector<VT>::value
&& !
IsTransposeVector<VT>::value
&&
115
IsNumeric<ST>::value
};
117
//**********************************************************************************************
118
119
//**********************************************************************************************
121
typedef
SVecScalarMultExprTraitHelper<VT,ST,condition> Tmp;
122
123
typedef
typename
RemoveReference< typename RemoveCV<VT>::Type
>::Type Type1;
124
typedef
typename
RemoveReference< typename RemoveCV<ST>::Type
>::Type Type2;
126
//**********************************************************************************************
127
128
public
:
129
//**********************************************************************************************
131
typedef
typename
SelectType< qualified, SVecScalarMultExprTrait<Type1,Type2>
, Tmp >::Type::Type Type;
133
//**********************************************************************************************
134
};
135
//*************************************************************************************************
136
137
}
// namespace blaze
138
139
#endif
Generated on Sun Jan 20 2013 08:14:38 by
1.8.3