DeclHermExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_DECLHERMEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_DECLHERMEXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <utility>
45 #include <blaze/util/InvalidType.h>
46 #include <blaze/util/mpl/If.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // CLASS DEFINITION
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
68 template< typename T > // Type of the declherm operand
70 {
71  private:
72  //**struct Failure******************************************************************************
74  struct Failure { using Type = INVALID_TYPE; };
76  //**********************************************************************************************
77 
78  //**struct Result*******************************************************************************
80  struct Result { using Type = decltype( declherm( std::declval<T>() ) ); };
82  //**********************************************************************************************
83 
84  public:
85  //**********************************************************************************************
87  using Type = typename If_< IsMatrix< RemoveReference_<T> >
88  , Result
89  , Failure >::Type;
91  //**********************************************************************************************
92 };
93 //*************************************************************************************************
94 
95 
96 //*************************************************************************************************
109 template< typename T > // Type of the declherm operand
111 //*************************************************************************************************
112 
113 } // namespace blaze
114 
115 #endif
Header file for the IsMatrix type trait.
Evaluation of the return type of an Hermitian declaration (declherm) expression.Via this type trait i...
Definition: DeclHermExprTrait.h:69
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
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
typename DeclHermExprTrait< T >::Type DeclHermExprTrait_
Auxiliary alias declaration for the DeclHermExprTrait class template.The DeclHermExprTrait_ alias dec...
Definition: DeclHermExprTrait.h:110
Header file for the RemoveReference type trait.
decltype(auto) declherm(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as Hermitian.
Definition: DMatDeclHermExpr.h:1028