All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TDMatScalarMultExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_TDMATSCALARMULTEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_TDMATSCALARMULTEXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
49 #include <blaze/util/InvalidType.h>
50 #include <blaze/util/SelectType.h>
59 
60 
61 namespace blaze {
62 
63 //=================================================================================================
64 //
65 // CLASS DEFINITION
66 //
67 //=================================================================================================
68 
69 //*************************************************************************************************
74 template< typename MT
75  , typename ST
76  , bool Condition >
77 struct TDMatScalarMultExprTraitHelper
78 {
79  private:
80  //**********************************************************************************************
81  typedef typename NumericElementType<MT>::Type NET;
82  typedef typename SelectType< IsComplex<NET>::value && IsBuiltin<ST>::value
83  , typename BaseElementType<MT>::Type
84  , typename MultTrait<NET,ST>::Type
85  >::Type ElementType;
86  //**********************************************************************************************
87 
88  public:
89  //**********************************************************************************************
90  typedef DMatScalarMultExpr<MT,ElementType,true> Type;
91  //**********************************************************************************************
92 };
94 //*************************************************************************************************
95 
96 
97 //*************************************************************************************************
102 template< typename MT
103  , typename ST >
104 struct TDMatScalarMultExprTraitHelper<MT,ST,false>
105 {
106  public:
107  //**********************************************************************************************
108  typedef INVALID_TYPE Type;
109  //**********************************************************************************************
110 };
112 //*************************************************************************************************
113 
114 
115 //*************************************************************************************************
125 template< typename MT // Type of the left-hand side dense matrix
126  , typename ST > // Type of the right-hand side scalar
128 {
129  private:
130  //**********************************************************************************************
134 
138  //**********************************************************************************************
139 
140  //**********************************************************************************************
142  typedef TDMatScalarMultExprTraitHelper<MT,ST,condition> Tmp;
143 
144  typedef typename RemoveReference< typename RemoveCV<MT>::Type >::Type Type1;
145  typedef typename RemoveReference< typename RemoveCV<ST>::Type >::Type Type2;
147  //**********************************************************************************************
148 
149  public:
150  //**********************************************************************************************
152  typedef typename SelectType< qualified, TDMatScalarMultExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
154  //**********************************************************************************************
155 };
156 //*************************************************************************************************
157 
158 } // namespace blaze
159 
160 #endif
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:98
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:94
Header file for the RemoveCV type trait.
Header file for the IsColumnMajorMatrix type trait.
Header file for the IsVolatile type trait.
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the multiplication trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2382
Compile time check for dense matrix types.This type trait tests whether or not the given template par...
Definition: IsDenseMatrix.h:103
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
Header file for the BaseElementType type trait.
Evaluation of the expression type of a transpose dense matrix/scalar multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose dense matrix/scalar multiplication. Given the column-major dense matrix type MT and the scalar type ST, the nested type Type corresponds to the resulting expression type. In case either MT is not a column-major dense matrix type or ST is not a scalar type, the resulting Type is set to INVALID_TYPE.
Definition: TDMatScalarMultExprTrait.h:127
Header file for the IsNumeric type trait.
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
Header file for the IsConst type trait.
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:104
Utility type for generic codes.
Header file for the IsReference type trait.
Header file for the RemoveReference type trait.
Compile time check for constant data types.The IsConst type trait tests whether or not the given temp...
Definition: IsConst.h:94
Header file for the NumericElementType type trait.
Header file for the IsBuiltin type trait.
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:94
Header file for the IsComplex type trait.