All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SMatScalarDivExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_SMATSCALARDIVEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_SMATSCALARDIVEXPRTRAIT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
35 #include <blaze/util/InvalidType.h>
36 #include <blaze/util/SelectType.h>
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
59 template< typename MT
60  , typename ST
61  , bool Condition >
62 struct SMatScalarDivExprTraitHelper
63 {
64  private:
65  //**********************************************************************************************
66  typedef typename DivTrait<typename BaseElementType<MT>::Type,ST>::Type ElementType;
67  //**********************************************************************************************
68 
69  public:
70  //**********************************************************************************************
71  typedef typename SelectType< IsFloatingPoint<ElementType>::value
72  , SMatScalarMultExpr<MT,ElementType,false>
73  , SMatScalarDivExpr<MT,ElementType,false> >::Type Type;
74  //**********************************************************************************************
75 };
77 //*************************************************************************************************
78 
79 
80 //*************************************************************************************************
85 template< typename MT
86  , typename ST >
87 struct SMatScalarDivExprTraitHelper<MT,ST,false>
88 {
89  public:
90  //**********************************************************************************************
91  typedef INVALID_TYPE Type;
92  //**********************************************************************************************
93 };
95 //*************************************************************************************************
96 
97 
98 //*************************************************************************************************
108 template< typename MT // Type of the left-hand side sparse matrix
109  , typename ST > // Type of the right-hand side scalar
111 {
112  private:
113  //**********************************************************************************************
117 
121  //**********************************************************************************************
122 
123  //**********************************************************************************************
125  typedef SMatScalarDivExprTraitHelper<MT,ST,condition> Tmp;
126 
127  typedef typename RemoveReference< typename RemoveCV<MT>::Type >::Type Type1;
128  typedef typename RemoveReference< typename RemoveCV<ST>::Type >::Type Type2;
130  //**********************************************************************************************
131 
132  public:
133  //**********************************************************************************************
135  typedef typename SelectType< qualified, SMatScalarDivExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
137  //**********************************************************************************************
138 };
139 //*************************************************************************************************
140 
141 } // namespace blaze
142 
143 #endif