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 
43 #include <utility>
46 #include <blaze/util/InvalidType.h>
47 #include <blaze/util/mpl/If.h>
49 
50 
51 namespace blaze {
52 
53 //=================================================================================================
54 //
55 // CLASS DEFINITION
56 //
57 //=================================================================================================
58 
59 //*************************************************************************************************
68 template< typename VT // Type of the vector operand
69  , bool AF > // Alignment Flag
71 {
72  private:
73  //**struct Failure******************************************************************************
75  struct Failure { using Type = INVALID_TYPE; };
77  //**********************************************************************************************
78 
79  //**struct Result*******************************************************************************
81  struct Result { using Type = decltype( subvector<AF>( std::declval<VT>()
82  , std::declval<size_t>()
83  , std::declval<size_t>() ) ); };
85  //**********************************************************************************************
86 
87  public:
88  //**********************************************************************************************
90  using Type = typename If_< IsVector< RemoveReference_<VT> >
91  , Result
92  , Failure >::Type;
94  //**********************************************************************************************
95 };
96 //*************************************************************************************************
97 
98 
99 //*************************************************************************************************
112 template< typename VT // Type of the vector operand
113  , bool AF > // Alignment Flag
115 //*************************************************************************************************
116 
117 } // namespace blaze
118 
119 #endif
Evaluation of the expression type type of a subvector operation.Via this type trait it is possible to...
Definition: SubvectorExprTrait.h:70
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
typename SubvectorExprTrait< VT, AF >::Type SubvectorExprTrait_
Auxiliary alias declaration for the SubvectorExprTrait type trait.The SubvectorExprTrait_ alias decla...
Definition: SubvectorExprTrait.h:114
Header file for the IsVector type trait.
Header file for all forward declarations for views.
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:154
Header file for the RemoveReference type trait.