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
CrossExprTrait.h
Go to the documentation of this file.
1
//=================================================================================================
20
//=================================================================================================
21
22
#ifndef _BLAZE_MATH_TRAITS_CROSSEXPRTRAIT_H_
23
#define _BLAZE_MATH_TRAITS_CROSSEXPRTRAIT_H_
24
25
26
//*************************************************************************************************
27
// Includes
28
//*************************************************************************************************
29
30
#include <
blaze/math/traits/DVecDVecCrossExprTrait.h
>
31
#include <
blaze/math/traits/DVecSVecCrossExprTrait.h
>
32
#include <
blaze/math/traits/SVecDVecCrossExprTrait.h
>
33
#include <
blaze/math/traits/SVecSVecCrossExprTrait.h
>
34
#include <
blaze/math/typetraits/IsTransposeVector.h
>
35
#include <
blaze/math/typetraits/IsVector.h
>
36
#include <
blaze/util/InvalidType.h
>
37
#include <
blaze/util/mpl/If.h
>
38
#include <
blaze/util/typetraits/IsConst.h
>
39
#include <
blaze/util/typetraits/IsNumeric.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
//*************************************************************************************************
64
template
<
typename
T1
// Type of the left-hand side cross product operand
65
,
typename
T2 >
// Type of the right-hand side cross product operand
66
struct
CrossExprTrait
67
{
68
private
:
69
//**struct Failure******************************************************************************
71
struct
Failure {
typedef
INVALID_TYPE Type; };
73
//**********************************************************************************************
74
75
//**********************************************************************************************
77
enum
{ qualified =
IsConst<T1>::value
||
IsVolatile<T1>::value
||
IsReference<T1>::value
||
78
IsConst<T2>::value
||
IsVolatile<T2>::value
||
IsReference<T2>::value
};
80
//**********************************************************************************************
81
82
//**********************************************************************************************
84
typedef
typename
If< IsVector<T1>
85
,
typename
If< IsVector<T2>
86
,
typename
IfNot< IsTransposeVector<T1>
87
,
typename
IfNot< IsTransposeVector<T2>
88
,
typename
If< IsDenseVector<T1>
89
,
typename
If< IsDenseVector<T2>
90
,
DVecDVecCrossExprTrait<T1,T2>
91
,
DVecSVecCrossExprTrait<T1,T2>
92
>::Type
93
,
typename
If< IsDenseVector<T2>
94
,
SVecDVecCrossExprTrait<T1,T2>
95
,
SVecSVecCrossExprTrait<T1,T2>
96
>::Type
97
>::Type
98
, Failure
99
>::Type
100
, Failure
101
>::Type
102
, Failure
103
>::Type
104
, Failure
105
>::Type Tmp;
106
107
typedef
typename
RemoveReference< typename RemoveCV<T1>::Type
>::Type Type1;
108
typedef
typename
RemoveReference< typename RemoveCV<T2>::Type
>::Type Type2;
110
//**********************************************************************************************
111
112
public
:
113
//**********************************************************************************************
115
typedef
typename
SelectType< qualified, CrossExprTrait<Type1,Type2>
, Tmp >::Type::Type Type;
117
//**********************************************************************************************
118
};
119
//*************************************************************************************************
120
121
}
// namespace blaze
122
123
#endif
Generated on Sun Jan 20 2013 08:14:37 by
1.8.3