Blaze  3.6
SchurTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_SCHURTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_SCHURTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <utility>
44 #include <blaze/util/EnableIf.h>
45 #include <blaze/util/InvalidType.h>
46 #include <blaze/util/mpl/If.h>
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // CLASS DEFINITION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
59 template< typename, typename, typename = void > struct SchurTrait;
60 template< typename, typename, typename = void > struct SchurTraitEval1;
61 template< typename, typename, typename = void > struct SchurTraitEval2;
63 //*************************************************************************************************
64 
65 
66 //*************************************************************************************************
68 template< typename T1, typename T2 >
69 auto evalSchurTrait( T1&, T2& )
70  -> typename SchurTraitEval1<T1,T2>::Type;
71 
72 template< typename T1, typename T2 >
73 auto evalSchurTrait( const T1&, const T2& )
74  -> typename SchurTrait<T1,T2>::Type;
75 
76 template< typename T1, typename T2 >
77 auto evalSchurTrait( const volatile T1&, const T2& )
78  -> typename SchurTrait<T1,T2>::Type;
79 
80 template< typename T1, typename T2 >
81 auto evalSchurTrait( const T1&, const volatile T2& )
82  -> typename SchurTrait<T1,T2>::Type;
83 
84 template< typename T1, typename T2 >
85 auto evalSchurTrait( const volatile T1&, const volatile T2& )
86  -> typename SchurTrait<T1,T2>::Type;
88 //*************************************************************************************************
89 
90 
91 //*************************************************************************************************
134 template< typename T1 // Type of the left-hand side operand
135  , typename T2 // Type of the right-hand side operand
136  , typename > // Restricting condition
138 {
139  public:
140  //**********************************************************************************************
142  using Type = decltype( evalSchurTrait( std::declval<T1&>(), std::declval<T2&>() ) );
144  //**********************************************************************************************
145 };
146 //*************************************************************************************************
147 
148 
149 //*************************************************************************************************
162 template< typename T1, typename T2 >
164 //*************************************************************************************************
165 
166 
167 //*************************************************************************************************
172 template< typename T1 // Type of the left-hand side operand
173  , typename T2 // Type of the right-hand side operand
174  , typename > // Restricting condition
175 struct SchurTraitEval1
176 {
177  public:
178  //**********************************************************************************************
179  using Type = typename SchurTraitEval2<T1,T2>::Type;
180  //**********************************************************************************************
181 };
183 //*************************************************************************************************
184 
185 
186 //*************************************************************************************************
191 template< typename T1 // Type of the left-hand side operand
192  , typename T2 // Type of the right-hand side operand
193  , typename > // Restricting condition
194 struct SchurTraitEval2
195 {
196  public:
197  //**********************************************************************************************
198  using Type = INVALID_TYPE;
199  //**********************************************************************************************
200 };
202 //*************************************************************************************************
203 
204 } // namespace blaze
205 
206 #endif
Base template for the SchurTrait class.
Definition: SchurTrait.h:137
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Header file for the EnableIf class template.
Utility type for generic codes.
typename SchurTrait< T1, T2 >::Type SchurTrait_t
Auxiliary alias declaration for the SchurTrait class template.The SchurTrait_t alias declaration prov...
Definition: SchurTrait.h:163