All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DVecScalarDivExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_DVECSCALARDIVEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_DVECSCALARDIVEXPRTRAIT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
36 #include <blaze/util/InvalidType.h>
37 #include <blaze/util/SelectType.h>
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // CLASS DEFINITION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
62 template< typename VT
63  , typename ST
64  , bool Condition >
65 struct DVecScalarDivExprTraitHelper
66 {
67  private:
68  //**********************************************************************************************
69  typedef typename NumericElementType<VT>::Type NET;
70  typedef typename SelectType< IsComplex<NET>::value && IsBuiltin<ST>::value
71  , typename BaseElementType<VT>::Type
72  , typename DivTrait<NET,ST>::Type
73  >::Type ElementType;
74  //**********************************************************************************************
75 
76  public:
77  //**********************************************************************************************
78  typedef typename SelectType< IsFloatingPoint<ElementType>::value
79  , DVecScalarMultExpr<VT,ElementType,false>
80  , DVecScalarDivExpr<VT,ElementType,false> >::Type Type;
81  //**********************************************************************************************
82 };
84 //*************************************************************************************************
85 
86 
87 //*************************************************************************************************
92 template< typename VT
93  , typename ST >
94 struct DVecScalarDivExprTraitHelper<VT,ST,false>
95 {
96  public:
97  //**********************************************************************************************
98  typedef INVALID_TYPE Type;
99  //**********************************************************************************************
100 };
102 //*************************************************************************************************
103 
104 
105 //*************************************************************************************************
115 template< typename VT // Type of the left-hand side dense vector
116  , typename ST > // Type of the right-hand side scalar
118 {
119  private:
120  //**********************************************************************************************
124 
128  //**********************************************************************************************
129 
130  //**********************************************************************************************
132  typedef DVecScalarDivExprTraitHelper<VT,ST,condition> Tmp;
133 
134  typedef typename RemoveReference< typename RemoveCV<VT>::Type >::Type Type1;
135  typedef typename RemoveReference< typename RemoveCV<ST>::Type >::Type Type2;
137  //**********************************************************************************************
138 
139  public:
140  //**********************************************************************************************
142  typedef typename SelectType< qualified, DVecScalarDivExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
144  //**********************************************************************************************
145 };
146 //*************************************************************************************************
147 
148 } // namespace blaze
149 
150 #endif