1 | /*************************************************************************** |
---|
2 | * blitz/../vecbfn.cc Vector expression binary functions (2 operands) |
---|
3 | * |
---|
4 | * This program is free software; you can redistribute it and/or |
---|
5 | * modify it under the terms of the GNU General Public License |
---|
6 | * as published by the Free Software Foundation; either version 2 |
---|
7 | * of the License, or (at your option) any later version. |
---|
8 | * |
---|
9 | * This program is distributed in the hope that it will be useful, |
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | * GNU General Public License for more details. |
---|
13 | * |
---|
14 | * Suggestions: blitz-suggest@cybervision.com |
---|
15 | * Bugs: blitz-bugs@cybervision.com |
---|
16 | * |
---|
17 | * For more information, please see the Blitz++ Home Page: |
---|
18 | * http://seurat.uwaterloo.ca/blitz/ |
---|
19 | * |
---|
20 | *************************************************************************** |
---|
21 | * |
---|
22 | */ |
---|
23 | |
---|
24 | // Generated source file. Do not edit. |
---|
25 | // genvecbfn.cpp Oct 6 2005 15:58:50 |
---|
26 | |
---|
27 | #ifndef BZ_VECBFN_CC |
---|
28 | #define BZ_VECBFN_CC |
---|
29 | |
---|
30 | #ifndef BZ_VECEXPR_H |
---|
31 | #error <blitz/vecbfn.cc> must be included via <blitz/vecexpr.h> |
---|
32 | #endif |
---|
33 | |
---|
34 | BZ_NAMESPACE(blitz) |
---|
35 | |
---|
36 | /**************************************************************************** |
---|
37 | * Minimum Operators |
---|
38 | ****************************************************************************/ |
---|
39 | |
---|
40 | // Vector<P_numtype1> min Vector<P_numtype2> |
---|
41 | template<class P_numtype1, class P_numtype2> |
---|
42 | inline |
---|
43 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
44 | VectorIterConst<P_numtype2>, |
---|
45 | _bz_Min<P_numtype1, P_numtype2 > > > |
---|
46 | min(const Vector<P_numtype1>& d1, |
---|
47 | const Vector<P_numtype2>& d2) |
---|
48 | { |
---|
49 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
50 | VectorIterConst<P_numtype2>, |
---|
51 | _bz_Min<P_numtype1, P_numtype2> > T_expr; |
---|
52 | |
---|
53 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
54 | d2.beginFast())); |
---|
55 | } |
---|
56 | |
---|
57 | // Vector<P_numtype1> min _bz_VecExpr<P_expr2> |
---|
58 | template<class P_numtype1, class P_expr2> |
---|
59 | inline |
---|
60 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
61 | _bz_VecExpr<P_expr2>, |
---|
62 | _bz_Min<P_numtype1, typename P_expr2::T_numtype > > > |
---|
63 | min(const Vector<P_numtype1>& d1, |
---|
64 | _bz_VecExpr<P_expr2> d2) |
---|
65 | { |
---|
66 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
67 | _bz_VecExpr<P_expr2>, |
---|
68 | _bz_Min<P_numtype1, typename P_expr2::T_numtype> > T_expr; |
---|
69 | |
---|
70 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
71 | d2)); |
---|
72 | } |
---|
73 | |
---|
74 | // Vector<P_numtype1> min VectorPick<P_numtype2> |
---|
75 | template<class P_numtype1, class P_numtype2> |
---|
76 | inline |
---|
77 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
78 | VectorPickIterConst<P_numtype2>, |
---|
79 | _bz_Min<P_numtype1, P_numtype2 > > > |
---|
80 | min(const Vector<P_numtype1>& d1, |
---|
81 | const VectorPick<P_numtype2>& d2) |
---|
82 | { |
---|
83 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
84 | VectorPickIterConst<P_numtype2>, |
---|
85 | _bz_Min<P_numtype1, P_numtype2> > T_expr; |
---|
86 | |
---|
87 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
88 | d2.beginFast())); |
---|
89 | } |
---|
90 | |
---|
91 | // Vector<P_numtype1> min Range |
---|
92 | template<class P_numtype1> |
---|
93 | inline |
---|
94 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
95 | Range, |
---|
96 | _bz_Min<P_numtype1, int > > > |
---|
97 | min(const Vector<P_numtype1>& d1, |
---|
98 | Range d2) |
---|
99 | { |
---|
100 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
101 | Range, |
---|
102 | _bz_Min<P_numtype1, int> > T_expr; |
---|
103 | |
---|
104 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
105 | d2)); |
---|
106 | } |
---|
107 | |
---|
108 | // Vector<P_numtype1> min TinyVector<P_numtype2, N_length2> |
---|
109 | template<class P_numtype1, class P_numtype2, int N_length2> |
---|
110 | inline |
---|
111 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
112 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
113 | _bz_Min<P_numtype1, P_numtype2 > > > |
---|
114 | min(const Vector<P_numtype1>& d1, |
---|
115 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
116 | { |
---|
117 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
118 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
119 | _bz_Min<P_numtype1, P_numtype2> > T_expr; |
---|
120 | |
---|
121 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
122 | d2.beginFast())); |
---|
123 | } |
---|
124 | |
---|
125 | // Vector<P_numtype1> min int |
---|
126 | template<class P_numtype1> |
---|
127 | inline |
---|
128 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
129 | _bz_VecExprConstant<int>, |
---|
130 | _bz_Min<P_numtype1, int > > > |
---|
131 | min(const Vector<P_numtype1>& d1, |
---|
132 | int d2) |
---|
133 | { |
---|
134 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
135 | _bz_VecExprConstant<int>, |
---|
136 | _bz_Min<P_numtype1, int> > T_expr; |
---|
137 | |
---|
138 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
139 | _bz_VecExprConstant<int>(d2))); |
---|
140 | } |
---|
141 | |
---|
142 | // Vector<P_numtype1> min float |
---|
143 | template<class P_numtype1> |
---|
144 | inline |
---|
145 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
146 | _bz_VecExprConstant<float>, |
---|
147 | _bz_Min<P_numtype1, float > > > |
---|
148 | min(const Vector<P_numtype1>& d1, |
---|
149 | float d2) |
---|
150 | { |
---|
151 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
152 | _bz_VecExprConstant<float>, |
---|
153 | _bz_Min<P_numtype1, float> > T_expr; |
---|
154 | |
---|
155 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
156 | _bz_VecExprConstant<float>(d2))); |
---|
157 | } |
---|
158 | |
---|
159 | // Vector<P_numtype1> min double |
---|
160 | template<class P_numtype1> |
---|
161 | inline |
---|
162 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
163 | _bz_VecExprConstant<double>, |
---|
164 | _bz_Min<P_numtype1, double > > > |
---|
165 | min(const Vector<P_numtype1>& d1, |
---|
166 | double d2) |
---|
167 | { |
---|
168 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
169 | _bz_VecExprConstant<double>, |
---|
170 | _bz_Min<P_numtype1, double> > T_expr; |
---|
171 | |
---|
172 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
173 | _bz_VecExprConstant<double>(d2))); |
---|
174 | } |
---|
175 | |
---|
176 | // Vector<P_numtype1> min long double |
---|
177 | template<class P_numtype1> |
---|
178 | inline |
---|
179 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
180 | _bz_VecExprConstant<long double>, |
---|
181 | _bz_Min<P_numtype1, long double > > > |
---|
182 | min(const Vector<P_numtype1>& d1, |
---|
183 | long double d2) |
---|
184 | { |
---|
185 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
186 | _bz_VecExprConstant<long double>, |
---|
187 | _bz_Min<P_numtype1, long double> > T_expr; |
---|
188 | |
---|
189 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
190 | _bz_VecExprConstant<long double>(d2))); |
---|
191 | } |
---|
192 | #ifdef BZ_HAVE_COMPLEX |
---|
193 | |
---|
194 | // Vector<P_numtype1> min complex<T2> |
---|
195 | template<class P_numtype1, class T2> |
---|
196 | inline |
---|
197 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
198 | _bz_VecExprConstant<complex<T2> > , |
---|
199 | _bz_Min<P_numtype1, complex<T2> > > > |
---|
200 | min(const Vector<P_numtype1>& d1, |
---|
201 | complex<T2> d2) |
---|
202 | { |
---|
203 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
204 | _bz_VecExprConstant<complex<T2> > , |
---|
205 | _bz_Min<P_numtype1, complex<T2> > > T_expr; |
---|
206 | |
---|
207 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
208 | _bz_VecExprConstant<complex<T2> > (d2))); |
---|
209 | } |
---|
210 | #endif // BZ_HAVE_COMPLEX |
---|
211 | |
---|
212 | |
---|
213 | // _bz_VecExpr<P_expr1> min Vector<P_numtype2> |
---|
214 | template<class P_expr1, class P_numtype2> |
---|
215 | inline |
---|
216 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
217 | VectorIterConst<P_numtype2>, |
---|
218 | _bz_Min<typename P_expr1::T_numtype, P_numtype2 > > > |
---|
219 | min(_bz_VecExpr<P_expr1> d1, |
---|
220 | const Vector<P_numtype2>& d2) |
---|
221 | { |
---|
222 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
223 | VectorIterConst<P_numtype2>, |
---|
224 | _bz_Min<typename P_expr1::T_numtype, P_numtype2> > T_expr; |
---|
225 | |
---|
226 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
227 | d2.beginFast())); |
---|
228 | } |
---|
229 | |
---|
230 | // _bz_VecExpr<P_expr1> min _bz_VecExpr<P_expr2> |
---|
231 | template<class P_expr1, class P_expr2> |
---|
232 | inline |
---|
233 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
234 | _bz_VecExpr<P_expr2>, |
---|
235 | _bz_Min<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > > |
---|
236 | min(_bz_VecExpr<P_expr1> d1, |
---|
237 | _bz_VecExpr<P_expr2> d2) |
---|
238 | { |
---|
239 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
240 | _bz_VecExpr<P_expr2>, |
---|
241 | _bz_Min<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T_expr; |
---|
242 | |
---|
243 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
244 | d2)); |
---|
245 | } |
---|
246 | |
---|
247 | // _bz_VecExpr<P_expr1> min VectorPick<P_numtype2> |
---|
248 | template<class P_expr1, class P_numtype2> |
---|
249 | inline |
---|
250 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
251 | VectorPickIterConst<P_numtype2>, |
---|
252 | _bz_Min<typename P_expr1::T_numtype, P_numtype2 > > > |
---|
253 | min(_bz_VecExpr<P_expr1> d1, |
---|
254 | const VectorPick<P_numtype2>& d2) |
---|
255 | { |
---|
256 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
257 | VectorPickIterConst<P_numtype2>, |
---|
258 | _bz_Min<typename P_expr1::T_numtype, P_numtype2> > T_expr; |
---|
259 | |
---|
260 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
261 | d2.beginFast())); |
---|
262 | } |
---|
263 | |
---|
264 | // _bz_VecExpr<P_expr1> min Range |
---|
265 | template<class P_expr1> |
---|
266 | inline |
---|
267 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
268 | Range, |
---|
269 | _bz_Min<typename P_expr1::T_numtype, int > > > |
---|
270 | min(_bz_VecExpr<P_expr1> d1, |
---|
271 | Range d2) |
---|
272 | { |
---|
273 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
274 | Range, |
---|
275 | _bz_Min<typename P_expr1::T_numtype, int> > T_expr; |
---|
276 | |
---|
277 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
278 | d2)); |
---|
279 | } |
---|
280 | |
---|
281 | // _bz_VecExpr<P_expr1> min TinyVector<P_numtype2, N_length2> |
---|
282 | template<class P_expr1, class P_numtype2, int N_length2> |
---|
283 | inline |
---|
284 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
285 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
286 | _bz_Min<typename P_expr1::T_numtype, P_numtype2 > > > |
---|
287 | min(_bz_VecExpr<P_expr1> d1, |
---|
288 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
289 | { |
---|
290 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
291 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
292 | _bz_Min<typename P_expr1::T_numtype, P_numtype2> > T_expr; |
---|
293 | |
---|
294 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
295 | d2.beginFast())); |
---|
296 | } |
---|
297 | |
---|
298 | // _bz_VecExpr<P_expr1> min int |
---|
299 | template<class P_expr1> |
---|
300 | inline |
---|
301 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
302 | _bz_VecExprConstant<int>, |
---|
303 | _bz_Min<typename P_expr1::T_numtype, int > > > |
---|
304 | min(_bz_VecExpr<P_expr1> d1, |
---|
305 | int d2) |
---|
306 | { |
---|
307 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
308 | _bz_VecExprConstant<int>, |
---|
309 | _bz_Min<typename P_expr1::T_numtype, int> > T_expr; |
---|
310 | |
---|
311 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
312 | _bz_VecExprConstant<int>(d2))); |
---|
313 | } |
---|
314 | |
---|
315 | // _bz_VecExpr<P_expr1> min float |
---|
316 | template<class P_expr1> |
---|
317 | inline |
---|
318 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
319 | _bz_VecExprConstant<float>, |
---|
320 | _bz_Min<typename P_expr1::T_numtype, float > > > |
---|
321 | min(_bz_VecExpr<P_expr1> d1, |
---|
322 | float d2) |
---|
323 | { |
---|
324 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
325 | _bz_VecExprConstant<float>, |
---|
326 | _bz_Min<typename P_expr1::T_numtype, float> > T_expr; |
---|
327 | |
---|
328 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
329 | _bz_VecExprConstant<float>(d2))); |
---|
330 | } |
---|
331 | |
---|
332 | // _bz_VecExpr<P_expr1> min double |
---|
333 | template<class P_expr1> |
---|
334 | inline |
---|
335 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
336 | _bz_VecExprConstant<double>, |
---|
337 | _bz_Min<typename P_expr1::T_numtype, double > > > |
---|
338 | min(_bz_VecExpr<P_expr1> d1, |
---|
339 | double d2) |
---|
340 | { |
---|
341 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
342 | _bz_VecExprConstant<double>, |
---|
343 | _bz_Min<typename P_expr1::T_numtype, double> > T_expr; |
---|
344 | |
---|
345 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
346 | _bz_VecExprConstant<double>(d2))); |
---|
347 | } |
---|
348 | |
---|
349 | // _bz_VecExpr<P_expr1> min long double |
---|
350 | template<class P_expr1> |
---|
351 | inline |
---|
352 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
353 | _bz_VecExprConstant<long double>, |
---|
354 | _bz_Min<typename P_expr1::T_numtype, long double > > > |
---|
355 | min(_bz_VecExpr<P_expr1> d1, |
---|
356 | long double d2) |
---|
357 | { |
---|
358 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
359 | _bz_VecExprConstant<long double>, |
---|
360 | _bz_Min<typename P_expr1::T_numtype, long double> > T_expr; |
---|
361 | |
---|
362 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
363 | _bz_VecExprConstant<long double>(d2))); |
---|
364 | } |
---|
365 | #ifdef BZ_HAVE_COMPLEX |
---|
366 | |
---|
367 | // _bz_VecExpr<P_expr1> min complex<T2> |
---|
368 | template<class P_expr1, class T2> |
---|
369 | inline |
---|
370 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
371 | _bz_VecExprConstant<complex<T2> > , |
---|
372 | _bz_Min<typename P_expr1::T_numtype, complex<T2> > > > |
---|
373 | min(_bz_VecExpr<P_expr1> d1, |
---|
374 | complex<T2> d2) |
---|
375 | { |
---|
376 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
377 | _bz_VecExprConstant<complex<T2> > , |
---|
378 | _bz_Min<typename P_expr1::T_numtype, complex<T2> > > T_expr; |
---|
379 | |
---|
380 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
381 | _bz_VecExprConstant<complex<T2> > (d2))); |
---|
382 | } |
---|
383 | #endif // BZ_HAVE_COMPLEX |
---|
384 | |
---|
385 | |
---|
386 | // VectorPick<P_numtype1> min Vector<P_numtype2> |
---|
387 | template<class P_numtype1, class P_numtype2> |
---|
388 | inline |
---|
389 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
390 | VectorIterConst<P_numtype2>, |
---|
391 | _bz_Min<P_numtype1, P_numtype2 > > > |
---|
392 | min(const VectorPick<P_numtype1>& d1, |
---|
393 | const Vector<P_numtype2>& d2) |
---|
394 | { |
---|
395 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
396 | VectorIterConst<P_numtype2>, |
---|
397 | _bz_Min<P_numtype1, P_numtype2> > T_expr; |
---|
398 | |
---|
399 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
400 | d2.beginFast())); |
---|
401 | } |
---|
402 | |
---|
403 | // VectorPick<P_numtype1> min _bz_VecExpr<P_expr2> |
---|
404 | template<class P_numtype1, class P_expr2> |
---|
405 | inline |
---|
406 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
407 | _bz_VecExpr<P_expr2>, |
---|
408 | _bz_Min<P_numtype1, typename P_expr2::T_numtype > > > |
---|
409 | min(const VectorPick<P_numtype1>& d1, |
---|
410 | _bz_VecExpr<P_expr2> d2) |
---|
411 | { |
---|
412 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
413 | _bz_VecExpr<P_expr2>, |
---|
414 | _bz_Min<P_numtype1, typename P_expr2::T_numtype> > T_expr; |
---|
415 | |
---|
416 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
417 | d2)); |
---|
418 | } |
---|
419 | |
---|
420 | // VectorPick<P_numtype1> min VectorPick<P_numtype2> |
---|
421 | template<class P_numtype1, class P_numtype2> |
---|
422 | inline |
---|
423 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
424 | VectorPickIterConst<P_numtype2>, |
---|
425 | _bz_Min<P_numtype1, P_numtype2 > > > |
---|
426 | min(const VectorPick<P_numtype1>& d1, |
---|
427 | const VectorPick<P_numtype2>& d2) |
---|
428 | { |
---|
429 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
430 | VectorPickIterConst<P_numtype2>, |
---|
431 | _bz_Min<P_numtype1, P_numtype2> > T_expr; |
---|
432 | |
---|
433 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
434 | d2.beginFast())); |
---|
435 | } |
---|
436 | |
---|
437 | // VectorPick<P_numtype1> min Range |
---|
438 | template<class P_numtype1> |
---|
439 | inline |
---|
440 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
441 | Range, |
---|
442 | _bz_Min<P_numtype1, int > > > |
---|
443 | min(const VectorPick<P_numtype1>& d1, |
---|
444 | Range d2) |
---|
445 | { |
---|
446 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
447 | Range, |
---|
448 | _bz_Min<P_numtype1, int> > T_expr; |
---|
449 | |
---|
450 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
451 | d2)); |
---|
452 | } |
---|
453 | |
---|
454 | // VectorPick<P_numtype1> min TinyVector<P_numtype2, N_length2> |
---|
455 | template<class P_numtype1, class P_numtype2, int N_length2> |
---|
456 | inline |
---|
457 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
458 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
459 | _bz_Min<P_numtype1, P_numtype2 > > > |
---|
460 | min(const VectorPick<P_numtype1>& d1, |
---|
461 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
462 | { |
---|
463 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
464 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
465 | _bz_Min<P_numtype1, P_numtype2> > T_expr; |
---|
466 | |
---|
467 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
468 | d2.beginFast())); |
---|
469 | } |
---|
470 | |
---|
471 | // VectorPick<P_numtype1> min int |
---|
472 | template<class P_numtype1> |
---|
473 | inline |
---|
474 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
475 | _bz_VecExprConstant<int>, |
---|
476 | _bz_Min<P_numtype1, int > > > |
---|
477 | min(const VectorPick<P_numtype1>& d1, |
---|
478 | int d2) |
---|
479 | { |
---|
480 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
481 | _bz_VecExprConstant<int>, |
---|
482 | _bz_Min<P_numtype1, int> > T_expr; |
---|
483 | |
---|
484 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
485 | _bz_VecExprConstant<int>(d2))); |
---|
486 | } |
---|
487 | |
---|
488 | // VectorPick<P_numtype1> min float |
---|
489 | template<class P_numtype1> |
---|
490 | inline |
---|
491 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
492 | _bz_VecExprConstant<float>, |
---|
493 | _bz_Min<P_numtype1, float > > > |
---|
494 | min(const VectorPick<P_numtype1>& d1, |
---|
495 | float d2) |
---|
496 | { |
---|
497 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
498 | _bz_VecExprConstant<float>, |
---|
499 | _bz_Min<P_numtype1, float> > T_expr; |
---|
500 | |
---|
501 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
502 | _bz_VecExprConstant<float>(d2))); |
---|
503 | } |
---|
504 | |
---|
505 | // VectorPick<P_numtype1> min double |
---|
506 | template<class P_numtype1> |
---|
507 | inline |
---|
508 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
509 | _bz_VecExprConstant<double>, |
---|
510 | _bz_Min<P_numtype1, double > > > |
---|
511 | min(const VectorPick<P_numtype1>& d1, |
---|
512 | double d2) |
---|
513 | { |
---|
514 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
515 | _bz_VecExprConstant<double>, |
---|
516 | _bz_Min<P_numtype1, double> > T_expr; |
---|
517 | |
---|
518 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
519 | _bz_VecExprConstant<double>(d2))); |
---|
520 | } |
---|
521 | |
---|
522 | // VectorPick<P_numtype1> min long double |
---|
523 | template<class P_numtype1> |
---|
524 | inline |
---|
525 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
526 | _bz_VecExprConstant<long double>, |
---|
527 | _bz_Min<P_numtype1, long double > > > |
---|
528 | min(const VectorPick<P_numtype1>& d1, |
---|
529 | long double d2) |
---|
530 | { |
---|
531 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
532 | _bz_VecExprConstant<long double>, |
---|
533 | _bz_Min<P_numtype1, long double> > T_expr; |
---|
534 | |
---|
535 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
536 | _bz_VecExprConstant<long double>(d2))); |
---|
537 | } |
---|
538 | #ifdef BZ_HAVE_COMPLEX |
---|
539 | |
---|
540 | // VectorPick<P_numtype1> min complex<T2> |
---|
541 | template<class P_numtype1, class T2> |
---|
542 | inline |
---|
543 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
544 | _bz_VecExprConstant<complex<T2> > , |
---|
545 | _bz_Min<P_numtype1, complex<T2> > > > |
---|
546 | min(const VectorPick<P_numtype1>& d1, |
---|
547 | complex<T2> d2) |
---|
548 | { |
---|
549 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
550 | _bz_VecExprConstant<complex<T2> > , |
---|
551 | _bz_Min<P_numtype1, complex<T2> > > T_expr; |
---|
552 | |
---|
553 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
554 | _bz_VecExprConstant<complex<T2> > (d2))); |
---|
555 | } |
---|
556 | #endif // BZ_HAVE_COMPLEX |
---|
557 | |
---|
558 | |
---|
559 | // Range min Vector<P_numtype2> |
---|
560 | template<class P_numtype2> |
---|
561 | inline |
---|
562 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
563 | VectorIterConst<P_numtype2>, |
---|
564 | _bz_Min<int, P_numtype2 > > > |
---|
565 | min(Range d1, |
---|
566 | const Vector<P_numtype2>& d2) |
---|
567 | { |
---|
568 | typedef _bz_VecExprOp<Range, |
---|
569 | VectorIterConst<P_numtype2>, |
---|
570 | _bz_Min<int, P_numtype2> > T_expr; |
---|
571 | |
---|
572 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
573 | d2.beginFast())); |
---|
574 | } |
---|
575 | |
---|
576 | // Range min _bz_VecExpr<P_expr2> |
---|
577 | template<class P_expr2> |
---|
578 | inline |
---|
579 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
580 | _bz_VecExpr<P_expr2>, |
---|
581 | _bz_Min<int, typename P_expr2::T_numtype > > > |
---|
582 | min(Range d1, |
---|
583 | _bz_VecExpr<P_expr2> d2) |
---|
584 | { |
---|
585 | typedef _bz_VecExprOp<Range, |
---|
586 | _bz_VecExpr<P_expr2>, |
---|
587 | _bz_Min<int, typename P_expr2::T_numtype> > T_expr; |
---|
588 | |
---|
589 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
590 | d2)); |
---|
591 | } |
---|
592 | |
---|
593 | // Range min VectorPick<P_numtype2> |
---|
594 | template<class P_numtype2> |
---|
595 | inline |
---|
596 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
597 | VectorPickIterConst<P_numtype2>, |
---|
598 | _bz_Min<int, P_numtype2 > > > |
---|
599 | min(Range d1, |
---|
600 | const VectorPick<P_numtype2>& d2) |
---|
601 | { |
---|
602 | typedef _bz_VecExprOp<Range, |
---|
603 | VectorPickIterConst<P_numtype2>, |
---|
604 | _bz_Min<int, P_numtype2> > T_expr; |
---|
605 | |
---|
606 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
607 | d2.beginFast())); |
---|
608 | } |
---|
609 | |
---|
610 | // Range min Range |
---|
611 | |
---|
612 | inline |
---|
613 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
614 | Range, |
---|
615 | _bz_Min<int, int > > > |
---|
616 | min(Range d1, |
---|
617 | Range d2) |
---|
618 | { |
---|
619 | typedef _bz_VecExprOp<Range, |
---|
620 | Range, |
---|
621 | _bz_Min<int, int> > T_expr; |
---|
622 | |
---|
623 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
624 | d2)); |
---|
625 | } |
---|
626 | |
---|
627 | // Range min TinyVector<P_numtype2, N_length2> |
---|
628 | template<class P_numtype2, int N_length2> |
---|
629 | inline |
---|
630 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
631 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
632 | _bz_Min<int, P_numtype2 > > > |
---|
633 | min(Range d1, |
---|
634 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
635 | { |
---|
636 | typedef _bz_VecExprOp<Range, |
---|
637 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
638 | _bz_Min<int, P_numtype2> > T_expr; |
---|
639 | |
---|
640 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
641 | d2.beginFast())); |
---|
642 | } |
---|
643 | |
---|
644 | // Range min float |
---|
645 | |
---|
646 | inline |
---|
647 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
648 | _bz_VecExprConstant<float>, |
---|
649 | _bz_Min<int, float > > > |
---|
650 | min(Range d1, |
---|
651 | float d2) |
---|
652 | { |
---|
653 | typedef _bz_VecExprOp<Range, |
---|
654 | _bz_VecExprConstant<float>, |
---|
655 | _bz_Min<int, float> > T_expr; |
---|
656 | |
---|
657 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
658 | _bz_VecExprConstant<float>(d2))); |
---|
659 | } |
---|
660 | |
---|
661 | // Range min double |
---|
662 | |
---|
663 | inline |
---|
664 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
665 | _bz_VecExprConstant<double>, |
---|
666 | _bz_Min<int, double > > > |
---|
667 | min(Range d1, |
---|
668 | double d2) |
---|
669 | { |
---|
670 | typedef _bz_VecExprOp<Range, |
---|
671 | _bz_VecExprConstant<double>, |
---|
672 | _bz_Min<int, double> > T_expr; |
---|
673 | |
---|
674 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
675 | _bz_VecExprConstant<double>(d2))); |
---|
676 | } |
---|
677 | |
---|
678 | // Range min long double |
---|
679 | |
---|
680 | inline |
---|
681 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
682 | _bz_VecExprConstant<long double>, |
---|
683 | _bz_Min<int, long double > > > |
---|
684 | min(Range d1, |
---|
685 | long double d2) |
---|
686 | { |
---|
687 | typedef _bz_VecExprOp<Range, |
---|
688 | _bz_VecExprConstant<long double>, |
---|
689 | _bz_Min<int, long double> > T_expr; |
---|
690 | |
---|
691 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
692 | _bz_VecExprConstant<long double>(d2))); |
---|
693 | } |
---|
694 | #ifdef BZ_HAVE_COMPLEX |
---|
695 | |
---|
696 | // Range min complex<T2> |
---|
697 | template<class T2> |
---|
698 | inline |
---|
699 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
700 | _bz_VecExprConstant<complex<T2> > , |
---|
701 | _bz_Min<int, complex<T2> > > > |
---|
702 | min(Range d1, |
---|
703 | complex<T2> d2) |
---|
704 | { |
---|
705 | typedef _bz_VecExprOp<Range, |
---|
706 | _bz_VecExprConstant<complex<T2> > , |
---|
707 | _bz_Min<int, complex<T2> > > T_expr; |
---|
708 | |
---|
709 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
710 | _bz_VecExprConstant<complex<T2> > (d2))); |
---|
711 | } |
---|
712 | #endif // BZ_HAVE_COMPLEX |
---|
713 | |
---|
714 | |
---|
715 | // TinyVector<P_numtype1, N_length1> min Vector<P_numtype2> |
---|
716 | template<class P_numtype1, int N_length1, class P_numtype2> |
---|
717 | inline |
---|
718 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
719 | VectorIterConst<P_numtype2>, |
---|
720 | _bz_Min<P_numtype1, P_numtype2 > > > |
---|
721 | min(const TinyVector<P_numtype1, N_length1>& d1, |
---|
722 | const Vector<P_numtype2>& d2) |
---|
723 | { |
---|
724 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
725 | VectorIterConst<P_numtype2>, |
---|
726 | _bz_Min<P_numtype1, P_numtype2> > T_expr; |
---|
727 | |
---|
728 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
729 | d2.beginFast())); |
---|
730 | } |
---|
731 | |
---|
732 | // TinyVector<P_numtype1, N_length1> min _bz_VecExpr<P_expr2> |
---|
733 | template<class P_numtype1, int N_length1, class P_expr2> |
---|
734 | inline |
---|
735 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
736 | _bz_VecExpr<P_expr2>, |
---|
737 | _bz_Min<P_numtype1, typename P_expr2::T_numtype > > > |
---|
738 | min(const TinyVector<P_numtype1, N_length1>& d1, |
---|
739 | _bz_VecExpr<P_expr2> d2) |
---|
740 | { |
---|
741 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
742 | _bz_VecExpr<P_expr2>, |
---|
743 | _bz_Min<P_numtype1, typename P_expr2::T_numtype> > T_expr; |
---|
744 | |
---|
745 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
746 | d2)); |
---|
747 | } |
---|
748 | |
---|
749 | // TinyVector<P_numtype1, N_length1> min VectorPick<P_numtype2> |
---|
750 | template<class P_numtype1, int N_length1, class P_numtype2> |
---|
751 | inline |
---|
752 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
753 | VectorPickIterConst<P_numtype2>, |
---|
754 | _bz_Min<P_numtype1, P_numtype2 > > > |
---|
755 | min(const TinyVector<P_numtype1, N_length1>& d1, |
---|
756 | const VectorPick<P_numtype2>& d2) |
---|
757 | { |
---|
758 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
759 | VectorPickIterConst<P_numtype2>, |
---|
760 | _bz_Min<P_numtype1, P_numtype2> > T_expr; |
---|
761 | |
---|
762 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
763 | d2.beginFast())); |
---|
764 | } |
---|
765 | |
---|
766 | // TinyVector<P_numtype1, N_length1> min Range |
---|
767 | template<class P_numtype1, int N_length1> |
---|
768 | inline |
---|
769 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
770 | Range, |
---|
771 | _bz_Min<P_numtype1, int > > > |
---|
772 | min(const TinyVector<P_numtype1, N_length1>& d1, |
---|
773 | Range d2) |
---|
774 | { |
---|
775 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
776 | Range, |
---|
777 | _bz_Min<P_numtype1, int> > T_expr; |
---|
778 | |
---|
779 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
780 | d2)); |
---|
781 | } |
---|
782 | |
---|
783 | // TinyVector<P_numtype1, N_length1> min TinyVector<P_numtype2, N_length2> |
---|
784 | template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> |
---|
785 | inline |
---|
786 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
787 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
788 | _bz_Min<P_numtype1, P_numtype2 > > > |
---|
789 | min(const TinyVector<P_numtype1, N_length1>& d1, |
---|
790 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
791 | { |
---|
792 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
793 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
794 | _bz_Min<P_numtype1, P_numtype2> > T_expr; |
---|
795 | |
---|
796 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
797 | d2.beginFast())); |
---|
798 | } |
---|
799 | |
---|
800 | // TinyVector<P_numtype1, N_length1> min int |
---|
801 | template<class P_numtype1, int N_length1> |
---|
802 | inline |
---|
803 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
804 | _bz_VecExprConstant<int>, |
---|
805 | _bz_Min<P_numtype1, int > > > |
---|
806 | min(const TinyVector<P_numtype1, N_length1>& d1, |
---|
807 | int d2) |
---|
808 | { |
---|
809 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
810 | _bz_VecExprConstant<int>, |
---|
811 | _bz_Min<P_numtype1, int> > T_expr; |
---|
812 | |
---|
813 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
814 | _bz_VecExprConstant<int>(d2))); |
---|
815 | } |
---|
816 | |
---|
817 | // TinyVector<P_numtype1, N_length1> min float |
---|
818 | template<class P_numtype1, int N_length1> |
---|
819 | inline |
---|
820 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
821 | _bz_VecExprConstant<float>, |
---|
822 | _bz_Min<P_numtype1, float > > > |
---|
823 | min(const TinyVector<P_numtype1, N_length1>& d1, |
---|
824 | float d2) |
---|
825 | { |
---|
826 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
827 | _bz_VecExprConstant<float>, |
---|
828 | _bz_Min<P_numtype1, float> > T_expr; |
---|
829 | |
---|
830 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
831 | _bz_VecExprConstant<float>(d2))); |
---|
832 | } |
---|
833 | |
---|
834 | // TinyVector<P_numtype1, N_length1> min double |
---|
835 | template<class P_numtype1, int N_length1> |
---|
836 | inline |
---|
837 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
838 | _bz_VecExprConstant<double>, |
---|
839 | _bz_Min<P_numtype1, double > > > |
---|
840 | min(const TinyVector<P_numtype1, N_length1>& d1, |
---|
841 | double d2) |
---|
842 | { |
---|
843 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
844 | _bz_VecExprConstant<double>, |
---|
845 | _bz_Min<P_numtype1, double> > T_expr; |
---|
846 | |
---|
847 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
848 | _bz_VecExprConstant<double>(d2))); |
---|
849 | } |
---|
850 | |
---|
851 | // TinyVector<P_numtype1, N_length1> min long double |
---|
852 | template<class P_numtype1, int N_length1> |
---|
853 | inline |
---|
854 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
855 | _bz_VecExprConstant<long double>, |
---|
856 | _bz_Min<P_numtype1, long double > > > |
---|
857 | min(const TinyVector<P_numtype1, N_length1>& d1, |
---|
858 | long double d2) |
---|
859 | { |
---|
860 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
861 | _bz_VecExprConstant<long double>, |
---|
862 | _bz_Min<P_numtype1, long double> > T_expr; |
---|
863 | |
---|
864 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
865 | _bz_VecExprConstant<long double>(d2))); |
---|
866 | } |
---|
867 | #ifdef BZ_HAVE_COMPLEX |
---|
868 | |
---|
869 | // TinyVector<P_numtype1, N_length1> min complex<T2> |
---|
870 | template<class P_numtype1, int N_length1, class T2> |
---|
871 | inline |
---|
872 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
873 | _bz_VecExprConstant<complex<T2> > , |
---|
874 | _bz_Min<P_numtype1, complex<T2> > > > |
---|
875 | min(const TinyVector<P_numtype1, N_length1>& d1, |
---|
876 | complex<T2> d2) |
---|
877 | { |
---|
878 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
879 | _bz_VecExprConstant<complex<T2> > , |
---|
880 | _bz_Min<P_numtype1, complex<T2> > > T_expr; |
---|
881 | |
---|
882 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
883 | _bz_VecExprConstant<complex<T2> > (d2))); |
---|
884 | } |
---|
885 | #endif // BZ_HAVE_COMPLEX |
---|
886 | |
---|
887 | |
---|
888 | // int min Vector<P_numtype2> |
---|
889 | template<class P_numtype2> |
---|
890 | inline |
---|
891 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
892 | VectorIterConst<P_numtype2>, |
---|
893 | _bz_Min<int, P_numtype2 > > > |
---|
894 | min(int d1, |
---|
895 | const Vector<P_numtype2>& d2) |
---|
896 | { |
---|
897 | typedef _bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
898 | VectorIterConst<P_numtype2>, |
---|
899 | _bz_Min<int, P_numtype2> > T_expr; |
---|
900 | |
---|
901 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), |
---|
902 | d2.beginFast())); |
---|
903 | } |
---|
904 | |
---|
905 | // int min _bz_VecExpr<P_expr2> |
---|
906 | template<class P_expr2> |
---|
907 | inline |
---|
908 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
909 | _bz_VecExpr<P_expr2>, |
---|
910 | _bz_Min<int, typename P_expr2::T_numtype > > > |
---|
911 | min(int d1, |
---|
912 | _bz_VecExpr<P_expr2> d2) |
---|
913 | { |
---|
914 | typedef _bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
915 | _bz_VecExpr<P_expr2>, |
---|
916 | _bz_Min<int, typename P_expr2::T_numtype> > T_expr; |
---|
917 | |
---|
918 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), |
---|
919 | d2)); |
---|
920 | } |
---|
921 | |
---|
922 | // int min VectorPick<P_numtype2> |
---|
923 | template<class P_numtype2> |
---|
924 | inline |
---|
925 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
926 | VectorPickIterConst<P_numtype2>, |
---|
927 | _bz_Min<int, P_numtype2 > > > |
---|
928 | min(int d1, |
---|
929 | const VectorPick<P_numtype2>& d2) |
---|
930 | { |
---|
931 | typedef _bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
932 | VectorPickIterConst<P_numtype2>, |
---|
933 | _bz_Min<int, P_numtype2> > T_expr; |
---|
934 | |
---|
935 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), |
---|
936 | d2.beginFast())); |
---|
937 | } |
---|
938 | |
---|
939 | // int min TinyVector<P_numtype2, N_length2> |
---|
940 | template<class P_numtype2, int N_length2> |
---|
941 | inline |
---|
942 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
943 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
944 | _bz_Min<int, P_numtype2 > > > |
---|
945 | min(int d1, |
---|
946 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
947 | { |
---|
948 | typedef _bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
949 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
950 | _bz_Min<int, P_numtype2> > T_expr; |
---|
951 | |
---|
952 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), |
---|
953 | d2.beginFast())); |
---|
954 | } |
---|
955 | |
---|
956 | // float min Vector<P_numtype2> |
---|
957 | template<class P_numtype2> |
---|
958 | inline |
---|
959 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
960 | VectorIterConst<P_numtype2>, |
---|
961 | _bz_Min<float, P_numtype2 > > > |
---|
962 | min(float d1, |
---|
963 | const Vector<P_numtype2>& d2) |
---|
964 | { |
---|
965 | typedef _bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
966 | VectorIterConst<P_numtype2>, |
---|
967 | _bz_Min<float, P_numtype2> > T_expr; |
---|
968 | |
---|
969 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), |
---|
970 | d2.beginFast())); |
---|
971 | } |
---|
972 | |
---|
973 | // float min _bz_VecExpr<P_expr2> |
---|
974 | template<class P_expr2> |
---|
975 | inline |
---|
976 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
977 | _bz_VecExpr<P_expr2>, |
---|
978 | _bz_Min<float, typename P_expr2::T_numtype > > > |
---|
979 | min(float d1, |
---|
980 | _bz_VecExpr<P_expr2> d2) |
---|
981 | { |
---|
982 | typedef _bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
983 | _bz_VecExpr<P_expr2>, |
---|
984 | _bz_Min<float, typename P_expr2::T_numtype> > T_expr; |
---|
985 | |
---|
986 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), |
---|
987 | d2)); |
---|
988 | } |
---|
989 | |
---|
990 | // float min VectorPick<P_numtype2> |
---|
991 | template<class P_numtype2> |
---|
992 | inline |
---|
993 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
994 | VectorPickIterConst<P_numtype2>, |
---|
995 | _bz_Min<float, P_numtype2 > > > |
---|
996 | min(float d1, |
---|
997 | const VectorPick<P_numtype2>& d2) |
---|
998 | { |
---|
999 | typedef _bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
1000 | VectorPickIterConst<P_numtype2>, |
---|
1001 | _bz_Min<float, P_numtype2> > T_expr; |
---|
1002 | |
---|
1003 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), |
---|
1004 | d2.beginFast())); |
---|
1005 | } |
---|
1006 | |
---|
1007 | // float min Range |
---|
1008 | |
---|
1009 | inline |
---|
1010 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
1011 | Range, |
---|
1012 | _bz_Min<float, int > > > |
---|
1013 | min(float d1, |
---|
1014 | Range d2) |
---|
1015 | { |
---|
1016 | typedef _bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
1017 | Range, |
---|
1018 | _bz_Min<float, int> > T_expr; |
---|
1019 | |
---|
1020 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), |
---|
1021 | d2)); |
---|
1022 | } |
---|
1023 | |
---|
1024 | // float min TinyVector<P_numtype2, N_length2> |
---|
1025 | template<class P_numtype2, int N_length2> |
---|
1026 | inline |
---|
1027 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
1028 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1029 | _bz_Min<float, P_numtype2 > > > |
---|
1030 | min(float d1, |
---|
1031 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
1032 | { |
---|
1033 | typedef _bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
1034 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1035 | _bz_Min<float, P_numtype2> > T_expr; |
---|
1036 | |
---|
1037 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), |
---|
1038 | d2.beginFast())); |
---|
1039 | } |
---|
1040 | |
---|
1041 | // double min Vector<P_numtype2> |
---|
1042 | template<class P_numtype2> |
---|
1043 | inline |
---|
1044 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
1045 | VectorIterConst<P_numtype2>, |
---|
1046 | _bz_Min<double, P_numtype2 > > > |
---|
1047 | min(double d1, |
---|
1048 | const Vector<P_numtype2>& d2) |
---|
1049 | { |
---|
1050 | typedef _bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
1051 | VectorIterConst<P_numtype2>, |
---|
1052 | _bz_Min<double, P_numtype2> > T_expr; |
---|
1053 | |
---|
1054 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), |
---|
1055 | d2.beginFast())); |
---|
1056 | } |
---|
1057 | |
---|
1058 | // double min _bz_VecExpr<P_expr2> |
---|
1059 | template<class P_expr2> |
---|
1060 | inline |
---|
1061 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
1062 | _bz_VecExpr<P_expr2>, |
---|
1063 | _bz_Min<double, typename P_expr2::T_numtype > > > |
---|
1064 | min(double d1, |
---|
1065 | _bz_VecExpr<P_expr2> d2) |
---|
1066 | { |
---|
1067 | typedef _bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
1068 | _bz_VecExpr<P_expr2>, |
---|
1069 | _bz_Min<double, typename P_expr2::T_numtype> > T_expr; |
---|
1070 | |
---|
1071 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), |
---|
1072 | d2)); |
---|
1073 | } |
---|
1074 | |
---|
1075 | // double min VectorPick<P_numtype2> |
---|
1076 | template<class P_numtype2> |
---|
1077 | inline |
---|
1078 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
1079 | VectorPickIterConst<P_numtype2>, |
---|
1080 | _bz_Min<double, P_numtype2 > > > |
---|
1081 | min(double d1, |
---|
1082 | const VectorPick<P_numtype2>& d2) |
---|
1083 | { |
---|
1084 | typedef _bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
1085 | VectorPickIterConst<P_numtype2>, |
---|
1086 | _bz_Min<double, P_numtype2> > T_expr; |
---|
1087 | |
---|
1088 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), |
---|
1089 | d2.beginFast())); |
---|
1090 | } |
---|
1091 | |
---|
1092 | // double min Range |
---|
1093 | |
---|
1094 | inline |
---|
1095 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
1096 | Range, |
---|
1097 | _bz_Min<double, int > > > |
---|
1098 | min(double d1, |
---|
1099 | Range d2) |
---|
1100 | { |
---|
1101 | typedef _bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
1102 | Range, |
---|
1103 | _bz_Min<double, int> > T_expr; |
---|
1104 | |
---|
1105 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), |
---|
1106 | d2)); |
---|
1107 | } |
---|
1108 | |
---|
1109 | // double min TinyVector<P_numtype2, N_length2> |
---|
1110 | template<class P_numtype2, int N_length2> |
---|
1111 | inline |
---|
1112 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
1113 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1114 | _bz_Min<double, P_numtype2 > > > |
---|
1115 | min(double d1, |
---|
1116 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
1117 | { |
---|
1118 | typedef _bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
1119 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1120 | _bz_Min<double, P_numtype2> > T_expr; |
---|
1121 | |
---|
1122 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), |
---|
1123 | d2.beginFast())); |
---|
1124 | } |
---|
1125 | |
---|
1126 | // long double min Vector<P_numtype2> |
---|
1127 | template<class P_numtype2> |
---|
1128 | inline |
---|
1129 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
1130 | VectorIterConst<P_numtype2>, |
---|
1131 | _bz_Min<long double, P_numtype2 > > > |
---|
1132 | min(long double d1, |
---|
1133 | const Vector<P_numtype2>& d2) |
---|
1134 | { |
---|
1135 | typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
1136 | VectorIterConst<P_numtype2>, |
---|
1137 | _bz_Min<long double, P_numtype2> > T_expr; |
---|
1138 | |
---|
1139 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), |
---|
1140 | d2.beginFast())); |
---|
1141 | } |
---|
1142 | |
---|
1143 | // long double min _bz_VecExpr<P_expr2> |
---|
1144 | template<class P_expr2> |
---|
1145 | inline |
---|
1146 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
1147 | _bz_VecExpr<P_expr2>, |
---|
1148 | _bz_Min<long double, typename P_expr2::T_numtype > > > |
---|
1149 | min(long double d1, |
---|
1150 | _bz_VecExpr<P_expr2> d2) |
---|
1151 | { |
---|
1152 | typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
1153 | _bz_VecExpr<P_expr2>, |
---|
1154 | _bz_Min<long double, typename P_expr2::T_numtype> > T_expr; |
---|
1155 | |
---|
1156 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), |
---|
1157 | d2)); |
---|
1158 | } |
---|
1159 | |
---|
1160 | // long double min VectorPick<P_numtype2> |
---|
1161 | template<class P_numtype2> |
---|
1162 | inline |
---|
1163 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
1164 | VectorPickIterConst<P_numtype2>, |
---|
1165 | _bz_Min<long double, P_numtype2 > > > |
---|
1166 | min(long double d1, |
---|
1167 | const VectorPick<P_numtype2>& d2) |
---|
1168 | { |
---|
1169 | typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
1170 | VectorPickIterConst<P_numtype2>, |
---|
1171 | _bz_Min<long double, P_numtype2> > T_expr; |
---|
1172 | |
---|
1173 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), |
---|
1174 | d2.beginFast())); |
---|
1175 | } |
---|
1176 | |
---|
1177 | // long double min Range |
---|
1178 | |
---|
1179 | inline |
---|
1180 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
1181 | Range, |
---|
1182 | _bz_Min<long double, int > > > |
---|
1183 | min(long double d1, |
---|
1184 | Range d2) |
---|
1185 | { |
---|
1186 | typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
1187 | Range, |
---|
1188 | _bz_Min<long double, int> > T_expr; |
---|
1189 | |
---|
1190 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), |
---|
1191 | d2)); |
---|
1192 | } |
---|
1193 | |
---|
1194 | // long double min TinyVector<P_numtype2, N_length2> |
---|
1195 | template<class P_numtype2, int N_length2> |
---|
1196 | inline |
---|
1197 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
1198 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1199 | _bz_Min<long double, P_numtype2 > > > |
---|
1200 | min(long double d1, |
---|
1201 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
1202 | { |
---|
1203 | typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
1204 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1205 | _bz_Min<long double, P_numtype2> > T_expr; |
---|
1206 | |
---|
1207 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), |
---|
1208 | d2.beginFast())); |
---|
1209 | } |
---|
1210 | #ifdef BZ_HAVE_COMPLEX |
---|
1211 | |
---|
1212 | // complex<T1> min Vector<P_numtype2> |
---|
1213 | template<class T1, class P_numtype2> |
---|
1214 | inline |
---|
1215 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
1216 | VectorIterConst<P_numtype2>, |
---|
1217 | _bz_Min<complex<T1> , P_numtype2 > > > |
---|
1218 | min(complex<T1> d1, |
---|
1219 | const Vector<P_numtype2>& d2) |
---|
1220 | { |
---|
1221 | typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
1222 | VectorIterConst<P_numtype2>, |
---|
1223 | _bz_Min<complex<T1> , P_numtype2> > T_expr; |
---|
1224 | |
---|
1225 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1), |
---|
1226 | d2.beginFast())); |
---|
1227 | } |
---|
1228 | #endif // BZ_HAVE_COMPLEX |
---|
1229 | |
---|
1230 | #ifdef BZ_HAVE_COMPLEX |
---|
1231 | |
---|
1232 | // complex<T1> min _bz_VecExpr<P_expr2> |
---|
1233 | template<class T1, class P_expr2> |
---|
1234 | inline |
---|
1235 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
1236 | _bz_VecExpr<P_expr2>, |
---|
1237 | _bz_Min<complex<T1> , typename P_expr2::T_numtype > > > |
---|
1238 | min(complex<T1> d1, |
---|
1239 | _bz_VecExpr<P_expr2> d2) |
---|
1240 | { |
---|
1241 | typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
1242 | _bz_VecExpr<P_expr2>, |
---|
1243 | _bz_Min<complex<T1> , typename P_expr2::T_numtype> > T_expr; |
---|
1244 | |
---|
1245 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1), |
---|
1246 | d2)); |
---|
1247 | } |
---|
1248 | #endif // BZ_HAVE_COMPLEX |
---|
1249 | |
---|
1250 | #ifdef BZ_HAVE_COMPLEX |
---|
1251 | |
---|
1252 | // complex<T1> min VectorPick<P_numtype2> |
---|
1253 | template<class T1, class P_numtype2> |
---|
1254 | inline |
---|
1255 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
1256 | VectorPickIterConst<P_numtype2>, |
---|
1257 | _bz_Min<complex<T1> , P_numtype2 > > > |
---|
1258 | min(complex<T1> d1, |
---|
1259 | const VectorPick<P_numtype2>& d2) |
---|
1260 | { |
---|
1261 | typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
1262 | VectorPickIterConst<P_numtype2>, |
---|
1263 | _bz_Min<complex<T1> , P_numtype2> > T_expr; |
---|
1264 | |
---|
1265 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1), |
---|
1266 | d2.beginFast())); |
---|
1267 | } |
---|
1268 | #endif // BZ_HAVE_COMPLEX |
---|
1269 | |
---|
1270 | #ifdef BZ_HAVE_COMPLEX |
---|
1271 | |
---|
1272 | // complex<T1> min Range |
---|
1273 | template<class T1> |
---|
1274 | inline |
---|
1275 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
1276 | Range, |
---|
1277 | _bz_Min<complex<T1> , int > > > |
---|
1278 | min(complex<T1> d1, |
---|
1279 | Range d2) |
---|
1280 | { |
---|
1281 | typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
1282 | Range, |
---|
1283 | _bz_Min<complex<T1> , int> > T_expr; |
---|
1284 | |
---|
1285 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1), |
---|
1286 | d2)); |
---|
1287 | } |
---|
1288 | #endif // BZ_HAVE_COMPLEX |
---|
1289 | |
---|
1290 | #ifdef BZ_HAVE_COMPLEX |
---|
1291 | |
---|
1292 | // complex<T1> min TinyVector<P_numtype2, N_length2> |
---|
1293 | template<class T1, class P_numtype2, int N_length2> |
---|
1294 | inline |
---|
1295 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
1296 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1297 | _bz_Min<complex<T1> , P_numtype2 > > > |
---|
1298 | min(complex<T1> d1, |
---|
1299 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
1300 | { |
---|
1301 | typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
1302 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1303 | _bz_Min<complex<T1> , P_numtype2> > T_expr; |
---|
1304 | |
---|
1305 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1), |
---|
1306 | d2.beginFast())); |
---|
1307 | } |
---|
1308 | #endif // BZ_HAVE_COMPLEX |
---|
1309 | |
---|
1310 | /**************************************************************************** |
---|
1311 | * Maximum Operators |
---|
1312 | ****************************************************************************/ |
---|
1313 | |
---|
1314 | // Vector<P_numtype1> max Vector<P_numtype2> |
---|
1315 | template<class P_numtype1, class P_numtype2> |
---|
1316 | inline |
---|
1317 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1318 | VectorIterConst<P_numtype2>, |
---|
1319 | _bz_Max<P_numtype1, P_numtype2 > > > |
---|
1320 | max(const Vector<P_numtype1>& d1, |
---|
1321 | const Vector<P_numtype2>& d2) |
---|
1322 | { |
---|
1323 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1324 | VectorIterConst<P_numtype2>, |
---|
1325 | _bz_Max<P_numtype1, P_numtype2> > T_expr; |
---|
1326 | |
---|
1327 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1328 | d2.beginFast())); |
---|
1329 | } |
---|
1330 | |
---|
1331 | // Vector<P_numtype1> max _bz_VecExpr<P_expr2> |
---|
1332 | template<class P_numtype1, class P_expr2> |
---|
1333 | inline |
---|
1334 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1335 | _bz_VecExpr<P_expr2>, |
---|
1336 | _bz_Max<P_numtype1, typename P_expr2::T_numtype > > > |
---|
1337 | max(const Vector<P_numtype1>& d1, |
---|
1338 | _bz_VecExpr<P_expr2> d2) |
---|
1339 | { |
---|
1340 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1341 | _bz_VecExpr<P_expr2>, |
---|
1342 | _bz_Max<P_numtype1, typename P_expr2::T_numtype> > T_expr; |
---|
1343 | |
---|
1344 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1345 | d2)); |
---|
1346 | } |
---|
1347 | |
---|
1348 | // Vector<P_numtype1> max VectorPick<P_numtype2> |
---|
1349 | template<class P_numtype1, class P_numtype2> |
---|
1350 | inline |
---|
1351 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1352 | VectorPickIterConst<P_numtype2>, |
---|
1353 | _bz_Max<P_numtype1, P_numtype2 > > > |
---|
1354 | max(const Vector<P_numtype1>& d1, |
---|
1355 | const VectorPick<P_numtype2>& d2) |
---|
1356 | { |
---|
1357 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1358 | VectorPickIterConst<P_numtype2>, |
---|
1359 | _bz_Max<P_numtype1, P_numtype2> > T_expr; |
---|
1360 | |
---|
1361 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1362 | d2.beginFast())); |
---|
1363 | } |
---|
1364 | |
---|
1365 | // Vector<P_numtype1> max Range |
---|
1366 | template<class P_numtype1> |
---|
1367 | inline |
---|
1368 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1369 | Range, |
---|
1370 | _bz_Max<P_numtype1, int > > > |
---|
1371 | max(const Vector<P_numtype1>& d1, |
---|
1372 | Range d2) |
---|
1373 | { |
---|
1374 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1375 | Range, |
---|
1376 | _bz_Max<P_numtype1, int> > T_expr; |
---|
1377 | |
---|
1378 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1379 | d2)); |
---|
1380 | } |
---|
1381 | |
---|
1382 | // Vector<P_numtype1> max TinyVector<P_numtype2, N_length2> |
---|
1383 | template<class P_numtype1, class P_numtype2, int N_length2> |
---|
1384 | inline |
---|
1385 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1386 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1387 | _bz_Max<P_numtype1, P_numtype2 > > > |
---|
1388 | max(const Vector<P_numtype1>& d1, |
---|
1389 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
1390 | { |
---|
1391 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1392 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1393 | _bz_Max<P_numtype1, P_numtype2> > T_expr; |
---|
1394 | |
---|
1395 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1396 | d2.beginFast())); |
---|
1397 | } |
---|
1398 | |
---|
1399 | // Vector<P_numtype1> max int |
---|
1400 | template<class P_numtype1> |
---|
1401 | inline |
---|
1402 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1403 | _bz_VecExprConstant<int>, |
---|
1404 | _bz_Max<P_numtype1, int > > > |
---|
1405 | max(const Vector<P_numtype1>& d1, |
---|
1406 | int d2) |
---|
1407 | { |
---|
1408 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1409 | _bz_VecExprConstant<int>, |
---|
1410 | _bz_Max<P_numtype1, int> > T_expr; |
---|
1411 | |
---|
1412 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1413 | _bz_VecExprConstant<int>(d2))); |
---|
1414 | } |
---|
1415 | |
---|
1416 | // Vector<P_numtype1> max float |
---|
1417 | template<class P_numtype1> |
---|
1418 | inline |
---|
1419 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1420 | _bz_VecExprConstant<float>, |
---|
1421 | _bz_Max<P_numtype1, float > > > |
---|
1422 | max(const Vector<P_numtype1>& d1, |
---|
1423 | float d2) |
---|
1424 | { |
---|
1425 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1426 | _bz_VecExprConstant<float>, |
---|
1427 | _bz_Max<P_numtype1, float> > T_expr; |
---|
1428 | |
---|
1429 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1430 | _bz_VecExprConstant<float>(d2))); |
---|
1431 | } |
---|
1432 | |
---|
1433 | // Vector<P_numtype1> max double |
---|
1434 | template<class P_numtype1> |
---|
1435 | inline |
---|
1436 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1437 | _bz_VecExprConstant<double>, |
---|
1438 | _bz_Max<P_numtype1, double > > > |
---|
1439 | max(const Vector<P_numtype1>& d1, |
---|
1440 | double d2) |
---|
1441 | { |
---|
1442 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1443 | _bz_VecExprConstant<double>, |
---|
1444 | _bz_Max<P_numtype1, double> > T_expr; |
---|
1445 | |
---|
1446 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1447 | _bz_VecExprConstant<double>(d2))); |
---|
1448 | } |
---|
1449 | |
---|
1450 | // Vector<P_numtype1> max long double |
---|
1451 | template<class P_numtype1> |
---|
1452 | inline |
---|
1453 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1454 | _bz_VecExprConstant<long double>, |
---|
1455 | _bz_Max<P_numtype1, long double > > > |
---|
1456 | max(const Vector<P_numtype1>& d1, |
---|
1457 | long double d2) |
---|
1458 | { |
---|
1459 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1460 | _bz_VecExprConstant<long double>, |
---|
1461 | _bz_Max<P_numtype1, long double> > T_expr; |
---|
1462 | |
---|
1463 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1464 | _bz_VecExprConstant<long double>(d2))); |
---|
1465 | } |
---|
1466 | #ifdef BZ_HAVE_COMPLEX |
---|
1467 | |
---|
1468 | // Vector<P_numtype1> max complex<T2> |
---|
1469 | template<class P_numtype1, class T2> |
---|
1470 | inline |
---|
1471 | _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1472 | _bz_VecExprConstant<complex<T2> > , |
---|
1473 | _bz_Max<P_numtype1, complex<T2> > > > |
---|
1474 | max(const Vector<P_numtype1>& d1, |
---|
1475 | complex<T2> d2) |
---|
1476 | { |
---|
1477 | typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, |
---|
1478 | _bz_VecExprConstant<complex<T2> > , |
---|
1479 | _bz_Max<P_numtype1, complex<T2> > > T_expr; |
---|
1480 | |
---|
1481 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1482 | _bz_VecExprConstant<complex<T2> > (d2))); |
---|
1483 | } |
---|
1484 | #endif // BZ_HAVE_COMPLEX |
---|
1485 | |
---|
1486 | |
---|
1487 | // _bz_VecExpr<P_expr1> max Vector<P_numtype2> |
---|
1488 | template<class P_expr1, class P_numtype2> |
---|
1489 | inline |
---|
1490 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1491 | VectorIterConst<P_numtype2>, |
---|
1492 | _bz_Max<typename P_expr1::T_numtype, P_numtype2 > > > |
---|
1493 | max(_bz_VecExpr<P_expr1> d1, |
---|
1494 | const Vector<P_numtype2>& d2) |
---|
1495 | { |
---|
1496 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1497 | VectorIterConst<P_numtype2>, |
---|
1498 | _bz_Max<typename P_expr1::T_numtype, P_numtype2> > T_expr; |
---|
1499 | |
---|
1500 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1501 | d2.beginFast())); |
---|
1502 | } |
---|
1503 | |
---|
1504 | // _bz_VecExpr<P_expr1> max _bz_VecExpr<P_expr2> |
---|
1505 | template<class P_expr1, class P_expr2> |
---|
1506 | inline |
---|
1507 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1508 | _bz_VecExpr<P_expr2>, |
---|
1509 | _bz_Max<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > > |
---|
1510 | max(_bz_VecExpr<P_expr1> d1, |
---|
1511 | _bz_VecExpr<P_expr2> d2) |
---|
1512 | { |
---|
1513 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1514 | _bz_VecExpr<P_expr2>, |
---|
1515 | _bz_Max<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T_expr; |
---|
1516 | |
---|
1517 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1518 | d2)); |
---|
1519 | } |
---|
1520 | |
---|
1521 | // _bz_VecExpr<P_expr1> max VectorPick<P_numtype2> |
---|
1522 | template<class P_expr1, class P_numtype2> |
---|
1523 | inline |
---|
1524 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1525 | VectorPickIterConst<P_numtype2>, |
---|
1526 | _bz_Max<typename P_expr1::T_numtype, P_numtype2 > > > |
---|
1527 | max(_bz_VecExpr<P_expr1> d1, |
---|
1528 | const VectorPick<P_numtype2>& d2) |
---|
1529 | { |
---|
1530 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1531 | VectorPickIterConst<P_numtype2>, |
---|
1532 | _bz_Max<typename P_expr1::T_numtype, P_numtype2> > T_expr; |
---|
1533 | |
---|
1534 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1535 | d2.beginFast())); |
---|
1536 | } |
---|
1537 | |
---|
1538 | // _bz_VecExpr<P_expr1> max Range |
---|
1539 | template<class P_expr1> |
---|
1540 | inline |
---|
1541 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1542 | Range, |
---|
1543 | _bz_Max<typename P_expr1::T_numtype, int > > > |
---|
1544 | max(_bz_VecExpr<P_expr1> d1, |
---|
1545 | Range d2) |
---|
1546 | { |
---|
1547 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1548 | Range, |
---|
1549 | _bz_Max<typename P_expr1::T_numtype, int> > T_expr; |
---|
1550 | |
---|
1551 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1552 | d2)); |
---|
1553 | } |
---|
1554 | |
---|
1555 | // _bz_VecExpr<P_expr1> max TinyVector<P_numtype2, N_length2> |
---|
1556 | template<class P_expr1, class P_numtype2, int N_length2> |
---|
1557 | inline |
---|
1558 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1559 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1560 | _bz_Max<typename P_expr1::T_numtype, P_numtype2 > > > |
---|
1561 | max(_bz_VecExpr<P_expr1> d1, |
---|
1562 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
1563 | { |
---|
1564 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1565 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1566 | _bz_Max<typename P_expr1::T_numtype, P_numtype2> > T_expr; |
---|
1567 | |
---|
1568 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1569 | d2.beginFast())); |
---|
1570 | } |
---|
1571 | |
---|
1572 | // _bz_VecExpr<P_expr1> max int |
---|
1573 | template<class P_expr1> |
---|
1574 | inline |
---|
1575 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1576 | _bz_VecExprConstant<int>, |
---|
1577 | _bz_Max<typename P_expr1::T_numtype, int > > > |
---|
1578 | max(_bz_VecExpr<P_expr1> d1, |
---|
1579 | int d2) |
---|
1580 | { |
---|
1581 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1582 | _bz_VecExprConstant<int>, |
---|
1583 | _bz_Max<typename P_expr1::T_numtype, int> > T_expr; |
---|
1584 | |
---|
1585 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1586 | _bz_VecExprConstant<int>(d2))); |
---|
1587 | } |
---|
1588 | |
---|
1589 | // _bz_VecExpr<P_expr1> max float |
---|
1590 | template<class P_expr1> |
---|
1591 | inline |
---|
1592 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1593 | _bz_VecExprConstant<float>, |
---|
1594 | _bz_Max<typename P_expr1::T_numtype, float > > > |
---|
1595 | max(_bz_VecExpr<P_expr1> d1, |
---|
1596 | float d2) |
---|
1597 | { |
---|
1598 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1599 | _bz_VecExprConstant<float>, |
---|
1600 | _bz_Max<typename P_expr1::T_numtype, float> > T_expr; |
---|
1601 | |
---|
1602 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1603 | _bz_VecExprConstant<float>(d2))); |
---|
1604 | } |
---|
1605 | |
---|
1606 | // _bz_VecExpr<P_expr1> max double |
---|
1607 | template<class P_expr1> |
---|
1608 | inline |
---|
1609 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1610 | _bz_VecExprConstant<double>, |
---|
1611 | _bz_Max<typename P_expr1::T_numtype, double > > > |
---|
1612 | max(_bz_VecExpr<P_expr1> d1, |
---|
1613 | double d2) |
---|
1614 | { |
---|
1615 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1616 | _bz_VecExprConstant<double>, |
---|
1617 | _bz_Max<typename P_expr1::T_numtype, double> > T_expr; |
---|
1618 | |
---|
1619 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1620 | _bz_VecExprConstant<double>(d2))); |
---|
1621 | } |
---|
1622 | |
---|
1623 | // _bz_VecExpr<P_expr1> max long double |
---|
1624 | template<class P_expr1> |
---|
1625 | inline |
---|
1626 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1627 | _bz_VecExprConstant<long double>, |
---|
1628 | _bz_Max<typename P_expr1::T_numtype, long double > > > |
---|
1629 | max(_bz_VecExpr<P_expr1> d1, |
---|
1630 | long double d2) |
---|
1631 | { |
---|
1632 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1633 | _bz_VecExprConstant<long double>, |
---|
1634 | _bz_Max<typename P_expr1::T_numtype, long double> > T_expr; |
---|
1635 | |
---|
1636 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1637 | _bz_VecExprConstant<long double>(d2))); |
---|
1638 | } |
---|
1639 | #ifdef BZ_HAVE_COMPLEX |
---|
1640 | |
---|
1641 | // _bz_VecExpr<P_expr1> max complex<T2> |
---|
1642 | template<class P_expr1, class T2> |
---|
1643 | inline |
---|
1644 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1645 | _bz_VecExprConstant<complex<T2> > , |
---|
1646 | _bz_Max<typename P_expr1::T_numtype, complex<T2> > > > |
---|
1647 | max(_bz_VecExpr<P_expr1> d1, |
---|
1648 | complex<T2> d2) |
---|
1649 | { |
---|
1650 | typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, |
---|
1651 | _bz_VecExprConstant<complex<T2> > , |
---|
1652 | _bz_Max<typename P_expr1::T_numtype, complex<T2> > > T_expr; |
---|
1653 | |
---|
1654 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1655 | _bz_VecExprConstant<complex<T2> > (d2))); |
---|
1656 | } |
---|
1657 | #endif // BZ_HAVE_COMPLEX |
---|
1658 | |
---|
1659 | |
---|
1660 | // VectorPick<P_numtype1> max Vector<P_numtype2> |
---|
1661 | template<class P_numtype1, class P_numtype2> |
---|
1662 | inline |
---|
1663 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1664 | VectorIterConst<P_numtype2>, |
---|
1665 | _bz_Max<P_numtype1, P_numtype2 > > > |
---|
1666 | max(const VectorPick<P_numtype1>& d1, |
---|
1667 | const Vector<P_numtype2>& d2) |
---|
1668 | { |
---|
1669 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1670 | VectorIterConst<P_numtype2>, |
---|
1671 | _bz_Max<P_numtype1, P_numtype2> > T_expr; |
---|
1672 | |
---|
1673 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1674 | d2.beginFast())); |
---|
1675 | } |
---|
1676 | |
---|
1677 | // VectorPick<P_numtype1> max _bz_VecExpr<P_expr2> |
---|
1678 | template<class P_numtype1, class P_expr2> |
---|
1679 | inline |
---|
1680 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1681 | _bz_VecExpr<P_expr2>, |
---|
1682 | _bz_Max<P_numtype1, typename P_expr2::T_numtype > > > |
---|
1683 | max(const VectorPick<P_numtype1>& d1, |
---|
1684 | _bz_VecExpr<P_expr2> d2) |
---|
1685 | { |
---|
1686 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1687 | _bz_VecExpr<P_expr2>, |
---|
1688 | _bz_Max<P_numtype1, typename P_expr2::T_numtype> > T_expr; |
---|
1689 | |
---|
1690 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1691 | d2)); |
---|
1692 | } |
---|
1693 | |
---|
1694 | // VectorPick<P_numtype1> max VectorPick<P_numtype2> |
---|
1695 | template<class P_numtype1, class P_numtype2> |
---|
1696 | inline |
---|
1697 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1698 | VectorPickIterConst<P_numtype2>, |
---|
1699 | _bz_Max<P_numtype1, P_numtype2 > > > |
---|
1700 | max(const VectorPick<P_numtype1>& d1, |
---|
1701 | const VectorPick<P_numtype2>& d2) |
---|
1702 | { |
---|
1703 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1704 | VectorPickIterConst<P_numtype2>, |
---|
1705 | _bz_Max<P_numtype1, P_numtype2> > T_expr; |
---|
1706 | |
---|
1707 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1708 | d2.beginFast())); |
---|
1709 | } |
---|
1710 | |
---|
1711 | // VectorPick<P_numtype1> max Range |
---|
1712 | template<class P_numtype1> |
---|
1713 | inline |
---|
1714 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1715 | Range, |
---|
1716 | _bz_Max<P_numtype1, int > > > |
---|
1717 | max(const VectorPick<P_numtype1>& d1, |
---|
1718 | Range d2) |
---|
1719 | { |
---|
1720 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1721 | Range, |
---|
1722 | _bz_Max<P_numtype1, int> > T_expr; |
---|
1723 | |
---|
1724 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1725 | d2)); |
---|
1726 | } |
---|
1727 | |
---|
1728 | // VectorPick<P_numtype1> max TinyVector<P_numtype2, N_length2> |
---|
1729 | template<class P_numtype1, class P_numtype2, int N_length2> |
---|
1730 | inline |
---|
1731 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1732 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1733 | _bz_Max<P_numtype1, P_numtype2 > > > |
---|
1734 | max(const VectorPick<P_numtype1>& d1, |
---|
1735 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
1736 | { |
---|
1737 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1738 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1739 | _bz_Max<P_numtype1, P_numtype2> > T_expr; |
---|
1740 | |
---|
1741 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1742 | d2.beginFast())); |
---|
1743 | } |
---|
1744 | |
---|
1745 | // VectorPick<P_numtype1> max int |
---|
1746 | template<class P_numtype1> |
---|
1747 | inline |
---|
1748 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1749 | _bz_VecExprConstant<int>, |
---|
1750 | _bz_Max<P_numtype1, int > > > |
---|
1751 | max(const VectorPick<P_numtype1>& d1, |
---|
1752 | int d2) |
---|
1753 | { |
---|
1754 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1755 | _bz_VecExprConstant<int>, |
---|
1756 | _bz_Max<P_numtype1, int> > T_expr; |
---|
1757 | |
---|
1758 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1759 | _bz_VecExprConstant<int>(d2))); |
---|
1760 | } |
---|
1761 | |
---|
1762 | // VectorPick<P_numtype1> max float |
---|
1763 | template<class P_numtype1> |
---|
1764 | inline |
---|
1765 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1766 | _bz_VecExprConstant<float>, |
---|
1767 | _bz_Max<P_numtype1, float > > > |
---|
1768 | max(const VectorPick<P_numtype1>& d1, |
---|
1769 | float d2) |
---|
1770 | { |
---|
1771 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1772 | _bz_VecExprConstant<float>, |
---|
1773 | _bz_Max<P_numtype1, float> > T_expr; |
---|
1774 | |
---|
1775 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1776 | _bz_VecExprConstant<float>(d2))); |
---|
1777 | } |
---|
1778 | |
---|
1779 | // VectorPick<P_numtype1> max double |
---|
1780 | template<class P_numtype1> |
---|
1781 | inline |
---|
1782 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1783 | _bz_VecExprConstant<double>, |
---|
1784 | _bz_Max<P_numtype1, double > > > |
---|
1785 | max(const VectorPick<P_numtype1>& d1, |
---|
1786 | double d2) |
---|
1787 | { |
---|
1788 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1789 | _bz_VecExprConstant<double>, |
---|
1790 | _bz_Max<P_numtype1, double> > T_expr; |
---|
1791 | |
---|
1792 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1793 | _bz_VecExprConstant<double>(d2))); |
---|
1794 | } |
---|
1795 | |
---|
1796 | // VectorPick<P_numtype1> max long double |
---|
1797 | template<class P_numtype1> |
---|
1798 | inline |
---|
1799 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1800 | _bz_VecExprConstant<long double>, |
---|
1801 | _bz_Max<P_numtype1, long double > > > |
---|
1802 | max(const VectorPick<P_numtype1>& d1, |
---|
1803 | long double d2) |
---|
1804 | { |
---|
1805 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1806 | _bz_VecExprConstant<long double>, |
---|
1807 | _bz_Max<P_numtype1, long double> > T_expr; |
---|
1808 | |
---|
1809 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1810 | _bz_VecExprConstant<long double>(d2))); |
---|
1811 | } |
---|
1812 | #ifdef BZ_HAVE_COMPLEX |
---|
1813 | |
---|
1814 | // VectorPick<P_numtype1> max complex<T2> |
---|
1815 | template<class P_numtype1, class T2> |
---|
1816 | inline |
---|
1817 | _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1818 | _bz_VecExprConstant<complex<T2> > , |
---|
1819 | _bz_Max<P_numtype1, complex<T2> > > > |
---|
1820 | max(const VectorPick<P_numtype1>& d1, |
---|
1821 | complex<T2> d2) |
---|
1822 | { |
---|
1823 | typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, |
---|
1824 | _bz_VecExprConstant<complex<T2> > , |
---|
1825 | _bz_Max<P_numtype1, complex<T2> > > T_expr; |
---|
1826 | |
---|
1827 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
1828 | _bz_VecExprConstant<complex<T2> > (d2))); |
---|
1829 | } |
---|
1830 | #endif // BZ_HAVE_COMPLEX |
---|
1831 | |
---|
1832 | |
---|
1833 | // Range max Vector<P_numtype2> |
---|
1834 | template<class P_numtype2> |
---|
1835 | inline |
---|
1836 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
1837 | VectorIterConst<P_numtype2>, |
---|
1838 | _bz_Max<int, P_numtype2 > > > |
---|
1839 | max(Range d1, |
---|
1840 | const Vector<P_numtype2>& d2) |
---|
1841 | { |
---|
1842 | typedef _bz_VecExprOp<Range, |
---|
1843 | VectorIterConst<P_numtype2>, |
---|
1844 | _bz_Max<int, P_numtype2> > T_expr; |
---|
1845 | |
---|
1846 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1847 | d2.beginFast())); |
---|
1848 | } |
---|
1849 | |
---|
1850 | // Range max _bz_VecExpr<P_expr2> |
---|
1851 | template<class P_expr2> |
---|
1852 | inline |
---|
1853 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
1854 | _bz_VecExpr<P_expr2>, |
---|
1855 | _bz_Max<int, typename P_expr2::T_numtype > > > |
---|
1856 | max(Range d1, |
---|
1857 | _bz_VecExpr<P_expr2> d2) |
---|
1858 | { |
---|
1859 | typedef _bz_VecExprOp<Range, |
---|
1860 | _bz_VecExpr<P_expr2>, |
---|
1861 | _bz_Max<int, typename P_expr2::T_numtype> > T_expr; |
---|
1862 | |
---|
1863 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1864 | d2)); |
---|
1865 | } |
---|
1866 | |
---|
1867 | // Range max VectorPick<P_numtype2> |
---|
1868 | template<class P_numtype2> |
---|
1869 | inline |
---|
1870 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
1871 | VectorPickIterConst<P_numtype2>, |
---|
1872 | _bz_Max<int, P_numtype2 > > > |
---|
1873 | max(Range d1, |
---|
1874 | const VectorPick<P_numtype2>& d2) |
---|
1875 | { |
---|
1876 | typedef _bz_VecExprOp<Range, |
---|
1877 | VectorPickIterConst<P_numtype2>, |
---|
1878 | _bz_Max<int, P_numtype2> > T_expr; |
---|
1879 | |
---|
1880 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1881 | d2.beginFast())); |
---|
1882 | } |
---|
1883 | |
---|
1884 | // Range max Range |
---|
1885 | |
---|
1886 | inline |
---|
1887 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
1888 | Range, |
---|
1889 | _bz_Max<int, int > > > |
---|
1890 | max(Range d1, |
---|
1891 | Range d2) |
---|
1892 | { |
---|
1893 | typedef _bz_VecExprOp<Range, |
---|
1894 | Range, |
---|
1895 | _bz_Max<int, int> > T_expr; |
---|
1896 | |
---|
1897 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1898 | d2)); |
---|
1899 | } |
---|
1900 | |
---|
1901 | // Range max TinyVector<P_numtype2, N_length2> |
---|
1902 | template<class P_numtype2, int N_length2> |
---|
1903 | inline |
---|
1904 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
1905 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1906 | _bz_Max<int, P_numtype2 > > > |
---|
1907 | max(Range d1, |
---|
1908 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
1909 | { |
---|
1910 | typedef _bz_VecExprOp<Range, |
---|
1911 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
1912 | _bz_Max<int, P_numtype2> > T_expr; |
---|
1913 | |
---|
1914 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1915 | d2.beginFast())); |
---|
1916 | } |
---|
1917 | |
---|
1918 | // Range max float |
---|
1919 | |
---|
1920 | inline |
---|
1921 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
1922 | _bz_VecExprConstant<float>, |
---|
1923 | _bz_Max<int, float > > > |
---|
1924 | max(Range d1, |
---|
1925 | float d2) |
---|
1926 | { |
---|
1927 | typedef _bz_VecExprOp<Range, |
---|
1928 | _bz_VecExprConstant<float>, |
---|
1929 | _bz_Max<int, float> > T_expr; |
---|
1930 | |
---|
1931 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1932 | _bz_VecExprConstant<float>(d2))); |
---|
1933 | } |
---|
1934 | |
---|
1935 | // Range max double |
---|
1936 | |
---|
1937 | inline |
---|
1938 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
1939 | _bz_VecExprConstant<double>, |
---|
1940 | _bz_Max<int, double > > > |
---|
1941 | max(Range d1, |
---|
1942 | double d2) |
---|
1943 | { |
---|
1944 | typedef _bz_VecExprOp<Range, |
---|
1945 | _bz_VecExprConstant<double>, |
---|
1946 | _bz_Max<int, double> > T_expr; |
---|
1947 | |
---|
1948 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1949 | _bz_VecExprConstant<double>(d2))); |
---|
1950 | } |
---|
1951 | |
---|
1952 | // Range max long double |
---|
1953 | |
---|
1954 | inline |
---|
1955 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
1956 | _bz_VecExprConstant<long double>, |
---|
1957 | _bz_Max<int, long double > > > |
---|
1958 | max(Range d1, |
---|
1959 | long double d2) |
---|
1960 | { |
---|
1961 | typedef _bz_VecExprOp<Range, |
---|
1962 | _bz_VecExprConstant<long double>, |
---|
1963 | _bz_Max<int, long double> > T_expr; |
---|
1964 | |
---|
1965 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1966 | _bz_VecExprConstant<long double>(d2))); |
---|
1967 | } |
---|
1968 | #ifdef BZ_HAVE_COMPLEX |
---|
1969 | |
---|
1970 | // Range max complex<T2> |
---|
1971 | template<class T2> |
---|
1972 | inline |
---|
1973 | _bz_VecExpr<_bz_VecExprOp<Range, |
---|
1974 | _bz_VecExprConstant<complex<T2> > , |
---|
1975 | _bz_Max<int, complex<T2> > > > |
---|
1976 | max(Range d1, |
---|
1977 | complex<T2> d2) |
---|
1978 | { |
---|
1979 | typedef _bz_VecExprOp<Range, |
---|
1980 | _bz_VecExprConstant<complex<T2> > , |
---|
1981 | _bz_Max<int, complex<T2> > > T_expr; |
---|
1982 | |
---|
1983 | return _bz_VecExpr<T_expr>(T_expr(d1, |
---|
1984 | _bz_VecExprConstant<complex<T2> > (d2))); |
---|
1985 | } |
---|
1986 | #endif // BZ_HAVE_COMPLEX |
---|
1987 | |
---|
1988 | |
---|
1989 | // TinyVector<P_numtype1, N_length1> max Vector<P_numtype2> |
---|
1990 | template<class P_numtype1, int N_length1, class P_numtype2> |
---|
1991 | inline |
---|
1992 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
1993 | VectorIterConst<P_numtype2>, |
---|
1994 | _bz_Max<P_numtype1, P_numtype2 > > > |
---|
1995 | max(const TinyVector<P_numtype1, N_length1>& d1, |
---|
1996 | const Vector<P_numtype2>& d2) |
---|
1997 | { |
---|
1998 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
1999 | VectorIterConst<P_numtype2>, |
---|
2000 | _bz_Max<P_numtype1, P_numtype2> > T_expr; |
---|
2001 | |
---|
2002 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
2003 | d2.beginFast())); |
---|
2004 | } |
---|
2005 | |
---|
2006 | // TinyVector<P_numtype1, N_length1> max _bz_VecExpr<P_expr2> |
---|
2007 | template<class P_numtype1, int N_length1, class P_expr2> |
---|
2008 | inline |
---|
2009 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2010 | _bz_VecExpr<P_expr2>, |
---|
2011 | _bz_Max<P_numtype1, typename P_expr2::T_numtype > > > |
---|
2012 | max(const TinyVector<P_numtype1, N_length1>& d1, |
---|
2013 | _bz_VecExpr<P_expr2> d2) |
---|
2014 | { |
---|
2015 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2016 | _bz_VecExpr<P_expr2>, |
---|
2017 | _bz_Max<P_numtype1, typename P_expr2::T_numtype> > T_expr; |
---|
2018 | |
---|
2019 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
2020 | d2)); |
---|
2021 | } |
---|
2022 | |
---|
2023 | // TinyVector<P_numtype1, N_length1> max VectorPick<P_numtype2> |
---|
2024 | template<class P_numtype1, int N_length1, class P_numtype2> |
---|
2025 | inline |
---|
2026 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2027 | VectorPickIterConst<P_numtype2>, |
---|
2028 | _bz_Max<P_numtype1, P_numtype2 > > > |
---|
2029 | max(const TinyVector<P_numtype1, N_length1>& d1, |
---|
2030 | const VectorPick<P_numtype2>& d2) |
---|
2031 | { |
---|
2032 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2033 | VectorPickIterConst<P_numtype2>, |
---|
2034 | _bz_Max<P_numtype1, P_numtype2> > T_expr; |
---|
2035 | |
---|
2036 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
2037 | d2.beginFast())); |
---|
2038 | } |
---|
2039 | |
---|
2040 | // TinyVector<P_numtype1, N_length1> max Range |
---|
2041 | template<class P_numtype1, int N_length1> |
---|
2042 | inline |
---|
2043 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2044 | Range, |
---|
2045 | _bz_Max<P_numtype1, int > > > |
---|
2046 | max(const TinyVector<P_numtype1, N_length1>& d1, |
---|
2047 | Range d2) |
---|
2048 | { |
---|
2049 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2050 | Range, |
---|
2051 | _bz_Max<P_numtype1, int> > T_expr; |
---|
2052 | |
---|
2053 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
2054 | d2)); |
---|
2055 | } |
---|
2056 | |
---|
2057 | // TinyVector<P_numtype1, N_length1> max TinyVector<P_numtype2, N_length2> |
---|
2058 | template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> |
---|
2059 | inline |
---|
2060 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2061 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2062 | _bz_Max<P_numtype1, P_numtype2 > > > |
---|
2063 | max(const TinyVector<P_numtype1, N_length1>& d1, |
---|
2064 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
2065 | { |
---|
2066 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2067 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2068 | _bz_Max<P_numtype1, P_numtype2> > T_expr; |
---|
2069 | |
---|
2070 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
2071 | d2.beginFast())); |
---|
2072 | } |
---|
2073 | |
---|
2074 | // TinyVector<P_numtype1, N_length1> max int |
---|
2075 | template<class P_numtype1, int N_length1> |
---|
2076 | inline |
---|
2077 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2078 | _bz_VecExprConstant<int>, |
---|
2079 | _bz_Max<P_numtype1, int > > > |
---|
2080 | max(const TinyVector<P_numtype1, N_length1>& d1, |
---|
2081 | int d2) |
---|
2082 | { |
---|
2083 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2084 | _bz_VecExprConstant<int>, |
---|
2085 | _bz_Max<P_numtype1, int> > T_expr; |
---|
2086 | |
---|
2087 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
2088 | _bz_VecExprConstant<int>(d2))); |
---|
2089 | } |
---|
2090 | |
---|
2091 | // TinyVector<P_numtype1, N_length1> max float |
---|
2092 | template<class P_numtype1, int N_length1> |
---|
2093 | inline |
---|
2094 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2095 | _bz_VecExprConstant<float>, |
---|
2096 | _bz_Max<P_numtype1, float > > > |
---|
2097 | max(const TinyVector<P_numtype1, N_length1>& d1, |
---|
2098 | float d2) |
---|
2099 | { |
---|
2100 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2101 | _bz_VecExprConstant<float>, |
---|
2102 | _bz_Max<P_numtype1, float> > T_expr; |
---|
2103 | |
---|
2104 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
2105 | _bz_VecExprConstant<float>(d2))); |
---|
2106 | } |
---|
2107 | |
---|
2108 | // TinyVector<P_numtype1, N_length1> max double |
---|
2109 | template<class P_numtype1, int N_length1> |
---|
2110 | inline |
---|
2111 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2112 | _bz_VecExprConstant<double>, |
---|
2113 | _bz_Max<P_numtype1, double > > > |
---|
2114 | max(const TinyVector<P_numtype1, N_length1>& d1, |
---|
2115 | double d2) |
---|
2116 | { |
---|
2117 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2118 | _bz_VecExprConstant<double>, |
---|
2119 | _bz_Max<P_numtype1, double> > T_expr; |
---|
2120 | |
---|
2121 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
2122 | _bz_VecExprConstant<double>(d2))); |
---|
2123 | } |
---|
2124 | |
---|
2125 | // TinyVector<P_numtype1, N_length1> max long double |
---|
2126 | template<class P_numtype1, int N_length1> |
---|
2127 | inline |
---|
2128 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2129 | _bz_VecExprConstant<long double>, |
---|
2130 | _bz_Max<P_numtype1, long double > > > |
---|
2131 | max(const TinyVector<P_numtype1, N_length1>& d1, |
---|
2132 | long double d2) |
---|
2133 | { |
---|
2134 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2135 | _bz_VecExprConstant<long double>, |
---|
2136 | _bz_Max<P_numtype1, long double> > T_expr; |
---|
2137 | |
---|
2138 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
2139 | _bz_VecExprConstant<long double>(d2))); |
---|
2140 | } |
---|
2141 | #ifdef BZ_HAVE_COMPLEX |
---|
2142 | |
---|
2143 | // TinyVector<P_numtype1, N_length1> max complex<T2> |
---|
2144 | template<class P_numtype1, int N_length1, class T2> |
---|
2145 | inline |
---|
2146 | _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2147 | _bz_VecExprConstant<complex<T2> > , |
---|
2148 | _bz_Max<P_numtype1, complex<T2> > > > |
---|
2149 | max(const TinyVector<P_numtype1, N_length1>& d1, |
---|
2150 | complex<T2> d2) |
---|
2151 | { |
---|
2152 | typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, |
---|
2153 | _bz_VecExprConstant<complex<T2> > , |
---|
2154 | _bz_Max<P_numtype1, complex<T2> > > T_expr; |
---|
2155 | |
---|
2156 | return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), |
---|
2157 | _bz_VecExprConstant<complex<T2> > (d2))); |
---|
2158 | } |
---|
2159 | #endif // BZ_HAVE_COMPLEX |
---|
2160 | |
---|
2161 | |
---|
2162 | // int max Vector<P_numtype2> |
---|
2163 | template<class P_numtype2> |
---|
2164 | inline |
---|
2165 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
2166 | VectorIterConst<P_numtype2>, |
---|
2167 | _bz_Max<int, P_numtype2 > > > |
---|
2168 | max(int d1, |
---|
2169 | const Vector<P_numtype2>& d2) |
---|
2170 | { |
---|
2171 | typedef _bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
2172 | VectorIterConst<P_numtype2>, |
---|
2173 | _bz_Max<int, P_numtype2> > T_expr; |
---|
2174 | |
---|
2175 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), |
---|
2176 | d2.beginFast())); |
---|
2177 | } |
---|
2178 | |
---|
2179 | // int max _bz_VecExpr<P_expr2> |
---|
2180 | template<class P_expr2> |
---|
2181 | inline |
---|
2182 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
2183 | _bz_VecExpr<P_expr2>, |
---|
2184 | _bz_Max<int, typename P_expr2::T_numtype > > > |
---|
2185 | max(int d1, |
---|
2186 | _bz_VecExpr<P_expr2> d2) |
---|
2187 | { |
---|
2188 | typedef _bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
2189 | _bz_VecExpr<P_expr2>, |
---|
2190 | _bz_Max<int, typename P_expr2::T_numtype> > T_expr; |
---|
2191 | |
---|
2192 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), |
---|
2193 | d2)); |
---|
2194 | } |
---|
2195 | |
---|
2196 | // int max VectorPick<P_numtype2> |
---|
2197 | template<class P_numtype2> |
---|
2198 | inline |
---|
2199 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
2200 | VectorPickIterConst<P_numtype2>, |
---|
2201 | _bz_Max<int, P_numtype2 > > > |
---|
2202 | max(int d1, |
---|
2203 | const VectorPick<P_numtype2>& d2) |
---|
2204 | { |
---|
2205 | typedef _bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
2206 | VectorPickIterConst<P_numtype2>, |
---|
2207 | _bz_Max<int, P_numtype2> > T_expr; |
---|
2208 | |
---|
2209 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), |
---|
2210 | d2.beginFast())); |
---|
2211 | } |
---|
2212 | |
---|
2213 | // int max TinyVector<P_numtype2, N_length2> |
---|
2214 | template<class P_numtype2, int N_length2> |
---|
2215 | inline |
---|
2216 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
2217 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2218 | _bz_Max<int, P_numtype2 > > > |
---|
2219 | max(int d1, |
---|
2220 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
2221 | { |
---|
2222 | typedef _bz_VecExprOp<_bz_VecExprConstant<int>, |
---|
2223 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2224 | _bz_Max<int, P_numtype2> > T_expr; |
---|
2225 | |
---|
2226 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), |
---|
2227 | d2.beginFast())); |
---|
2228 | } |
---|
2229 | |
---|
2230 | // float max Vector<P_numtype2> |
---|
2231 | template<class P_numtype2> |
---|
2232 | inline |
---|
2233 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
2234 | VectorIterConst<P_numtype2>, |
---|
2235 | _bz_Max<float, P_numtype2 > > > |
---|
2236 | max(float d1, |
---|
2237 | const Vector<P_numtype2>& d2) |
---|
2238 | { |
---|
2239 | typedef _bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
2240 | VectorIterConst<P_numtype2>, |
---|
2241 | _bz_Max<float, P_numtype2> > T_expr; |
---|
2242 | |
---|
2243 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), |
---|
2244 | d2.beginFast())); |
---|
2245 | } |
---|
2246 | |
---|
2247 | // float max _bz_VecExpr<P_expr2> |
---|
2248 | template<class P_expr2> |
---|
2249 | inline |
---|
2250 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
2251 | _bz_VecExpr<P_expr2>, |
---|
2252 | _bz_Max<float, typename P_expr2::T_numtype > > > |
---|
2253 | max(float d1, |
---|
2254 | _bz_VecExpr<P_expr2> d2) |
---|
2255 | { |
---|
2256 | typedef _bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
2257 | _bz_VecExpr<P_expr2>, |
---|
2258 | _bz_Max<float, typename P_expr2::T_numtype> > T_expr; |
---|
2259 | |
---|
2260 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), |
---|
2261 | d2)); |
---|
2262 | } |
---|
2263 | |
---|
2264 | // float max VectorPick<P_numtype2> |
---|
2265 | template<class P_numtype2> |
---|
2266 | inline |
---|
2267 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
2268 | VectorPickIterConst<P_numtype2>, |
---|
2269 | _bz_Max<float, P_numtype2 > > > |
---|
2270 | max(float d1, |
---|
2271 | const VectorPick<P_numtype2>& d2) |
---|
2272 | { |
---|
2273 | typedef _bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
2274 | VectorPickIterConst<P_numtype2>, |
---|
2275 | _bz_Max<float, P_numtype2> > T_expr; |
---|
2276 | |
---|
2277 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), |
---|
2278 | d2.beginFast())); |
---|
2279 | } |
---|
2280 | |
---|
2281 | // float max Range |
---|
2282 | |
---|
2283 | inline |
---|
2284 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
2285 | Range, |
---|
2286 | _bz_Max<float, int > > > |
---|
2287 | max(float d1, |
---|
2288 | Range d2) |
---|
2289 | { |
---|
2290 | typedef _bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
2291 | Range, |
---|
2292 | _bz_Max<float, int> > T_expr; |
---|
2293 | |
---|
2294 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), |
---|
2295 | d2)); |
---|
2296 | } |
---|
2297 | |
---|
2298 | // float max TinyVector<P_numtype2, N_length2> |
---|
2299 | template<class P_numtype2, int N_length2> |
---|
2300 | inline |
---|
2301 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
2302 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2303 | _bz_Max<float, P_numtype2 > > > |
---|
2304 | max(float d1, |
---|
2305 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
2306 | { |
---|
2307 | typedef _bz_VecExprOp<_bz_VecExprConstant<float>, |
---|
2308 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2309 | _bz_Max<float, P_numtype2> > T_expr; |
---|
2310 | |
---|
2311 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), |
---|
2312 | d2.beginFast())); |
---|
2313 | } |
---|
2314 | |
---|
2315 | // double max Vector<P_numtype2> |
---|
2316 | template<class P_numtype2> |
---|
2317 | inline |
---|
2318 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
2319 | VectorIterConst<P_numtype2>, |
---|
2320 | _bz_Max<double, P_numtype2 > > > |
---|
2321 | max(double d1, |
---|
2322 | const Vector<P_numtype2>& d2) |
---|
2323 | { |
---|
2324 | typedef _bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
2325 | VectorIterConst<P_numtype2>, |
---|
2326 | _bz_Max<double, P_numtype2> > T_expr; |
---|
2327 | |
---|
2328 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), |
---|
2329 | d2.beginFast())); |
---|
2330 | } |
---|
2331 | |
---|
2332 | // double max _bz_VecExpr<P_expr2> |
---|
2333 | template<class P_expr2> |
---|
2334 | inline |
---|
2335 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
2336 | _bz_VecExpr<P_expr2>, |
---|
2337 | _bz_Max<double, typename P_expr2::T_numtype > > > |
---|
2338 | max(double d1, |
---|
2339 | _bz_VecExpr<P_expr2> d2) |
---|
2340 | { |
---|
2341 | typedef _bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
2342 | _bz_VecExpr<P_expr2>, |
---|
2343 | _bz_Max<double, typename P_expr2::T_numtype> > T_expr; |
---|
2344 | |
---|
2345 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), |
---|
2346 | d2)); |
---|
2347 | } |
---|
2348 | |
---|
2349 | // double max VectorPick<P_numtype2> |
---|
2350 | template<class P_numtype2> |
---|
2351 | inline |
---|
2352 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
2353 | VectorPickIterConst<P_numtype2>, |
---|
2354 | _bz_Max<double, P_numtype2 > > > |
---|
2355 | max(double d1, |
---|
2356 | const VectorPick<P_numtype2>& d2) |
---|
2357 | { |
---|
2358 | typedef _bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
2359 | VectorPickIterConst<P_numtype2>, |
---|
2360 | _bz_Max<double, P_numtype2> > T_expr; |
---|
2361 | |
---|
2362 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), |
---|
2363 | d2.beginFast())); |
---|
2364 | } |
---|
2365 | |
---|
2366 | // double max Range |
---|
2367 | |
---|
2368 | inline |
---|
2369 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
2370 | Range, |
---|
2371 | _bz_Max<double, int > > > |
---|
2372 | max(double d1, |
---|
2373 | Range d2) |
---|
2374 | { |
---|
2375 | typedef _bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
2376 | Range, |
---|
2377 | _bz_Max<double, int> > T_expr; |
---|
2378 | |
---|
2379 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), |
---|
2380 | d2)); |
---|
2381 | } |
---|
2382 | |
---|
2383 | // double max TinyVector<P_numtype2, N_length2> |
---|
2384 | template<class P_numtype2, int N_length2> |
---|
2385 | inline |
---|
2386 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
2387 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2388 | _bz_Max<double, P_numtype2 > > > |
---|
2389 | max(double d1, |
---|
2390 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
2391 | { |
---|
2392 | typedef _bz_VecExprOp<_bz_VecExprConstant<double>, |
---|
2393 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2394 | _bz_Max<double, P_numtype2> > T_expr; |
---|
2395 | |
---|
2396 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), |
---|
2397 | d2.beginFast())); |
---|
2398 | } |
---|
2399 | |
---|
2400 | // long double max Vector<P_numtype2> |
---|
2401 | template<class P_numtype2> |
---|
2402 | inline |
---|
2403 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
2404 | VectorIterConst<P_numtype2>, |
---|
2405 | _bz_Max<long double, P_numtype2 > > > |
---|
2406 | max(long double d1, |
---|
2407 | const Vector<P_numtype2>& d2) |
---|
2408 | { |
---|
2409 | typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
2410 | VectorIterConst<P_numtype2>, |
---|
2411 | _bz_Max<long double, P_numtype2> > T_expr; |
---|
2412 | |
---|
2413 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), |
---|
2414 | d2.beginFast())); |
---|
2415 | } |
---|
2416 | |
---|
2417 | // long double max _bz_VecExpr<P_expr2> |
---|
2418 | template<class P_expr2> |
---|
2419 | inline |
---|
2420 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
2421 | _bz_VecExpr<P_expr2>, |
---|
2422 | _bz_Max<long double, typename P_expr2::T_numtype > > > |
---|
2423 | max(long double d1, |
---|
2424 | _bz_VecExpr<P_expr2> d2) |
---|
2425 | { |
---|
2426 | typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
2427 | _bz_VecExpr<P_expr2>, |
---|
2428 | _bz_Max<long double, typename P_expr2::T_numtype> > T_expr; |
---|
2429 | |
---|
2430 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), |
---|
2431 | d2)); |
---|
2432 | } |
---|
2433 | |
---|
2434 | // long double max VectorPick<P_numtype2> |
---|
2435 | template<class P_numtype2> |
---|
2436 | inline |
---|
2437 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
2438 | VectorPickIterConst<P_numtype2>, |
---|
2439 | _bz_Max<long double, P_numtype2 > > > |
---|
2440 | max(long double d1, |
---|
2441 | const VectorPick<P_numtype2>& d2) |
---|
2442 | { |
---|
2443 | typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
2444 | VectorPickIterConst<P_numtype2>, |
---|
2445 | _bz_Max<long double, P_numtype2> > T_expr; |
---|
2446 | |
---|
2447 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), |
---|
2448 | d2.beginFast())); |
---|
2449 | } |
---|
2450 | |
---|
2451 | // long double max Range |
---|
2452 | |
---|
2453 | inline |
---|
2454 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
2455 | Range, |
---|
2456 | _bz_Max<long double, int > > > |
---|
2457 | max(long double d1, |
---|
2458 | Range d2) |
---|
2459 | { |
---|
2460 | typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
2461 | Range, |
---|
2462 | _bz_Max<long double, int> > T_expr; |
---|
2463 | |
---|
2464 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), |
---|
2465 | d2)); |
---|
2466 | } |
---|
2467 | |
---|
2468 | // long double max TinyVector<P_numtype2, N_length2> |
---|
2469 | template<class P_numtype2, int N_length2> |
---|
2470 | inline |
---|
2471 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
2472 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2473 | _bz_Max<long double, P_numtype2 > > > |
---|
2474 | max(long double d1, |
---|
2475 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
2476 | { |
---|
2477 | typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, |
---|
2478 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2479 | _bz_Max<long double, P_numtype2> > T_expr; |
---|
2480 | |
---|
2481 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), |
---|
2482 | d2.beginFast())); |
---|
2483 | } |
---|
2484 | #ifdef BZ_HAVE_COMPLEX |
---|
2485 | |
---|
2486 | // complex<T1> max Vector<P_numtype2> |
---|
2487 | template<class T1, class P_numtype2> |
---|
2488 | inline |
---|
2489 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
2490 | VectorIterConst<P_numtype2>, |
---|
2491 | _bz_Max<complex<T1> , P_numtype2 > > > |
---|
2492 | max(complex<T1> d1, |
---|
2493 | const Vector<P_numtype2>& d2) |
---|
2494 | { |
---|
2495 | typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
2496 | VectorIterConst<P_numtype2>, |
---|
2497 | _bz_Max<complex<T1> , P_numtype2> > T_expr; |
---|
2498 | |
---|
2499 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1), |
---|
2500 | d2.beginFast())); |
---|
2501 | } |
---|
2502 | #endif // BZ_HAVE_COMPLEX |
---|
2503 | |
---|
2504 | #ifdef BZ_HAVE_COMPLEX |
---|
2505 | |
---|
2506 | // complex<T1> max _bz_VecExpr<P_expr2> |
---|
2507 | template<class T1, class P_expr2> |
---|
2508 | inline |
---|
2509 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
2510 | _bz_VecExpr<P_expr2>, |
---|
2511 | _bz_Max<complex<T1> , typename P_expr2::T_numtype > > > |
---|
2512 | max(complex<T1> d1, |
---|
2513 | _bz_VecExpr<P_expr2> d2) |
---|
2514 | { |
---|
2515 | typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
2516 | _bz_VecExpr<P_expr2>, |
---|
2517 | _bz_Max<complex<T1> , typename P_expr2::T_numtype> > T_expr; |
---|
2518 | |
---|
2519 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1), |
---|
2520 | d2)); |
---|
2521 | } |
---|
2522 | #endif // BZ_HAVE_COMPLEX |
---|
2523 | |
---|
2524 | #ifdef BZ_HAVE_COMPLEX |
---|
2525 | |
---|
2526 | // complex<T1> max VectorPick<P_numtype2> |
---|
2527 | template<class T1, class P_numtype2> |
---|
2528 | inline |
---|
2529 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
2530 | VectorPickIterConst<P_numtype2>, |
---|
2531 | _bz_Max<complex<T1> , P_numtype2 > > > |
---|
2532 | max(complex<T1> d1, |
---|
2533 | const VectorPick<P_numtype2>& d2) |
---|
2534 | { |
---|
2535 | typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
2536 | VectorPickIterConst<P_numtype2>, |
---|
2537 | _bz_Max<complex<T1> , P_numtype2> > T_expr; |
---|
2538 | |
---|
2539 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1), |
---|
2540 | d2.beginFast())); |
---|
2541 | } |
---|
2542 | #endif // BZ_HAVE_COMPLEX |
---|
2543 | |
---|
2544 | #ifdef BZ_HAVE_COMPLEX |
---|
2545 | |
---|
2546 | // complex<T1> max Range |
---|
2547 | template<class T1> |
---|
2548 | inline |
---|
2549 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
2550 | Range, |
---|
2551 | _bz_Max<complex<T1> , int > > > |
---|
2552 | max(complex<T1> d1, |
---|
2553 | Range d2) |
---|
2554 | { |
---|
2555 | typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
2556 | Range, |
---|
2557 | _bz_Max<complex<T1> , int> > T_expr; |
---|
2558 | |
---|
2559 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1), |
---|
2560 | d2)); |
---|
2561 | } |
---|
2562 | #endif // BZ_HAVE_COMPLEX |
---|
2563 | |
---|
2564 | #ifdef BZ_HAVE_COMPLEX |
---|
2565 | |
---|
2566 | // complex<T1> max TinyVector<P_numtype2, N_length2> |
---|
2567 | template<class T1, class P_numtype2, int N_length2> |
---|
2568 | inline |
---|
2569 | _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
2570 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2571 | _bz_Max<complex<T1> , P_numtype2 > > > |
---|
2572 | max(complex<T1> d1, |
---|
2573 | const TinyVector<P_numtype2, N_length2>& d2) |
---|
2574 | { |
---|
2575 | typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , |
---|
2576 | TinyVectorIterConst<P_numtype2, N_length2>, |
---|
2577 | _bz_Max<complex<T1> , P_numtype2> > T_expr; |
---|
2578 | |
---|
2579 | return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1), |
---|
2580 | d2.beginFast())); |
---|
2581 | } |
---|
2582 | #endif // BZ_HAVE_COMPLEX |
---|
2583 | |
---|
2584 | BZ_NAMESPACE_END |
---|
2585 | |
---|
2586 | #endif |
---|