source: XMLIO_V2/external/include/blitz/vecbfn.cc @ 73

Last change on this file since 73 was 73, checked in by ymipsl, 14 years ago
File size: 74.4 KB
Line 
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
34BZ_NAMESPACE(blitz)
35
36/****************************************************************************
37 * Minimum Operators
38 ****************************************************************************/
39
40// Vector<P_numtype1> min Vector<P_numtype2>
41template<class P_numtype1, class P_numtype2>
42inline
43_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
44      VectorIterConst<P_numtype2>,
45      _bz_Min<P_numtype1, P_numtype2 > > >
46min(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>
58template<class P_numtype1, class P_expr2>
59inline
60_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
61      _bz_VecExpr<P_expr2>,
62      _bz_Min<P_numtype1, typename P_expr2::T_numtype > > >
63min(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>
75template<class P_numtype1, class P_numtype2>
76inline
77_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
78      VectorPickIterConst<P_numtype2>,
79      _bz_Min<P_numtype1, P_numtype2 > > >
80min(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
92template<class P_numtype1>
93inline
94_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
95      Range,
96      _bz_Min<P_numtype1, int > > >
97min(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>
109template<class P_numtype1, class P_numtype2, int N_length2>
110inline
111_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
112      TinyVectorIterConst<P_numtype2, N_length2>,
113      _bz_Min<P_numtype1, P_numtype2 > > >
114min(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
126template<class P_numtype1>
127inline
128_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
129      _bz_VecExprConstant<int>,
130      _bz_Min<P_numtype1, int > > >
131min(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
143template<class P_numtype1>
144inline
145_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
146      _bz_VecExprConstant<float>,
147      _bz_Min<P_numtype1, float > > >
148min(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
160template<class P_numtype1>
161inline
162_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
163      _bz_VecExprConstant<double>,
164      _bz_Min<P_numtype1, double > > >
165min(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
177template<class P_numtype1>
178inline
179_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
180      _bz_VecExprConstant<long double>,
181      _bz_Min<P_numtype1, long double > > >
182min(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>
195template<class P_numtype1, class T2>
196inline
197_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
198      _bz_VecExprConstant<complex<T2> > ,
199      _bz_Min<P_numtype1, complex<T2>  > > >
200min(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>
214template<class P_expr1, class P_numtype2>
215inline
216_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
217      VectorIterConst<P_numtype2>,
218      _bz_Min<typename P_expr1::T_numtype, P_numtype2 > > >
219min(_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>
231template<class P_expr1, class P_expr2>
232inline
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 > > >
236min(_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>
248template<class P_expr1, class P_numtype2>
249inline
250_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
251      VectorPickIterConst<P_numtype2>,
252      _bz_Min<typename P_expr1::T_numtype, P_numtype2 > > >
253min(_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
265template<class P_expr1>
266inline
267_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
268      Range,
269      _bz_Min<typename P_expr1::T_numtype, int > > >
270min(_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>
282template<class P_expr1, class P_numtype2, int N_length2>
283inline
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 > > >
287min(_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
299template<class P_expr1>
300inline
301_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
302      _bz_VecExprConstant<int>,
303      _bz_Min<typename P_expr1::T_numtype, int > > >
304min(_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
316template<class P_expr1>
317inline
318_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
319      _bz_VecExprConstant<float>,
320      _bz_Min<typename P_expr1::T_numtype, float > > >
321min(_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
333template<class P_expr1>
334inline
335_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
336      _bz_VecExprConstant<double>,
337      _bz_Min<typename P_expr1::T_numtype, double > > >
338min(_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
350template<class P_expr1>
351inline
352_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
353      _bz_VecExprConstant<long double>,
354      _bz_Min<typename P_expr1::T_numtype, long double > > >
355min(_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>
368template<class P_expr1, class T2>
369inline
370_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
371      _bz_VecExprConstant<complex<T2> > ,
372      _bz_Min<typename P_expr1::T_numtype, complex<T2>  > > >
373min(_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>
387template<class P_numtype1, class P_numtype2>
388inline
389_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
390      VectorIterConst<P_numtype2>,
391      _bz_Min<P_numtype1, P_numtype2 > > >
392min(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>
404template<class P_numtype1, class P_expr2>
405inline
406_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
407      _bz_VecExpr<P_expr2>,
408      _bz_Min<P_numtype1, typename P_expr2::T_numtype > > >
409min(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>
421template<class P_numtype1, class P_numtype2>
422inline
423_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
424      VectorPickIterConst<P_numtype2>,
425      _bz_Min<P_numtype1, P_numtype2 > > >
426min(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
438template<class P_numtype1>
439inline
440_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
441      Range,
442      _bz_Min<P_numtype1, int > > >
443min(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>
455template<class P_numtype1, class P_numtype2, int N_length2>
456inline
457_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
458      TinyVectorIterConst<P_numtype2, N_length2>,
459      _bz_Min<P_numtype1, P_numtype2 > > >
460min(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
472template<class P_numtype1>
473inline
474_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
475      _bz_VecExprConstant<int>,
476      _bz_Min<P_numtype1, int > > >
477min(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
489template<class P_numtype1>
490inline
491_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
492      _bz_VecExprConstant<float>,
493      _bz_Min<P_numtype1, float > > >
494min(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
506template<class P_numtype1>
507inline
508_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
509      _bz_VecExprConstant<double>,
510      _bz_Min<P_numtype1, double > > >
511min(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
523template<class P_numtype1>
524inline
525_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
526      _bz_VecExprConstant<long double>,
527      _bz_Min<P_numtype1, long double > > >
528min(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>
541template<class P_numtype1, class T2>
542inline
543_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
544      _bz_VecExprConstant<complex<T2> > ,
545      _bz_Min<P_numtype1, complex<T2>  > > >
546min(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>
560template<class P_numtype2>
561inline
562_bz_VecExpr<_bz_VecExprOp<Range, 
563      VectorIterConst<P_numtype2>,
564      _bz_Min<int, P_numtype2 > > >
565min(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>
577template<class P_expr2>
578inline
579_bz_VecExpr<_bz_VecExprOp<Range, 
580      _bz_VecExpr<P_expr2>,
581      _bz_Min<int, typename P_expr2::T_numtype > > >
582min(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>
594template<class P_numtype2>
595inline
596_bz_VecExpr<_bz_VecExprOp<Range, 
597      VectorPickIterConst<P_numtype2>,
598      _bz_Min<int, P_numtype2 > > >
599min(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
612inline
613_bz_VecExpr<_bz_VecExprOp<Range, 
614      Range,
615      _bz_Min<int, int > > >
616min(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>
628template<class P_numtype2, int N_length2>
629inline
630_bz_VecExpr<_bz_VecExprOp<Range, 
631      TinyVectorIterConst<P_numtype2, N_length2>,
632      _bz_Min<int, P_numtype2 > > >
633min(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
646inline
647_bz_VecExpr<_bz_VecExprOp<Range, 
648      _bz_VecExprConstant<float>,
649      _bz_Min<int, float > > >
650min(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
663inline
664_bz_VecExpr<_bz_VecExprOp<Range, 
665      _bz_VecExprConstant<double>,
666      _bz_Min<int, double > > >
667min(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
680inline
681_bz_VecExpr<_bz_VecExprOp<Range, 
682      _bz_VecExprConstant<long double>,
683      _bz_Min<int, long double > > >
684min(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>
697template<class T2>
698inline
699_bz_VecExpr<_bz_VecExprOp<Range, 
700      _bz_VecExprConstant<complex<T2> > ,
701      _bz_Min<int, complex<T2>  > > >
702min(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>
716template<class P_numtype1, int N_length1, class P_numtype2>
717inline
718_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
719      VectorIterConst<P_numtype2>,
720      _bz_Min<P_numtype1, P_numtype2 > > >
721min(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>
733template<class P_numtype1, int N_length1, class P_expr2>
734inline
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 > > >
738min(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>
750template<class P_numtype1, int N_length1, class P_numtype2>
751inline
752_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
753      VectorPickIterConst<P_numtype2>,
754      _bz_Min<P_numtype1, P_numtype2 > > >
755min(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
767template<class P_numtype1, int N_length1>
768inline
769_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
770      Range,
771      _bz_Min<P_numtype1, int > > >
772min(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>
784template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
785inline
786_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
787      TinyVectorIterConst<P_numtype2, N_length2>,
788      _bz_Min<P_numtype1, P_numtype2 > > >
789min(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
801template<class P_numtype1, int N_length1>
802inline
803_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
804      _bz_VecExprConstant<int>,
805      _bz_Min<P_numtype1, int > > >
806min(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
818template<class P_numtype1, int N_length1>
819inline
820_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
821      _bz_VecExprConstant<float>,
822      _bz_Min<P_numtype1, float > > >
823min(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
835template<class P_numtype1, int N_length1>
836inline
837_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
838      _bz_VecExprConstant<double>,
839      _bz_Min<P_numtype1, double > > >
840min(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
852template<class P_numtype1, int N_length1>
853inline
854_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
855      _bz_VecExprConstant<long double>,
856      _bz_Min<P_numtype1, long double > > >
857min(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>
870template<class P_numtype1, int N_length1, class T2>
871inline
872_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
873      _bz_VecExprConstant<complex<T2> > ,
874      _bz_Min<P_numtype1, complex<T2>  > > >
875min(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>
889template<class P_numtype2>
890inline
891_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, 
892      VectorIterConst<P_numtype2>,
893      _bz_Min<int, P_numtype2 > > >
894min(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>
906template<class P_expr2>
907inline
908_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, 
909      _bz_VecExpr<P_expr2>,
910      _bz_Min<int, typename P_expr2::T_numtype > > >
911min(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>
923template<class P_numtype2>
924inline
925_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, 
926      VectorPickIterConst<P_numtype2>,
927      _bz_Min<int, P_numtype2 > > >
928min(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>
940template<class P_numtype2, int N_length2>
941inline
942_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, 
943      TinyVectorIterConst<P_numtype2, N_length2>,
944      _bz_Min<int, P_numtype2 > > >
945min(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>
957template<class P_numtype2>
958inline
959_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, 
960      VectorIterConst<P_numtype2>,
961      _bz_Min<float, P_numtype2 > > >
962min(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>
974template<class P_expr2>
975inline
976_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, 
977      _bz_VecExpr<P_expr2>,
978      _bz_Min<float, typename P_expr2::T_numtype > > >
979min(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>
991template<class P_numtype2>
992inline
993_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, 
994      VectorPickIterConst<P_numtype2>,
995      _bz_Min<float, P_numtype2 > > >
996min(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
1009inline
1010_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, 
1011      Range,
1012      _bz_Min<float, int > > >
1013min(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>
1025template<class P_numtype2, int N_length2>
1026inline
1027_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, 
1028      TinyVectorIterConst<P_numtype2, N_length2>,
1029      _bz_Min<float, P_numtype2 > > >
1030min(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>
1042template<class P_numtype2>
1043inline
1044_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, 
1045      VectorIterConst<P_numtype2>,
1046      _bz_Min<double, P_numtype2 > > >
1047min(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>
1059template<class P_expr2>
1060inline
1061_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, 
1062      _bz_VecExpr<P_expr2>,
1063      _bz_Min<double, typename P_expr2::T_numtype > > >
1064min(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>
1076template<class P_numtype2>
1077inline
1078_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, 
1079      VectorPickIterConst<P_numtype2>,
1080      _bz_Min<double, P_numtype2 > > >
1081min(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
1094inline
1095_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, 
1096      Range,
1097      _bz_Min<double, int > > >
1098min(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>
1110template<class P_numtype2, int N_length2>
1111inline
1112_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, 
1113      TinyVectorIterConst<P_numtype2, N_length2>,
1114      _bz_Min<double, P_numtype2 > > >
1115min(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>
1127template<class P_numtype2>
1128inline
1129_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, 
1130      VectorIterConst<P_numtype2>,
1131      _bz_Min<long double, P_numtype2 > > >
1132min(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>
1144template<class P_expr2>
1145inline
1146_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, 
1147      _bz_VecExpr<P_expr2>,
1148      _bz_Min<long double, typename P_expr2::T_numtype > > >
1149min(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>
1161template<class P_numtype2>
1162inline
1163_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, 
1164      VectorPickIterConst<P_numtype2>,
1165      _bz_Min<long double, P_numtype2 > > >
1166min(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
1179inline
1180_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, 
1181      Range,
1182      _bz_Min<long double, int > > >
1183min(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>
1195template<class P_numtype2, int N_length2>
1196inline
1197_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, 
1198      TinyVectorIterConst<P_numtype2, N_length2>,
1199      _bz_Min<long double, P_numtype2 > > >
1200min(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>
1213template<class T1, class P_numtype2>
1214inline
1215_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , 
1216      VectorIterConst<P_numtype2>,
1217      _bz_Min<complex<T1> , P_numtype2 > > >
1218min(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>
1233template<class T1, class P_expr2>
1234inline
1235_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , 
1236      _bz_VecExpr<P_expr2>,
1237      _bz_Min<complex<T1> , typename P_expr2::T_numtype > > >
1238min(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>
1253template<class T1, class P_numtype2>
1254inline
1255_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , 
1256      VectorPickIterConst<P_numtype2>,
1257      _bz_Min<complex<T1> , P_numtype2 > > >
1258min(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
1273template<class T1>
1274inline
1275_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , 
1276      Range,
1277      _bz_Min<complex<T1> , int > > >
1278min(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>
1293template<class T1, class P_numtype2, int N_length2>
1294inline
1295_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , 
1296      TinyVectorIterConst<P_numtype2, N_length2>,
1297      _bz_Min<complex<T1> , P_numtype2 > > >
1298min(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>
1315template<class P_numtype1, class P_numtype2>
1316inline
1317_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
1318      VectorIterConst<P_numtype2>,
1319      _bz_Max<P_numtype1, P_numtype2 > > >
1320max(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>
1332template<class P_numtype1, class P_expr2>
1333inline
1334_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
1335      _bz_VecExpr<P_expr2>,
1336      _bz_Max<P_numtype1, typename P_expr2::T_numtype > > >
1337max(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>
1349template<class P_numtype1, class P_numtype2>
1350inline
1351_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
1352      VectorPickIterConst<P_numtype2>,
1353      _bz_Max<P_numtype1, P_numtype2 > > >
1354max(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
1366template<class P_numtype1>
1367inline
1368_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
1369      Range,
1370      _bz_Max<P_numtype1, int > > >
1371max(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>
1383template<class P_numtype1, class P_numtype2, int N_length2>
1384inline
1385_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
1386      TinyVectorIterConst<P_numtype2, N_length2>,
1387      _bz_Max<P_numtype1, P_numtype2 > > >
1388max(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
1400template<class P_numtype1>
1401inline
1402_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
1403      _bz_VecExprConstant<int>,
1404      _bz_Max<P_numtype1, int > > >
1405max(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
1417template<class P_numtype1>
1418inline
1419_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
1420      _bz_VecExprConstant<float>,
1421      _bz_Max<P_numtype1, float > > >
1422max(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
1434template<class P_numtype1>
1435inline
1436_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
1437      _bz_VecExprConstant<double>,
1438      _bz_Max<P_numtype1, double > > >
1439max(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
1451template<class P_numtype1>
1452inline
1453_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
1454      _bz_VecExprConstant<long double>,
1455      _bz_Max<P_numtype1, long double > > >
1456max(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>
1469template<class P_numtype1, class T2>
1470inline
1471_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, 
1472      _bz_VecExprConstant<complex<T2> > ,
1473      _bz_Max<P_numtype1, complex<T2>  > > >
1474max(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>
1488template<class P_expr1, class P_numtype2>
1489inline
1490_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
1491      VectorIterConst<P_numtype2>,
1492      _bz_Max<typename P_expr1::T_numtype, P_numtype2 > > >
1493max(_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>
1505template<class P_expr1, class P_expr2>
1506inline
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 > > >
1510max(_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>
1522template<class P_expr1, class P_numtype2>
1523inline
1524_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
1525      VectorPickIterConst<P_numtype2>,
1526      _bz_Max<typename P_expr1::T_numtype, P_numtype2 > > >
1527max(_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
1539template<class P_expr1>
1540inline
1541_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
1542      Range,
1543      _bz_Max<typename P_expr1::T_numtype, int > > >
1544max(_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>
1556template<class P_expr1, class P_numtype2, int N_length2>
1557inline
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 > > >
1561max(_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
1573template<class P_expr1>
1574inline
1575_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
1576      _bz_VecExprConstant<int>,
1577      _bz_Max<typename P_expr1::T_numtype, int > > >
1578max(_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
1590template<class P_expr1>
1591inline
1592_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
1593      _bz_VecExprConstant<float>,
1594      _bz_Max<typename P_expr1::T_numtype, float > > >
1595max(_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
1607template<class P_expr1>
1608inline
1609_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
1610      _bz_VecExprConstant<double>,
1611      _bz_Max<typename P_expr1::T_numtype, double > > >
1612max(_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
1624template<class P_expr1>
1625inline
1626_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
1627      _bz_VecExprConstant<long double>,
1628      _bz_Max<typename P_expr1::T_numtype, long double > > >
1629max(_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>
1642template<class P_expr1, class T2>
1643inline
1644_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, 
1645      _bz_VecExprConstant<complex<T2> > ,
1646      _bz_Max<typename P_expr1::T_numtype, complex<T2>  > > >
1647max(_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>
1661template<class P_numtype1, class P_numtype2>
1662inline
1663_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
1664      VectorIterConst<P_numtype2>,
1665      _bz_Max<P_numtype1, P_numtype2 > > >
1666max(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>
1678template<class P_numtype1, class P_expr2>
1679inline
1680_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
1681      _bz_VecExpr<P_expr2>,
1682      _bz_Max<P_numtype1, typename P_expr2::T_numtype > > >
1683max(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>
1695template<class P_numtype1, class P_numtype2>
1696inline
1697_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
1698      VectorPickIterConst<P_numtype2>,
1699      _bz_Max<P_numtype1, P_numtype2 > > >
1700max(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
1712template<class P_numtype1>
1713inline
1714_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
1715      Range,
1716      _bz_Max<P_numtype1, int > > >
1717max(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>
1729template<class P_numtype1, class P_numtype2, int N_length2>
1730inline
1731_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
1732      TinyVectorIterConst<P_numtype2, N_length2>,
1733      _bz_Max<P_numtype1, P_numtype2 > > >
1734max(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
1746template<class P_numtype1>
1747inline
1748_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
1749      _bz_VecExprConstant<int>,
1750      _bz_Max<P_numtype1, int > > >
1751max(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
1763template<class P_numtype1>
1764inline
1765_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
1766      _bz_VecExprConstant<float>,
1767      _bz_Max<P_numtype1, float > > >
1768max(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
1780template<class P_numtype1>
1781inline
1782_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
1783      _bz_VecExprConstant<double>,
1784      _bz_Max<P_numtype1, double > > >
1785max(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
1797template<class P_numtype1>
1798inline
1799_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
1800      _bz_VecExprConstant<long double>,
1801      _bz_Max<P_numtype1, long double > > >
1802max(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>
1815template<class P_numtype1, class T2>
1816inline
1817_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, 
1818      _bz_VecExprConstant<complex<T2> > ,
1819      _bz_Max<P_numtype1, complex<T2>  > > >
1820max(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>
1834template<class P_numtype2>
1835inline
1836_bz_VecExpr<_bz_VecExprOp<Range, 
1837      VectorIterConst<P_numtype2>,
1838      _bz_Max<int, P_numtype2 > > >
1839max(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>
1851template<class P_expr2>
1852inline
1853_bz_VecExpr<_bz_VecExprOp<Range, 
1854      _bz_VecExpr<P_expr2>,
1855      _bz_Max<int, typename P_expr2::T_numtype > > >
1856max(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>
1868template<class P_numtype2>
1869inline
1870_bz_VecExpr<_bz_VecExprOp<Range, 
1871      VectorPickIterConst<P_numtype2>,
1872      _bz_Max<int, P_numtype2 > > >
1873max(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
1886inline
1887_bz_VecExpr<_bz_VecExprOp<Range, 
1888      Range,
1889      _bz_Max<int, int > > >
1890max(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>
1902template<class P_numtype2, int N_length2>
1903inline
1904_bz_VecExpr<_bz_VecExprOp<Range, 
1905      TinyVectorIterConst<P_numtype2, N_length2>,
1906      _bz_Max<int, P_numtype2 > > >
1907max(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
1920inline
1921_bz_VecExpr<_bz_VecExprOp<Range, 
1922      _bz_VecExprConstant<float>,
1923      _bz_Max<int, float > > >
1924max(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
1937inline
1938_bz_VecExpr<_bz_VecExprOp<Range, 
1939      _bz_VecExprConstant<double>,
1940      _bz_Max<int, double > > >
1941max(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
1954inline
1955_bz_VecExpr<_bz_VecExprOp<Range, 
1956      _bz_VecExprConstant<long double>,
1957      _bz_Max<int, long double > > >
1958max(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>
1971template<class T2>
1972inline
1973_bz_VecExpr<_bz_VecExprOp<Range, 
1974      _bz_VecExprConstant<complex<T2> > ,
1975      _bz_Max<int, complex<T2>  > > >
1976max(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>
1990template<class P_numtype1, int N_length1, class P_numtype2>
1991inline
1992_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
1993      VectorIterConst<P_numtype2>,
1994      _bz_Max<P_numtype1, P_numtype2 > > >
1995max(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>
2007template<class P_numtype1, int N_length1, class P_expr2>
2008inline
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 > > >
2012max(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>
2024template<class P_numtype1, int N_length1, class P_numtype2>
2025inline
2026_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
2027      VectorPickIterConst<P_numtype2>,
2028      _bz_Max<P_numtype1, P_numtype2 > > >
2029max(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
2041template<class P_numtype1, int N_length1>
2042inline
2043_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
2044      Range,
2045      _bz_Max<P_numtype1, int > > >
2046max(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>
2058template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
2059inline
2060_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
2061      TinyVectorIterConst<P_numtype2, N_length2>,
2062      _bz_Max<P_numtype1, P_numtype2 > > >
2063max(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
2075template<class P_numtype1, int N_length1>
2076inline
2077_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
2078      _bz_VecExprConstant<int>,
2079      _bz_Max<P_numtype1, int > > >
2080max(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
2092template<class P_numtype1, int N_length1>
2093inline
2094_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
2095      _bz_VecExprConstant<float>,
2096      _bz_Max<P_numtype1, float > > >
2097max(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
2109template<class P_numtype1, int N_length1>
2110inline
2111_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
2112      _bz_VecExprConstant<double>,
2113      _bz_Max<P_numtype1, double > > >
2114max(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
2126template<class P_numtype1, int N_length1>
2127inline
2128_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
2129      _bz_VecExprConstant<long double>,
2130      _bz_Max<P_numtype1, long double > > >
2131max(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>
2144template<class P_numtype1, int N_length1, class T2>
2145inline
2146_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, 
2147      _bz_VecExprConstant<complex<T2> > ,
2148      _bz_Max<P_numtype1, complex<T2>  > > >
2149max(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>
2163template<class P_numtype2>
2164inline
2165_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, 
2166      VectorIterConst<P_numtype2>,
2167      _bz_Max<int, P_numtype2 > > >
2168max(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>
2180template<class P_expr2>
2181inline
2182_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, 
2183      _bz_VecExpr<P_expr2>,
2184      _bz_Max<int, typename P_expr2::T_numtype > > >
2185max(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>
2197template<class P_numtype2>
2198inline
2199_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, 
2200      VectorPickIterConst<P_numtype2>,
2201      _bz_Max<int, P_numtype2 > > >
2202max(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>
2214template<class P_numtype2, int N_length2>
2215inline
2216_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, 
2217      TinyVectorIterConst<P_numtype2, N_length2>,
2218      _bz_Max<int, P_numtype2 > > >
2219max(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>
2231template<class P_numtype2>
2232inline
2233_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, 
2234      VectorIterConst<P_numtype2>,
2235      _bz_Max<float, P_numtype2 > > >
2236max(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>
2248template<class P_expr2>
2249inline
2250_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, 
2251      _bz_VecExpr<P_expr2>,
2252      _bz_Max<float, typename P_expr2::T_numtype > > >
2253max(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>
2265template<class P_numtype2>
2266inline
2267_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, 
2268      VectorPickIterConst<P_numtype2>,
2269      _bz_Max<float, P_numtype2 > > >
2270max(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
2283inline
2284_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, 
2285      Range,
2286      _bz_Max<float, int > > >
2287max(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>
2299template<class P_numtype2, int N_length2>
2300inline
2301_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, 
2302      TinyVectorIterConst<P_numtype2, N_length2>,
2303      _bz_Max<float, P_numtype2 > > >
2304max(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>
2316template<class P_numtype2>
2317inline
2318_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, 
2319      VectorIterConst<P_numtype2>,
2320      _bz_Max<double, P_numtype2 > > >
2321max(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>
2333template<class P_expr2>
2334inline
2335_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, 
2336      _bz_VecExpr<P_expr2>,
2337      _bz_Max<double, typename P_expr2::T_numtype > > >
2338max(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>
2350template<class P_numtype2>
2351inline
2352_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, 
2353      VectorPickIterConst<P_numtype2>,
2354      _bz_Max<double, P_numtype2 > > >
2355max(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
2368inline
2369_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, 
2370      Range,
2371      _bz_Max<double, int > > >
2372max(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>
2384template<class P_numtype2, int N_length2>
2385inline
2386_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, 
2387      TinyVectorIterConst<P_numtype2, N_length2>,
2388      _bz_Max<double, P_numtype2 > > >
2389max(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>
2401template<class P_numtype2>
2402inline
2403_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, 
2404      VectorIterConst<P_numtype2>,
2405      _bz_Max<long double, P_numtype2 > > >
2406max(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>
2418template<class P_expr2>
2419inline
2420_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, 
2421      _bz_VecExpr<P_expr2>,
2422      _bz_Max<long double, typename P_expr2::T_numtype > > >
2423max(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>
2435template<class P_numtype2>
2436inline
2437_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, 
2438      VectorPickIterConst<P_numtype2>,
2439      _bz_Max<long double, P_numtype2 > > >
2440max(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
2453inline
2454_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, 
2455      Range,
2456      _bz_Max<long double, int > > >
2457max(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>
2469template<class P_numtype2, int N_length2>
2470inline
2471_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, 
2472      TinyVectorIterConst<P_numtype2, N_length2>,
2473      _bz_Max<long double, P_numtype2 > > >
2474max(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>
2487template<class T1, class P_numtype2>
2488inline
2489_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , 
2490      VectorIterConst<P_numtype2>,
2491      _bz_Max<complex<T1> , P_numtype2 > > >
2492max(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>
2507template<class T1, class P_expr2>
2508inline
2509_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , 
2510      _bz_VecExpr<P_expr2>,
2511      _bz_Max<complex<T1> , typename P_expr2::T_numtype > > >
2512max(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>
2527template<class T1, class P_numtype2>
2528inline
2529_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , 
2530      VectorPickIterConst<P_numtype2>,
2531      _bz_Max<complex<T1> , P_numtype2 > > >
2532max(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
2547template<class T1>
2548inline
2549_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , 
2550      Range,
2551      _bz_Max<complex<T1> , int > > >
2552max(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>
2567template<class T1, class P_numtype2, int N_length2>
2568inline
2569_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , 
2570      TinyVectorIterConst<P_numtype2, N_length2>,
2571      _bz_Max<complex<T1> , P_numtype2 > > >
2572max(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
2584BZ_NAMESPACE_END
2585
2586#endif
Note: See TracBrowser for help on using the repository browser.