All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TDVecScalarMultExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_TDVECSCALARMULTEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_TDVECSCALARMULTEXPRTRAIT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
35 #include <blaze/util/InvalidType.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 TDVecScalarMultExprTraitHelper
61 {
62  private:
63  //**********************************************************************************************
64  typedef typename MultTrait<typename BaseElementType<VT>::Type,ST>::Type ElementType;
65  //**********************************************************************************************
66 
67  public:
68  //**********************************************************************************************
69  typedef DVecScalarMultExpr<VT,ElementType,true> Type;
70  //**********************************************************************************************
71 };
73 //*************************************************************************************************
74 
75 
76 //*************************************************************************************************
81 template< typename VT
82  , typename ST >
83 struct TDVecScalarMultExprTraitHelper<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 dense vector
105  , typename ST > // Type of the right-hand side scalar
107 {
108  private:
109  //**********************************************************************************************
113 
117  //**********************************************************************************************
118 
119  //**********************************************************************************************
121  typedef TDVecScalarMultExprTraitHelper<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, TDVecScalarMultExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
133  //**********************************************************************************************
134 };
135 //*************************************************************************************************
136 
137 } // namespace blaze
138 
139 #endif