Blaze 3.9
Schur.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_FUNCTORS_SCHUR_H_
36#define _BLAZE_MATH_FUNCTORS_SCHUR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
63#include <blaze/system/Inline.h>
65
66
67namespace blaze {
68
69//=================================================================================================
70//
71// CLASS DEFINITION
72//
73//=================================================================================================
74
75//*************************************************************************************************
79struct Schur
80{
81 //**********************************************************************************************
88 template< typename T1, typename T2 >
89 BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( T1&& a, T2&& b ) const
90 {
91 return std::forward<T1>( a ) % std::forward<T2>( b );
92 }
93 //**********************************************************************************************
94};
95//*************************************************************************************************
96
97
98
99
100//=================================================================================================
101//
102// YIELDSUNIFORM SPECIALIZATIONS
103//
104//=================================================================================================
105
106//*************************************************************************************************
108template< typename T1, typename T2 >
109struct YieldsUniform<Schur,T1,T2>
110 : public BoolConstant< IsUniform_v<T1> && IsUniform_v<T2> >
111{};
113//*************************************************************************************************
114
115
116
117
118//=================================================================================================
119//
120// YIELDSSYMMETRIC SPECIALIZATIONS
121//
122//=================================================================================================
123
124//*************************************************************************************************
126template< typename MT1, typename MT2 >
127struct YieldsSymmetric<Schur,MT1,MT2>
128 : public BoolConstant< IsSymmetric_v<MT1> && IsSymmetric_v<MT2> >
129{};
131//*************************************************************************************************
132
133
134
135
136//=================================================================================================
137//
138// YIELDSLOWER SPECIALIZATIONS
139//
140//=================================================================================================
141
142//*************************************************************************************************
144template< typename MT1, typename MT2 >
145struct YieldsLower<Schur,MT1,MT2>
146 : public BoolConstant< IsLower_v<MT1> || IsLower_v<MT2> >
147{};
149//*************************************************************************************************
150
151
152
153
154//=================================================================================================
155//
156// YIELDSUNILOWER SPECIALIZATIONS
157//
158//=================================================================================================
159
160//*************************************************************************************************
162template< typename MT1, typename MT2 >
163struct YieldsUniLower<Schur,MT1,MT2>
164 : public BoolConstant< IsUniLower_v<MT1> && IsUniLower_v<MT2> >
165{};
167//*************************************************************************************************
168
169
170
171
172//=================================================================================================
173//
174// YIELDSSTRICTLYLOWER SPECIALIZATIONS
175//
176//=================================================================================================
177
178//*************************************************************************************************
180template< typename MT1, typename MT2 >
181struct YieldsStrictlyLower<Schur,MT1,MT2>
182 : public BoolConstant< IsStrictlyLower_v<MT1> || IsStrictlyLower_v<MT2> >
183{};
185//*************************************************************************************************
186
187
188
189
190//=================================================================================================
191//
192// YIELDSUPPER SPECIALIZATIONS
193//
194//=================================================================================================
195
196//*************************************************************************************************
198template< typename MT1, typename MT2 >
199struct YieldsUpper<Schur,MT1,MT2>
200 : public BoolConstant< IsUpper_v<MT1> || IsUpper_v<MT2> >
201{};
203//*************************************************************************************************
204
205
206
207
208//=================================================================================================
209//
210// YIELDSUNIUPPER SPECIALIZATIONS
211//
212//=================================================================================================
213
214//*************************************************************************************************
216template< typename MT1, typename MT2 >
217struct YieldsUniUpper<Schur,MT1,MT2>
218 : public BoolConstant< IsUniUpper_v<MT1> && IsUniUpper_v<MT2> >
219{};
221//*************************************************************************************************
222
223
224
225
226//=================================================================================================
227//
228// YIELDSSTRICTLYUPPER SPECIALIZATIONS
229//
230//=================================================================================================
231
232//*************************************************************************************************
234template< typename MT1, typename MT2 >
235struct YieldsStrictlyUpper<Schur,MT1,MT2>
236 : public BoolConstant< IsStrictlyUpper_v<MT1> || IsStrictlyUpper_v<MT2> >
237{};
239//*************************************************************************************************
240
241
242
243
244//=================================================================================================
245//
246// YIELDSZERO SPECIALIZATIONS
247//
248//=================================================================================================
249
250//*************************************************************************************************
252template< typename T1, typename T2 >
253struct YieldsZero<Schur,T1,T2>
254 : public BoolConstant< IsZero_v<T1> || IsZero_v<T2> >
255{};
257//*************************************************************************************************
258
259} // namespace blaze
260
261#endif
Macro for CUDA compatibility.
Header file for the IntegralConstant class template.
Header file for the IsLower type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Header file for the IsUniLower type trait.
Header file for the IsUniUpper type trait.
Header file for the IsUniform type trait.
Header file for the IsUpper type trait.
Header file for the YieldsLower type trait.
Header file for the YieldsStrictlyLower type trait.
Header file for the YieldsStrictlyUpper type trait.
Header file for the YieldsSymmetric type trait.
Header file for the YieldsUniLower type trait.
Header file for the YieldsUniUpper type trait.
Header file for the YieldsUniform type trait.
Header file for the YieldsUpper type trait.
Header file for the YieldsZero type trait.
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition: IntegralConstant.h:110
Generic wrapper for the Schur product.
Definition: Schur.h:80
System settings for the inline keywords.
Header file for the IsZero type trait.