Blaze  3.6
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 
62 #include <blaze/system/Inline.h>
64 
65 
66 namespace blaze {
67 
68 //=================================================================================================
69 //
70 // CLASS DEFINITION
71 //
72 //=================================================================================================
73 
74 //*************************************************************************************************
78 struct Schur
79 {
80  //**********************************************************************************************
87  template< typename T1, typename T2 >
88  BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( const T1& a, const T2& b ) const
89  {
90  return a % b;
91  }
92  //**********************************************************************************************
93 };
94 //*************************************************************************************************
95 
96 
97 
98 
99 //=================================================================================================
100 //
101 // YIELDSUNIFORM SPECIALIZATIONS
102 //
103 //=================================================================================================
104 
105 //*************************************************************************************************
107 template< typename T1, typename T2 >
108 struct YieldsUniform<Schur,T1,T2>
109  : public BoolConstant< IsUniform_v<T1> && IsUniform_v<T2> >
110 {};
112 //*************************************************************************************************
113 
114 
115 
116 
117 //=================================================================================================
118 //
119 // YIELDSSYMMETRIC SPECIALIZATIONS
120 //
121 //=================================================================================================
122 
123 //*************************************************************************************************
125 template< typename MT1, typename MT2 >
126 struct YieldsSymmetric<Schur,MT1,MT2>
127  : public BoolConstant< IsSymmetric_v<MT1> && IsSymmetric_v<MT2> >
128 {};
130 //*************************************************************************************************
131 
132 
133 
134 
135 //=================================================================================================
136 //
137 // YIELDSLOWER SPECIALIZATIONS
138 //
139 //=================================================================================================
140 
141 //*************************************************************************************************
143 template< typename MT1, typename MT2 >
144 struct YieldsLower<Schur,MT1,MT2>
145  : public BoolConstant< IsLower_v<MT1> || IsLower_v<MT2> >
146 {};
148 //*************************************************************************************************
149 
150 
151 
152 
153 //=================================================================================================
154 //
155 // YIELDSUNILOWER SPECIALIZATIONS
156 //
157 //=================================================================================================
158 
159 //*************************************************************************************************
161 template< typename MT1, typename MT2 >
162 struct YieldsUniLower<Schur,MT1,MT2>
163  : public BoolConstant< IsUniLower_v<MT1> && IsUniLower_v<MT2> >
164 {};
166 //*************************************************************************************************
167 
168 
169 
170 
171 //=================================================================================================
172 //
173 // YIELDSSTRICTLYLOWER SPECIALIZATIONS
174 //
175 //=================================================================================================
176 
177 //*************************************************************************************************
179 template< typename MT1, typename MT2 >
180 struct YieldsStrictlyLower<Schur,MT1,MT2>
181  : public BoolConstant< IsStrictlyLower_v<MT1> || IsStrictlyLower_v<MT2> >
182 {};
184 //*************************************************************************************************
185 
186 
187 
188 
189 //=================================================================================================
190 //
191 // YIELDSUPPER SPECIALIZATIONS
192 //
193 //=================================================================================================
194 
195 //*************************************************************************************************
197 template< typename MT1, typename MT2 >
198 struct YieldsUpper<Schur,MT1,MT2>
199  : public BoolConstant< IsUpper_v<MT1> || IsUpper_v<MT2> >
200 {};
202 //*************************************************************************************************
203 
204 
205 
206 
207 //=================================================================================================
208 //
209 // YIELDSUNIUPPER SPECIALIZATIONS
210 //
211 //=================================================================================================
212 
213 //*************************************************************************************************
215 template< typename MT1, typename MT2 >
216 struct YieldsUniUpper<Schur,MT1,MT2>
217  : public BoolConstant< IsUniUpper_v<MT1> && IsUniUpper_v<MT2> >
218 {};
220 //*************************************************************************************************
221 
222 
223 
224 
225 //=================================================================================================
226 //
227 // YIELDSSTRICTLYUPPER SPECIALIZATIONS
228 //
229 //=================================================================================================
230 
231 //*************************************************************************************************
233 template< typename MT1, typename MT2 >
234 struct YieldsStrictlyUpper<Schur,MT1,MT2>
235  : public BoolConstant< IsStrictlyUpper_v<MT1> || IsStrictlyUpper_v<MT2> >
236 {};
238 //*************************************************************************************************
239 
240 
241 
242 
243 //=================================================================================================
244 //
245 // YIELDSZERO SPECIALIZATIONS
246 //
247 //=================================================================================================
248 
249 //*************************************************************************************************
251 template< typename T1, typename T2 >
252 struct YieldsZero<Schur,T1,T2>
253  : public BoolConstant< IsZero_v<T1> || IsZero_v<T2> >
254 {};
256 //*************************************************************************************************
257 
258 } // namespace blaze
259 
260 #endif
Header file for the IsUniUpper type trait.
Header file for the YieldsStrictlyLower type trait.
Header file for the YieldsZero type trait.
Header file for the IsUniLower type trait.
Header file for the IsUniform type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the YieldsStrictlyUpper type trait.
Header file for the YieldsUniLower type trait.
Header file for the IsLower type trait.
Header file for the IsStrictlyLower type trait.
Generic wrapper for the Schur product.
Definition: Schur.h:78
Header file for the YieldsUniform type trait.
Header file for the YieldsSymmetric type trait.
Header file for the YieldsUpper type trait.
Header file for the IsZero type trait.
Header file for the YieldsLower type trait.
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant alias template represents ...
Definition: IntegralConstant.h:110
Macro for CUDA compatibility.
Header file for the IntegralConstant class template.
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
Header file for the IsUpper type trait.
Header file for the YieldsUniUpper type trait.
System settings for the inline keywords.