SubvectorExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_SUBVECTOREXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_SUBVECTOREXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
49 #include <blaze/util/InvalidType.h>
50 #include <blaze/util/mpl/If.h>
51 #include <blaze/util/mpl/Or.h>
58 
59 
60 namespace blaze {
61 
62 //=================================================================================================
63 //
64 // CLASS DEFINITION
65 //
66 //=================================================================================================
67 
68 //*************************************************************************************************
77 template< typename VT // Type of the vector operand
78  , bool AF > // Alignment Flag
80 {
81  private:
82  //**struct Failure******************************************************************************
84  struct Failure { using Type = INVALID_TYPE; };
86  //**********************************************************************************************
87 
88  //**struct Result*******************************************************************************
90  template< typename T >
91  struct Result { using Type = Subvector<T,AF,IsRowVector<T>::value,IsDenseVector<T>::value>; };
93  //**********************************************************************************************
94 
95  //**********************************************************************************************
97  using Tmp = RemoveReference_<VT>;
99  //**********************************************************************************************
100 
101  public:
102  //**********************************************************************************************
104  using Type = typename If_< Or< IsComputation<Tmp>, IsTransExpr<Tmp> >
107  , Failure >
109  , Result<Tmp>
110  , Failure >
111  >::Type;
113  //**********************************************************************************************
114 };
115 //*************************************************************************************************
116 
117 
118 //*************************************************************************************************
131 template< typename VT // Type of the vector operand
132  , bool AF > // Alignment Flag
134 //*************************************************************************************************
135 
136 } // namespace blaze
137 
138 #endif
View on a specific subvector of a dense or sparse vector.The Subvector class template represents a vi...
Definition: Forward.h:50
Evaluation of the expression type type of a subvector operation.Via this type trait it is possible to...
Definition: SubvectorExprTrait.h:79
Compile time check for volatile data types.The IsVolatile type trait tests whether or not the given t...
Definition: IsVolatile.h:75
Header file for the RemoveCV type trait.
Header file for the IsRowVector type trait.
Header file for the IsTransExpr type trait class.
Header file for the IsVolatile type trait.
Header file for the Decay type trait.
Compile time check for dense vector types.This type trait tests whether or not the given template par...
Definition: IsDenseVector.h:78
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.
typename SubvectorExprTrait< VT, AF >::Type SubvectorExprTrait_
Auxiliary alias declaration for the SubvectorExprTrait type trait.The SubvectorExprTrait_ alias decla...
Definition: SubvectorExprTrait.h:133
typename RemoveReference< T >::Type RemoveReference_
Auxiliary alias declaration for the RemoveReference type trait.The RemoveReference_ alias declaration...
Definition: RemoveReference.h:95
Header file for the IsVector type trait.
Compile time check whether the given type is a transposition expression template.This type trait clas...
Definition: IsTransExpr.h:71
Header file for all forward declarations for views.
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.
Header file for the RemoveReference type trait.
Header file for the IsDenseVector type trait.
Header file for the IsComputation type trait class.