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>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // CLASS DEFINITION
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
60 template< typename, typename, typename = void > struct SchurTrait;
61 template< typename, typename, typename = void > struct SchurTraitEval1;
62 template< typename, typename, typename = void > struct SchurTraitEval2;
64 //*************************************************************************************************
65 
66 
67 //*************************************************************************************************
69 template< typename T1, typename T2 >
70 auto evalSchurTrait( T1&, T2& )
71  -> typename SchurTraitEval1<T1,T2>::Type;
72 
73 template< typename T1, typename T2 >
74 auto evalSchurTrait( const T1&, const T2& )
75  -> typename SchurTrait<T1,T2>::Type;
76 
77 template< typename T1, typename T2 >
78 auto evalSchurTrait( const volatile T1&, const T2& )
79  -> typename SchurTrait<T1,T2>::Type;
80 
81 template< typename T1, typename T2 >
82 auto evalSchurTrait( const T1&, const volatile T2& )
83  -> typename SchurTrait<T1,T2>::Type;
84 
85 template< typename T1, typename T2 >
86 auto evalSchurTrait( const volatile T1&, const volatile T2& )
87  -> typename SchurTrait<T1,T2>::Type;
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
135 template< typename T1 // Type of the left-hand side operand
136  , typename T2 // Type of the right-hand side operand
137  , typename > // Restricting condition
139 {
140  public:
141  //**********************************************************************************************
143  using Type = decltype( evalSchurTrait( std::declval<T1&>(), std::declval<T2&>() ) );
145  //**********************************************************************************************
146 };
147 //*************************************************************************************************
148 
149 
150 //*************************************************************************************************
163 template< typename T1, typename T2 >
165 //*************************************************************************************************
166 
167 
168 //*************************************************************************************************
173 template< typename T1 // Type of the left-hand side operand
174  , typename T2 // Type of the right-hand side operand
175  , typename > // Restricting condition
176 struct SchurTraitEval1
177 {
178  public:
179  //**********************************************************************************************
180  using Type = typename SchurTraitEval2<T1,T2>::Type;
181  //**********************************************************************************************
182 };
184 //*************************************************************************************************
185 
186 
187 //*************************************************************************************************
192 template< typename T1 // Type of the left-hand side operand
193  , typename T2 // Type of the right-hand side operand
194  , typename > // Restricting condition
195 struct SchurTraitEval2
196 {
197  public:
198  //**********************************************************************************************
199  using Type = INVALID_TYPE;
200  //**********************************************************************************************
201 };
203 //*************************************************************************************************
204 
205 } // namespace blaze
206 
207 #endif
Base template for the SchurTrait class.
Definition: SchurTrait.h:138
Header file for the Decay type trait.
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:164