SVecSVecInnerExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_SVECSVECINNEREXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_SVECSVECINNEREXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
48 #include <blaze/util/InvalidType.h>
49 #include <blaze/util/mpl/And.h>
50 #include <blaze/util/mpl/If.h>
51 #include <blaze/util/mpl/Or.h>
56 
57 
58 namespace blaze {
59 
60 //=================================================================================================
61 //
62 // CLASS DEFINITION
63 //
64 //=================================================================================================
65 
66 //*************************************************************************************************
71 template< typename VT1
72  , typename VT2
73  , bool Valid >
74 struct SVecSVecInnerExprTraitHelper
75 {
76  //**********************************************************************************************
77  using Type = INVALID_TYPE;
78  //**********************************************************************************************
79 };
81 //*************************************************************************************************
82 
83 
84 //*************************************************************************************************
89 template< typename VT1
90  , typename VT2 >
91 struct SVecSVecInnerExprTraitHelper<VT1,VT2,true>
92 {
93  //**********************************************************************************************
94  using Type = MultTrait_< ElementType_<VT1>, ElementType_<VT2> >;
95  //**********************************************************************************************
96 };
98 //*************************************************************************************************
99 
100 
101 //*************************************************************************************************
112 template< typename VT1 // Type of the left-hand side transpose sparse vector
113  , typename VT2 > // Type of the right-hand side non-transpose sparse vector
115 {
116  private:
117  //**********************************************************************************************
119  enum : bool { valid = IsSparseVector<VT1>::value && IsRowVector<VT1>::value &&
122  //**********************************************************************************************
123 
124  public:
125  //**********************************************************************************************
130  , SVecSVecInnerExprTraitHelper<VT1,VT2,valid> >::Type;
132  //**********************************************************************************************
133 };
134 //*************************************************************************************************
135 
136 
137 //*************************************************************************************************
151 template< typename VT1 // Type of the left-hand side transpose sparse vector
152  , typename VT2 > // Type of the right-hand side non-transpose sparse vector
154 //*************************************************************************************************
155 
156 } // namespace blaze
157 
158 #endif
Compile time check for row vector types.This type trait tests whether or not the given template argum...
Definition: IsRowVector.h:80
Header file for auxiliary alias declarations.
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:75
typename Decay< T >::Type Decay_
Auxiliary alias declaration for the Decay type trait.The Decay_ alias declaration provides a convenie...
Definition: Decay.h:98
Header file for the IsRowVector type trait.
Header file for the And class template.
typename SVecSVecInnerExprTrait< VT1, VT2 >::Type SVecSVecInnerExprTrait_
Auxiliary alias declaration for the SVecSVecInnerExprTrait class template.The SVecSVecInnerExprTrait_...
Definition: SVecSVecInnerExprTrait.h:153
Header file for the IsVolatile type trait.
Header file for the Decay type trait.
Header file for the multiplication trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Header file for the Or class template.
Evaluation of the expression type of a transpose sparse vector/sparse vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse vector/sparse vector multiplication (inner product). Given the transpose sparse vector type VT1 and the non-transpose sparse vector type VT2, the nested type Type corresponds to the resulting expression type. In case either VT1 is not a transpose sparse vector type or VT2 is not a non-transpose sparse vector type, the resulting Type is set to INVALID_TYPE.
Definition: SVecSVecInnerExprTrait.h:114
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:78
Compile time check for column vector types.This type trait tests whether or not the given template ar...
Definition: IsColumnVector.h:80
Header file for the IsSparseVector type trait.
Header file for the IsConst type trait.
Utility type for generic codes.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
Header file for the IsReference type trait.
Compile time check for constant data types.The IsConst type trait tests whether or not the given temp...
Definition: IsConst.h:75
Compile time type check.This class tests whether the given template parameter T is a reference type (...
Definition: IsReference.h:75
Header file for the IsColumnVector type trait.