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
TSVecDVecMultExprTrait.h
Go to the documentation of this file.
1
//=================================================================================================
20
//=================================================================================================
21
22
#ifndef _BLAZE_MATH_TRAITS_TSVECDVECMULTEXPRTRAIT_H_
23
#define _BLAZE_MATH_TRAITS_TSVECDVECMULTEXPRTRAIT_H_
24
25
26
//*************************************************************************************************
27
// Includes
28
//*************************************************************************************************
29
30
#include <
blaze/math/traits/MultTrait.h
>
31
#include <
blaze/math/typetraits/IsDenseVector.h
>
32
#include <
blaze/math/typetraits/IsSparseVector.h
>
33
#include <
blaze/math/typetraits/IsTransposeVector.h
>
34
#include <
blaze/util/InvalidType.h
>
35
#include <
blaze/util/SelectType.h
>
36
#include <
blaze/util/typetraits/IsConst.h
>
37
#include <
blaze/util/typetraits/IsReference.h
>
38
#include <
blaze/util/typetraits/IsVolatile.h
>
39
#include <
blaze/util/typetraits/RemoveCV.h
>
40
#include <
blaze/util/typetraits/RemoveReference.h
>
41
42
43
namespace
blaze {
44
45
//=================================================================================================
46
//
47
// CLASS DEFINITION
48
//
49
//=================================================================================================
50
51
//*************************************************************************************************
56
template
<
typename
VT1
57
,
typename
VT2
58
,
bool
Valid >
59
struct
TSVecDVecMultExprTraitHelper
60
{
61
//**********************************************************************************************
62
typedef
INVALID_TYPE Type;
63
//**********************************************************************************************
64
};
66
//*************************************************************************************************
67
68
69
//*************************************************************************************************
74
template
<
typename
VT1
75
,
typename
VT2 >
76
struct
TSVecDVecMultExprTraitHelper<VT1,VT2,true>
77
{
78
//**********************************************************************************************
79
typedef
typename
MultTrait<typename VT1::ElementType,typename VT2::ElementType>::Type Type;
80
//**********************************************************************************************
81
};
83
//*************************************************************************************************
84
85
86
//*************************************************************************************************
97
template
<
typename
VT1
// Type of the left-hand side transpose sparse vector
98
,
typename
VT2 >
// Type of the right-hand side non-transpose dense vector
99
struct
TSVecDVecMultExprTrait
100
{
101
private
:
102
//**********************************************************************************************
104
enum
{ qualified =
IsConst<VT1>::value
||
IsVolatile<VT1>::value
||
IsReference<VT1>::value
||
105
IsConst<VT2>::value
||
IsVolatile<VT2>::value
||
IsReference<VT2>::value
};
106
107
enum
{ valid =
IsSparseVector<VT1>::value
&&
IsTransposeVector<VT1>::value
&&
108
IsDenseVector<VT2>::value
&& !
IsTransposeVector<VT2>::value
};
110
//**********************************************************************************************
111
112
//**********************************************************************************************
114
typedef
TSVecDVecMultExprTraitHelper<VT1,VT2,valid> Tmp;
115
116
typedef
typename
RemoveReference< typename RemoveCV<VT1>::Type
>::Type Type1;
117
typedef
typename
RemoveReference< typename RemoveCV<VT2>::Type
>::Type Type2;
119
//**********************************************************************************************
120
121
public
:
122
//**********************************************************************************************
124
typedef
typename
SelectType< qualified, TSVecDVecMultExprTrait<Type1,Type2>
, Tmp >::Type::Type Type;
126
//**********************************************************************************************
127
};
128
//*************************************************************************************************
129
130
}
// namespace blaze
131
132
#endif
Generated on Sun Jan 20 2013 08:14:38 by
1.8.3