All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TDMatScalarMultExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_TDMATSCALARMULTEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_TDMATSCALARMULTEXPRTRAIT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
36 #include <blaze/util/InvalidType.h>
37 #include <blaze/util/SelectType.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
61 template< typename MT
62  , typename ST
63  , bool Condition >
64 struct TDMatScalarMultExprTraitHelper
65 {
66  private:
67  //**********************************************************************************************
68  typedef typename NumericElementType<MT>::Type NET;
69  typedef typename SelectType< IsComplex<NET>::value && IsBuiltin<ST>::value
70  , typename BaseElementType<MT>::Type
71  , typename MultTrait<NET,ST>::Type
72  >::Type ElementType;
73  //**********************************************************************************************
74 
75  public:
76  //**********************************************************************************************
77  typedef DMatScalarMultExpr<MT,ElementType,true> Type;
78  //**********************************************************************************************
79 };
81 //*************************************************************************************************
82 
83 
84 //*************************************************************************************************
89 template< typename MT
90  , typename ST >
91 struct TDMatScalarMultExprTraitHelper<MT,ST,false>
92 {
93  public:
94  //**********************************************************************************************
95  typedef INVALID_TYPE Type;
96  //**********************************************************************************************
97 };
99 //*************************************************************************************************
100 
101 
102 //*************************************************************************************************
112 template< typename MT // Type of the left-hand side dense matrix
113  , typename ST > // Type of the right-hand side scalar
115 {
116  private:
117  //**********************************************************************************************
121 
125  //**********************************************************************************************
126 
127  //**********************************************************************************************
129  typedef TDMatScalarMultExprTraitHelper<MT,ST,condition> Tmp;
130 
131  typedef typename RemoveReference< typename RemoveCV<MT>::Type >::Type Type1;
132  typedef typename RemoveReference< typename RemoveCV<ST>::Type >::Type Type2;
134  //**********************************************************************************************
135 
136  public:
137  //**********************************************************************************************
139  typedef typename SelectType< qualified, TDMatScalarMultExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
141  //**********************************************************************************************
142 };
143 //*************************************************************************************************
144 
145 } // namespace blaze
146 
147 #endif