source: Sophya/trunk/Poubelle/DPC:FitsIOServer/Blitz/blitz/vecwhere.cc@ 658

Last change on this file since 658 was 658, checked in by ansari, 26 years ago

no message

File size: 229.4 KB
RevLine 
[658]1/***************************************************************************
2 * blitz/vecwhere.cc where(X,Y,Z) function for vectors
3 *
4 * $Id: vecwhere.cc,v 1.1.1.1 1999-11-26 16:37:06 ansari Exp $
5 *
6 * Copyright (C) 1997 Todd Veldhuizen <tveldhui@seurat.uwaterloo.ca>
7 * All rights reserved. Please see <blitz/blitz.h> for terms and
8 * conditions of use.
9 *
10 * Suggestions: blitz-suggest@cybervision.com
11 * Bugs: blitz-bugs@cybervision.com
12 * Licensing inquiries: blitz-licenses@cybervision.com
13 *
14 * For more information, please see the Blitz++ Home Page:
15 * http://seurat.uwaterloo.ca/blitz/
16 *
17 ***************************************************************************
18 * $Log: not supported by cvs2svn $
19// Revision 1.1.1.1 1999/04/09 17:59:00 ansari
20// Creation module DPC/Blitz (blitz 0.4) Reza 09/04/99
21//
22 * Revision 1.1 1997/07/16 14:51:20 tveldhui
23 * Update: Alpha release 0.2 (Arrays)
24 *
25 */
26
27// Generated source file. Do not edit.
28// genvecwhere.cpp Feb 5 1997 09:52:29
29
30#ifndef BZ_VECWHERE_CC
31#define BZ_VECWHERE_CC
32
33BZ_NAMESPACE(blitz)
34
35// where(Vector<P_numtype1>, Vector<P_numtype2>, Vector<P_numtype3>)
36template<class P_numtype1, class P_numtype2, class P_numtype3>
37inline
38_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
39 VectorIterConst<P_numtype2>,
40 VectorIterConst<P_numtype3> > >
41where(const Vector<P_numtype1>& d1,
42 const Vector<P_numtype2>& d2,
43 const Vector<P_numtype3>& d3)
44{
45 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
46 VectorIterConst<P_numtype2>,
47 VectorIterConst<P_numtype3> > T_expr;
48
49 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
50 d2.begin(),
51 d3.begin()));
52}
53
54// where(Vector<P_numtype1>, Vector<P_numtype2>, _bz_VecExpr<P_expr3>)
55template<class P_numtype1, class P_numtype2, class P_expr3>
56inline
57_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
58 VectorIterConst<P_numtype2>,
59 _bz_VecExpr<P_expr3> > >
60where(const Vector<P_numtype1>& d1,
61 const Vector<P_numtype2>& d2,
62 _bz_VecExpr<P_expr3> d3)
63{
64 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
65 VectorIterConst<P_numtype2>,
66 _bz_VecExpr<P_expr3> > T_expr;
67
68 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
69 d2.begin(),
70 d3));
71}
72
73// where(Vector<P_numtype1>, Vector<P_numtype2>, VectorPick<P_numtype3>)
74template<class P_numtype1, class P_numtype2, class P_numtype3>
75inline
76_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
77 VectorIterConst<P_numtype2>,
78 VectorPickIterConst<P_numtype3> > >
79where(const Vector<P_numtype1>& d1,
80 const Vector<P_numtype2>& d2,
81 const VectorPick<P_numtype3>& d3)
82{
83 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
84 VectorIterConst<P_numtype2>,
85 VectorPickIterConst<P_numtype3> > T_expr;
86
87 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
88 d2.begin(),
89 d3.begin()));
90}
91
92// where(Vector<P_numtype1>, Vector<P_numtype2>, Range)
93template<class P_numtype1, class P_numtype2>
94inline
95_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
96 VectorIterConst<P_numtype2>,
97 Range > >
98where(const Vector<P_numtype1>& d1,
99 const Vector<P_numtype2>& d2,
100 Range d3)
101{
102 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
103 VectorIterConst<P_numtype2>,
104 Range > T_expr;
105
106 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
107 d2.begin(),
108 d3));
109}
110
111// where(Vector<P_numtype1>, Vector<P_numtype2>, TinyVector<P_numtype3, N_length3>)
112template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length3>
113inline
114_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
115 VectorIterConst<P_numtype2>,
116 TinyVectorIterConst<P_numtype3, N_length3> > >
117where(const Vector<P_numtype1>& d1,
118 const Vector<P_numtype2>& d2,
119 const TinyVector<P_numtype3, N_length3>& d3)
120{
121 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
122 VectorIterConst<P_numtype2>,
123 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
124
125 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
126 d2.begin(),
127 d3.begin()));
128}
129
130// where(Vector<P_numtype1>, Vector<P_numtype2>, int)
131template<class P_numtype1, class P_numtype2>
132inline
133_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
134 VectorIterConst<P_numtype2>,
135 _bz_VecExprConstant<int> > >
136where(const Vector<P_numtype1>& d1,
137 const Vector<P_numtype2>& d2,
138 int d3)
139{
140 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
141 VectorIterConst<P_numtype2>,
142 _bz_VecExprConstant<int> > T_expr;
143
144 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
145 d2.begin(),
146 _bz_VecExprConstant<int>(d3)));
147}
148
149// where(Vector<P_numtype1>, Vector<P_numtype2>, float)
150template<class P_numtype1, class P_numtype2>
151inline
152_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
153 VectorIterConst<P_numtype2>,
154 _bz_VecExprConstant<float> > >
155where(const Vector<P_numtype1>& d1,
156 const Vector<P_numtype2>& d2,
157 float d3)
158{
159 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
160 VectorIterConst<P_numtype2>,
161 _bz_VecExprConstant<float> > T_expr;
162
163 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
164 d2.begin(),
165 _bz_VecExprConstant<float>(d3)));
166}
167
168// where(Vector<P_numtype1>, Vector<P_numtype2>, double)
169template<class P_numtype1, class P_numtype2>
170inline
171_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
172 VectorIterConst<P_numtype2>,
173 _bz_VecExprConstant<double> > >
174where(const Vector<P_numtype1>& d1,
175 const Vector<P_numtype2>& d2,
176 double d3)
177{
178 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
179 VectorIterConst<P_numtype2>,
180 _bz_VecExprConstant<double> > T_expr;
181
182 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
183 d2.begin(),
184 _bz_VecExprConstant<double>(d3)));
185}
186
187// where(Vector<P_numtype1>, Vector<P_numtype2>, long double)
188template<class P_numtype1, class P_numtype2>
189inline
190_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
191 VectorIterConst<P_numtype2>,
192 _bz_VecExprConstant<long double> > >
193where(const Vector<P_numtype1>& d1,
194 const Vector<P_numtype2>& d2,
195 long double d3)
196{
197 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
198 VectorIterConst<P_numtype2>,
199 _bz_VecExprConstant<long double> > T_expr;
200
201 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
202 d2.begin(),
203 _bz_VecExprConstant<long double>(d3)));
204}
205
206// where(Vector<P_numtype1>, Vector<P_numtype2>, complex<T3>)
207#ifdef BZ_HAVE_COMPLEX
208template<class P_numtype1, class P_numtype2, class T3>
209inline
210_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
211 VectorIterConst<P_numtype2>,
212 _bz_VecExprConstant<complex<T3> > > >
213where(const Vector<P_numtype1>& d1,
214 const Vector<P_numtype2>& d2,
215 complex<T3> d3)
216{
217 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
218 VectorIterConst<P_numtype2>,
219 _bz_VecExprConstant<complex<T3> > > T_expr;
220
221 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
222 d2.begin(),
223 _bz_VecExprConstant<complex<T3> > (d3)));
224}
225#endif // BZ_HAVE_COMPLEX
226
227// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, Vector<P_numtype3>)
228template<class P_numtype1, class P_expr2, class P_numtype3>
229inline
230_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
231 _bz_VecExpr<P_expr2>,
232 VectorIterConst<P_numtype3> > >
233where(const Vector<P_numtype1>& d1,
234 _bz_VecExpr<P_expr2> d2,
235 const Vector<P_numtype3>& d3)
236{
237 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
238 _bz_VecExpr<P_expr2>,
239 VectorIterConst<P_numtype3> > T_expr;
240
241 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
242 d2,
243 d3.begin()));
244}
245
246// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>)
247template<class P_numtype1, class P_expr2, class P_expr3>
248inline
249_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
250 _bz_VecExpr<P_expr2>,
251 _bz_VecExpr<P_expr3> > >
252where(const Vector<P_numtype1>& d1,
253 _bz_VecExpr<P_expr2> d2,
254 _bz_VecExpr<P_expr3> d3)
255{
256 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
257 _bz_VecExpr<P_expr2>,
258 _bz_VecExpr<P_expr3> > T_expr;
259
260 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
261 d2,
262 d3));
263}
264
265// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, VectorPick<P_numtype3>)
266template<class P_numtype1, class P_expr2, class P_numtype3>
267inline
268_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
269 _bz_VecExpr<P_expr2>,
270 VectorPickIterConst<P_numtype3> > >
271where(const Vector<P_numtype1>& d1,
272 _bz_VecExpr<P_expr2> d2,
273 const VectorPick<P_numtype3>& d3)
274{
275 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
276 _bz_VecExpr<P_expr2>,
277 VectorPickIterConst<P_numtype3> > T_expr;
278
279 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
280 d2,
281 d3.begin()));
282}
283
284// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, Range)
285template<class P_numtype1, class P_expr2>
286inline
287_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
288 _bz_VecExpr<P_expr2>,
289 Range > >
290where(const Vector<P_numtype1>& d1,
291 _bz_VecExpr<P_expr2> d2,
292 Range d3)
293{
294 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
295 _bz_VecExpr<P_expr2>,
296 Range > T_expr;
297
298 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
299 d2,
300 d3));
301}
302
303// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, TinyVector<P_numtype3, N_length3>)
304template<class P_numtype1, class P_expr2, class P_numtype3, int N_length3>
305inline
306_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
307 _bz_VecExpr<P_expr2>,
308 TinyVectorIterConst<P_numtype3, N_length3> > >
309where(const Vector<P_numtype1>& d1,
310 _bz_VecExpr<P_expr2> d2,
311 const TinyVector<P_numtype3, N_length3>& d3)
312{
313 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
314 _bz_VecExpr<P_expr2>,
315 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
316
317 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
318 d2,
319 d3.begin()));
320}
321
322// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, int)
323template<class P_numtype1, class P_expr2>
324inline
325_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
326 _bz_VecExpr<P_expr2>,
327 _bz_VecExprConstant<int> > >
328where(const Vector<P_numtype1>& d1,
329 _bz_VecExpr<P_expr2> d2,
330 int d3)
331{
332 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
333 _bz_VecExpr<P_expr2>,
334 _bz_VecExprConstant<int> > T_expr;
335
336 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
337 d2,
338 _bz_VecExprConstant<int>(d3)));
339}
340
341// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, float)
342template<class P_numtype1, class P_expr2>
343inline
344_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
345 _bz_VecExpr<P_expr2>,
346 _bz_VecExprConstant<float> > >
347where(const Vector<P_numtype1>& d1,
348 _bz_VecExpr<P_expr2> d2,
349 float d3)
350{
351 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
352 _bz_VecExpr<P_expr2>,
353 _bz_VecExprConstant<float> > T_expr;
354
355 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
356 d2,
357 _bz_VecExprConstant<float>(d3)));
358}
359
360// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, double)
361template<class P_numtype1, class P_expr2>
362inline
363_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
364 _bz_VecExpr<P_expr2>,
365 _bz_VecExprConstant<double> > >
366where(const Vector<P_numtype1>& d1,
367 _bz_VecExpr<P_expr2> d2,
368 double d3)
369{
370 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
371 _bz_VecExpr<P_expr2>,
372 _bz_VecExprConstant<double> > T_expr;
373
374 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
375 d2,
376 _bz_VecExprConstant<double>(d3)));
377}
378
379// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, long double)
380template<class P_numtype1, class P_expr2>
381inline
382_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
383 _bz_VecExpr<P_expr2>,
384 _bz_VecExprConstant<long double> > >
385where(const Vector<P_numtype1>& d1,
386 _bz_VecExpr<P_expr2> d2,
387 long double d3)
388{
389 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
390 _bz_VecExpr<P_expr2>,
391 _bz_VecExprConstant<long double> > T_expr;
392
393 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
394 d2,
395 _bz_VecExprConstant<long double>(d3)));
396}
397
398// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, complex<T3>)
399#ifdef BZ_HAVE_COMPLEX
400template<class P_numtype1, class P_expr2, class T3>
401inline
402_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
403 _bz_VecExpr<P_expr2>,
404 _bz_VecExprConstant<complex<T3> > > >
405where(const Vector<P_numtype1>& d1,
406 _bz_VecExpr<P_expr2> d2,
407 complex<T3> d3)
408{
409 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
410 _bz_VecExpr<P_expr2>,
411 _bz_VecExprConstant<complex<T3> > > T_expr;
412
413 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
414 d2,
415 _bz_VecExprConstant<complex<T3> > (d3)));
416}
417#endif // BZ_HAVE_COMPLEX
418
419// where(Vector<P_numtype1>, VectorPick<P_numtype2>, Vector<P_numtype3>)
420template<class P_numtype1, class P_numtype2, class P_numtype3>
421inline
422_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
423 VectorPickIterConst<P_numtype2>,
424 VectorIterConst<P_numtype3> > >
425where(const Vector<P_numtype1>& d1,
426 const VectorPick<P_numtype2>& d2,
427 const Vector<P_numtype3>& d3)
428{
429 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
430 VectorPickIterConst<P_numtype2>,
431 VectorIterConst<P_numtype3> > T_expr;
432
433 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
434 d2.begin(),
435 d3.begin()));
436}
437
438// where(Vector<P_numtype1>, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3>)
439template<class P_numtype1, class P_numtype2, class P_expr3>
440inline
441_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
442 VectorPickIterConst<P_numtype2>,
443 _bz_VecExpr<P_expr3> > >
444where(const Vector<P_numtype1>& d1,
445 const VectorPick<P_numtype2>& d2,
446 _bz_VecExpr<P_expr3> d3)
447{
448 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
449 VectorPickIterConst<P_numtype2>,
450 _bz_VecExpr<P_expr3> > T_expr;
451
452 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
453 d2.begin(),
454 d3));
455}
456
457// where(Vector<P_numtype1>, VectorPick<P_numtype2>, VectorPick<P_numtype3>)
458template<class P_numtype1, class P_numtype2, class P_numtype3>
459inline
460_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
461 VectorPickIterConst<P_numtype2>,
462 VectorPickIterConst<P_numtype3> > >
463where(const Vector<P_numtype1>& d1,
464 const VectorPick<P_numtype2>& d2,
465 const VectorPick<P_numtype3>& d3)
466{
467 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
468 VectorPickIterConst<P_numtype2>,
469 VectorPickIterConst<P_numtype3> > T_expr;
470
471 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
472 d2.begin(),
473 d3.begin()));
474}
475
476// where(Vector<P_numtype1>, VectorPick<P_numtype2>, Range)
477template<class P_numtype1, class P_numtype2>
478inline
479_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
480 VectorPickIterConst<P_numtype2>,
481 Range > >
482where(const Vector<P_numtype1>& d1,
483 const VectorPick<P_numtype2>& d2,
484 Range d3)
485{
486 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
487 VectorPickIterConst<P_numtype2>,
488 Range > T_expr;
489
490 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
491 d2.begin(),
492 d3));
493}
494
495// where(Vector<P_numtype1>, VectorPick<P_numtype2>, TinyVector<P_numtype3, N_length3>)
496template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length3>
497inline
498_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
499 VectorPickIterConst<P_numtype2>,
500 TinyVectorIterConst<P_numtype3, N_length3> > >
501where(const Vector<P_numtype1>& d1,
502 const VectorPick<P_numtype2>& d2,
503 const TinyVector<P_numtype3, N_length3>& d3)
504{
505 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
506 VectorPickIterConst<P_numtype2>,
507 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
508
509 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
510 d2.begin(),
511 d3.begin()));
512}
513
514// where(Vector<P_numtype1>, VectorPick<P_numtype2>, int)
515template<class P_numtype1, class P_numtype2>
516inline
517_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
518 VectorPickIterConst<P_numtype2>,
519 _bz_VecExprConstant<int> > >
520where(const Vector<P_numtype1>& d1,
521 const VectorPick<P_numtype2>& d2,
522 int d3)
523{
524 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
525 VectorPickIterConst<P_numtype2>,
526 _bz_VecExprConstant<int> > T_expr;
527
528 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
529 d2.begin(),
530 _bz_VecExprConstant<int>(d3)));
531}
532
533// where(Vector<P_numtype1>, VectorPick<P_numtype2>, float)
534template<class P_numtype1, class P_numtype2>
535inline
536_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
537 VectorPickIterConst<P_numtype2>,
538 _bz_VecExprConstant<float> > >
539where(const Vector<P_numtype1>& d1,
540 const VectorPick<P_numtype2>& d2,
541 float d3)
542{
543 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
544 VectorPickIterConst<P_numtype2>,
545 _bz_VecExprConstant<float> > T_expr;
546
547 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
548 d2.begin(),
549 _bz_VecExprConstant<float>(d3)));
550}
551
552// where(Vector<P_numtype1>, VectorPick<P_numtype2>, double)
553template<class P_numtype1, class P_numtype2>
554inline
555_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
556 VectorPickIterConst<P_numtype2>,
557 _bz_VecExprConstant<double> > >
558where(const Vector<P_numtype1>& d1,
559 const VectorPick<P_numtype2>& d2,
560 double d3)
561{
562 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
563 VectorPickIterConst<P_numtype2>,
564 _bz_VecExprConstant<double> > T_expr;
565
566 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
567 d2.begin(),
568 _bz_VecExprConstant<double>(d3)));
569}
570
571// where(Vector<P_numtype1>, VectorPick<P_numtype2>, long double)
572template<class P_numtype1, class P_numtype2>
573inline
574_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
575 VectorPickIterConst<P_numtype2>,
576 _bz_VecExprConstant<long double> > >
577where(const Vector<P_numtype1>& d1,
578 const VectorPick<P_numtype2>& d2,
579 long double d3)
580{
581 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
582 VectorPickIterConst<P_numtype2>,
583 _bz_VecExprConstant<long double> > T_expr;
584
585 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
586 d2.begin(),
587 _bz_VecExprConstant<long double>(d3)));
588}
589
590// where(Vector<P_numtype1>, VectorPick<P_numtype2>, complex<T3>)
591#ifdef BZ_HAVE_COMPLEX
592template<class P_numtype1, class P_numtype2, class T3>
593inline
594_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
595 VectorPickIterConst<P_numtype2>,
596 _bz_VecExprConstant<complex<T3> > > >
597where(const Vector<P_numtype1>& d1,
598 const VectorPick<P_numtype2>& d2,
599 complex<T3> d3)
600{
601 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
602 VectorPickIterConst<P_numtype2>,
603 _bz_VecExprConstant<complex<T3> > > T_expr;
604
605 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
606 d2.begin(),
607 _bz_VecExprConstant<complex<T3> > (d3)));
608}
609#endif // BZ_HAVE_COMPLEX
610
611// where(Vector<P_numtype1>, Range, Vector<P_numtype3>)
612template<class P_numtype1, class P_numtype3>
613inline
614_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
615 Range,
616 VectorIterConst<P_numtype3> > >
617where(const Vector<P_numtype1>& d1,
618 Range d2,
619 const Vector<P_numtype3>& d3)
620{
621 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
622 Range,
623 VectorIterConst<P_numtype3> > T_expr;
624
625 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
626 d2,
627 d3.begin()));
628}
629
630// where(Vector<P_numtype1>, Range, _bz_VecExpr<P_expr3>)
631template<class P_numtype1, class P_expr3>
632inline
633_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
634 Range,
635 _bz_VecExpr<P_expr3> > >
636where(const Vector<P_numtype1>& d1,
637 Range d2,
638 _bz_VecExpr<P_expr3> d3)
639{
640 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
641 Range,
642 _bz_VecExpr<P_expr3> > T_expr;
643
644 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
645 d2,
646 d3));
647}
648
649// where(Vector<P_numtype1>, Range, VectorPick<P_numtype3>)
650template<class P_numtype1, class P_numtype3>
651inline
652_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
653 Range,
654 VectorPickIterConst<P_numtype3> > >
655where(const Vector<P_numtype1>& d1,
656 Range d2,
657 const VectorPick<P_numtype3>& d3)
658{
659 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
660 Range,
661 VectorPickIterConst<P_numtype3> > T_expr;
662
663 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
664 d2,
665 d3.begin()));
666}
667
668// where(Vector<P_numtype1>, Range, Range)
669template<class P_numtype1>
670inline
671_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
672 Range,
673 Range > >
674where(const Vector<P_numtype1>& d1,
675 Range d2,
676 Range d3)
677{
678 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
679 Range,
680 Range > T_expr;
681
682 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
683 d2,
684 d3));
685}
686
687// where(Vector<P_numtype1>, Range, TinyVector<P_numtype3, N_length3>)
688template<class P_numtype1, class P_numtype3, int N_length3>
689inline
690_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
691 Range,
692 TinyVectorIterConst<P_numtype3, N_length3> > >
693where(const Vector<P_numtype1>& d1,
694 Range d2,
695 const TinyVector<P_numtype3, N_length3>& d3)
696{
697 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
698 Range,
699 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
700
701 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
702 d2,
703 d3.begin()));
704}
705
706// where(Vector<P_numtype1>, Range, int)
707template<class P_numtype1>
708inline
709_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
710 Range,
711 _bz_VecExprConstant<int> > >
712where(const Vector<P_numtype1>& d1,
713 Range d2,
714 int d3)
715{
716 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
717 Range,
718 _bz_VecExprConstant<int> > T_expr;
719
720 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
721 d2,
722 _bz_VecExprConstant<int>(d3)));
723}
724
725// where(Vector<P_numtype1>, Range, float)
726template<class P_numtype1>
727inline
728_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
729 Range,
730 _bz_VecExprConstant<float> > >
731where(const Vector<P_numtype1>& d1,
732 Range d2,
733 float d3)
734{
735 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
736 Range,
737 _bz_VecExprConstant<float> > T_expr;
738
739 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
740 d2,
741 _bz_VecExprConstant<float>(d3)));
742}
743
744// where(Vector<P_numtype1>, Range, double)
745template<class P_numtype1>
746inline
747_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
748 Range,
749 _bz_VecExprConstant<double> > >
750where(const Vector<P_numtype1>& d1,
751 Range d2,
752 double d3)
753{
754 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
755 Range,
756 _bz_VecExprConstant<double> > T_expr;
757
758 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
759 d2,
760 _bz_VecExprConstant<double>(d3)));
761}
762
763// where(Vector<P_numtype1>, Range, long double)
764template<class P_numtype1>
765inline
766_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
767 Range,
768 _bz_VecExprConstant<long double> > >
769where(const Vector<P_numtype1>& d1,
770 Range d2,
771 long double d3)
772{
773 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
774 Range,
775 _bz_VecExprConstant<long double> > T_expr;
776
777 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
778 d2,
779 _bz_VecExprConstant<long double>(d3)));
780}
781
782// where(Vector<P_numtype1>, Range, complex<T3>)
783#ifdef BZ_HAVE_COMPLEX
784template<class P_numtype1, class T3>
785inline
786_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
787 Range,
788 _bz_VecExprConstant<complex<T3> > > >
789where(const Vector<P_numtype1>& d1,
790 Range d2,
791 complex<T3> d3)
792{
793 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
794 Range,
795 _bz_VecExprConstant<complex<T3> > > T_expr;
796
797 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
798 d2,
799 _bz_VecExprConstant<complex<T3> > (d3)));
800}
801#endif // BZ_HAVE_COMPLEX
802
803// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, Vector<P_numtype3>)
804template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype3>
805inline
806_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
807 TinyVectorIterConst<P_numtype2, N_length2>,
808 VectorIterConst<P_numtype3> > >
809where(const Vector<P_numtype1>& d1,
810 const TinyVector<P_numtype2, N_length2>& d2,
811 const Vector<P_numtype3>& d3)
812{
813 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
814 TinyVectorIterConst<P_numtype2, N_length2>,
815 VectorIterConst<P_numtype3> > T_expr;
816
817 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
818 d2.begin(),
819 d3.begin()));
820}
821
822// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, _bz_VecExpr<P_expr3>)
823template<class P_numtype1, class P_numtype2, int N_length2, class P_expr3>
824inline
825_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
826 TinyVectorIterConst<P_numtype2, N_length2>,
827 _bz_VecExpr<P_expr3> > >
828where(const Vector<P_numtype1>& d1,
829 const TinyVector<P_numtype2, N_length2>& d2,
830 _bz_VecExpr<P_expr3> d3)
831{
832 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
833 TinyVectorIterConst<P_numtype2, N_length2>,
834 _bz_VecExpr<P_expr3> > T_expr;
835
836 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
837 d2.begin(),
838 d3));
839}
840
841// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, VectorPick<P_numtype3>)
842template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype3>
843inline
844_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
845 TinyVectorIterConst<P_numtype2, N_length2>,
846 VectorPickIterConst<P_numtype3> > >
847where(const Vector<P_numtype1>& d1,
848 const TinyVector<P_numtype2, N_length2>& d2,
849 const VectorPick<P_numtype3>& d3)
850{
851 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
852 TinyVectorIterConst<P_numtype2, N_length2>,
853 VectorPickIterConst<P_numtype3> > T_expr;
854
855 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
856 d2.begin(),
857 d3.begin()));
858}
859
860// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, Range)
861template<class P_numtype1, class P_numtype2, int N_length2>
862inline
863_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
864 TinyVectorIterConst<P_numtype2, N_length2>,
865 Range > >
866where(const Vector<P_numtype1>& d1,
867 const TinyVector<P_numtype2, N_length2>& d2,
868 Range d3)
869{
870 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
871 TinyVectorIterConst<P_numtype2, N_length2>,
872 Range > T_expr;
873
874 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
875 d2.begin(),
876 d3));
877}
878
879// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, TinyVector<P_numtype3, N_length3>)
880template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype3, int N_length3>
881inline
882_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
883 TinyVectorIterConst<P_numtype2, N_length2>,
884 TinyVectorIterConst<P_numtype3, N_length3> > >
885where(const Vector<P_numtype1>& d1,
886 const TinyVector<P_numtype2, N_length2>& d2,
887 const TinyVector<P_numtype3, N_length3>& d3)
888{
889 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
890 TinyVectorIterConst<P_numtype2, N_length2>,
891 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
892
893 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
894 d2.begin(),
895 d3.begin()));
896}
897
898// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, int)
899template<class P_numtype1, class P_numtype2, int N_length2>
900inline
901_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
902 TinyVectorIterConst<P_numtype2, N_length2>,
903 _bz_VecExprConstant<int> > >
904where(const Vector<P_numtype1>& d1,
905 const TinyVector<P_numtype2, N_length2>& d2,
906 int d3)
907{
908 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
909 TinyVectorIterConst<P_numtype2, N_length2>,
910 _bz_VecExprConstant<int> > T_expr;
911
912 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
913 d2.begin(),
914 _bz_VecExprConstant<int>(d3)));
915}
916
917// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, float)
918template<class P_numtype1, class P_numtype2, int N_length2>
919inline
920_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
921 TinyVectorIterConst<P_numtype2, N_length2>,
922 _bz_VecExprConstant<float> > >
923where(const Vector<P_numtype1>& d1,
924 const TinyVector<P_numtype2, N_length2>& d2,
925 float d3)
926{
927 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
928 TinyVectorIterConst<P_numtype2, N_length2>,
929 _bz_VecExprConstant<float> > T_expr;
930
931 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
932 d2.begin(),
933 _bz_VecExprConstant<float>(d3)));
934}
935
936// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, double)
937template<class P_numtype1, class P_numtype2, int N_length2>
938inline
939_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
940 TinyVectorIterConst<P_numtype2, N_length2>,
941 _bz_VecExprConstant<double> > >
942where(const Vector<P_numtype1>& d1,
943 const TinyVector<P_numtype2, N_length2>& d2,
944 double d3)
945{
946 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
947 TinyVectorIterConst<P_numtype2, N_length2>,
948 _bz_VecExprConstant<double> > T_expr;
949
950 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
951 d2.begin(),
952 _bz_VecExprConstant<double>(d3)));
953}
954
955// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, long double)
956template<class P_numtype1, class P_numtype2, int N_length2>
957inline
958_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
959 TinyVectorIterConst<P_numtype2, N_length2>,
960 _bz_VecExprConstant<long double> > >
961where(const Vector<P_numtype1>& d1,
962 const TinyVector<P_numtype2, N_length2>& d2,
963 long double d3)
964{
965 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
966 TinyVectorIterConst<P_numtype2, N_length2>,
967 _bz_VecExprConstant<long double> > T_expr;
968
969 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
970 d2.begin(),
971 _bz_VecExprConstant<long double>(d3)));
972}
973
974// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, complex<T3>)
975#ifdef BZ_HAVE_COMPLEX
976template<class P_numtype1, class P_numtype2, int N_length2, class T3>
977inline
978_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
979 TinyVectorIterConst<P_numtype2, N_length2>,
980 _bz_VecExprConstant<complex<T3> > > >
981where(const Vector<P_numtype1>& d1,
982 const TinyVector<P_numtype2, N_length2>& d2,
983 complex<T3> d3)
984{
985 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
986 TinyVectorIterConst<P_numtype2, N_length2>,
987 _bz_VecExprConstant<complex<T3> > > T_expr;
988
989 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
990 d2.begin(),
991 _bz_VecExprConstant<complex<T3> > (d3)));
992}
993#endif // BZ_HAVE_COMPLEX
994
995// where(Vector<P_numtype1>, int, Vector<P_numtype3>)
996template<class P_numtype1, class P_numtype3>
997inline
998_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
999 _bz_VecExprConstant<int>,
1000 VectorIterConst<P_numtype3> > >
1001where(const Vector<P_numtype1>& d1,
1002 int d2,
1003 const Vector<P_numtype3>& d3)
1004{
1005 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1006 _bz_VecExprConstant<int>,
1007 VectorIterConst<P_numtype3> > T_expr;
1008
1009 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1010 _bz_VecExprConstant<int>(d2),
1011 d3.begin()));
1012}
1013
1014// where(Vector<P_numtype1>, int, _bz_VecExpr<P_expr3>)
1015template<class P_numtype1, class P_expr3>
1016inline
1017_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1018 _bz_VecExprConstant<int>,
1019 _bz_VecExpr<P_expr3> > >
1020where(const Vector<P_numtype1>& d1,
1021 int d2,
1022 _bz_VecExpr<P_expr3> d3)
1023{
1024 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1025 _bz_VecExprConstant<int>,
1026 _bz_VecExpr<P_expr3> > T_expr;
1027
1028 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1029 _bz_VecExprConstant<int>(d2),
1030 d3));
1031}
1032
1033// where(Vector<P_numtype1>, int, VectorPick<P_numtype3>)
1034template<class P_numtype1, class P_numtype3>
1035inline
1036_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1037 _bz_VecExprConstant<int>,
1038 VectorPickIterConst<P_numtype3> > >
1039where(const Vector<P_numtype1>& d1,
1040 int d2,
1041 const VectorPick<P_numtype3>& d3)
1042{
1043 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1044 _bz_VecExprConstant<int>,
1045 VectorPickIterConst<P_numtype3> > T_expr;
1046
1047 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1048 _bz_VecExprConstant<int>(d2),
1049 d3.begin()));
1050}
1051
1052// where(Vector<P_numtype1>, int, Range)
1053template<class P_numtype1>
1054inline
1055_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1056 _bz_VecExprConstant<int>,
1057 Range > >
1058where(const Vector<P_numtype1>& d1,
1059 int d2,
1060 Range d3)
1061{
1062 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1063 _bz_VecExprConstant<int>,
1064 Range > T_expr;
1065
1066 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1067 _bz_VecExprConstant<int>(d2),
1068 d3));
1069}
1070
1071// where(Vector<P_numtype1>, int, TinyVector<P_numtype3, N_length3>)
1072template<class P_numtype1, class P_numtype3, int N_length3>
1073inline
1074_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1075 _bz_VecExprConstant<int>,
1076 TinyVectorIterConst<P_numtype3, N_length3> > >
1077where(const Vector<P_numtype1>& d1,
1078 int d2,
1079 const TinyVector<P_numtype3, N_length3>& d3)
1080{
1081 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1082 _bz_VecExprConstant<int>,
1083 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
1084
1085 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1086 _bz_VecExprConstant<int>(d2),
1087 d3.begin()));
1088}
1089
1090// where(Vector<P_numtype1>, int, int)
1091template<class P_numtype1>
1092inline
1093_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1094 _bz_VecExprConstant<int>,
1095 _bz_VecExprConstant<int> > >
1096where(const Vector<P_numtype1>& d1,
1097 int d2,
1098 int d3)
1099{
1100 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1101 _bz_VecExprConstant<int>,
1102 _bz_VecExprConstant<int> > T_expr;
1103
1104 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1105 _bz_VecExprConstant<int>(d2),
1106 _bz_VecExprConstant<int>(d3)));
1107}
1108
1109// where(Vector<P_numtype1>, float, Vector<P_numtype3>)
1110template<class P_numtype1, class P_numtype3>
1111inline
1112_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1113 _bz_VecExprConstant<float>,
1114 VectorIterConst<P_numtype3> > >
1115where(const Vector<P_numtype1>& d1,
1116 float d2,
1117 const Vector<P_numtype3>& d3)
1118{
1119 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1120 _bz_VecExprConstant<float>,
1121 VectorIterConst<P_numtype3> > T_expr;
1122
1123 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1124 _bz_VecExprConstant<float>(d2),
1125 d3.begin()));
1126}
1127
1128// where(Vector<P_numtype1>, float, _bz_VecExpr<P_expr3>)
1129template<class P_numtype1, class P_expr3>
1130inline
1131_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1132 _bz_VecExprConstant<float>,
1133 _bz_VecExpr<P_expr3> > >
1134where(const Vector<P_numtype1>& d1,
1135 float d2,
1136 _bz_VecExpr<P_expr3> d3)
1137{
1138 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1139 _bz_VecExprConstant<float>,
1140 _bz_VecExpr<P_expr3> > T_expr;
1141
1142 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1143 _bz_VecExprConstant<float>(d2),
1144 d3));
1145}
1146
1147// where(Vector<P_numtype1>, float, VectorPick<P_numtype3>)
1148template<class P_numtype1, class P_numtype3>
1149inline
1150_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1151 _bz_VecExprConstant<float>,
1152 VectorPickIterConst<P_numtype3> > >
1153where(const Vector<P_numtype1>& d1,
1154 float d2,
1155 const VectorPick<P_numtype3>& d3)
1156{
1157 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1158 _bz_VecExprConstant<float>,
1159 VectorPickIterConst<P_numtype3> > T_expr;
1160
1161 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1162 _bz_VecExprConstant<float>(d2),
1163 d3.begin()));
1164}
1165
1166// where(Vector<P_numtype1>, float, Range)
1167template<class P_numtype1>
1168inline
1169_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1170 _bz_VecExprConstant<float>,
1171 Range > >
1172where(const Vector<P_numtype1>& d1,
1173 float d2,
1174 Range d3)
1175{
1176 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1177 _bz_VecExprConstant<float>,
1178 Range > T_expr;
1179
1180 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1181 _bz_VecExprConstant<float>(d2),
1182 d3));
1183}
1184
1185// where(Vector<P_numtype1>, float, TinyVector<P_numtype3, N_length3>)
1186template<class P_numtype1, class P_numtype3, int N_length3>
1187inline
1188_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1189 _bz_VecExprConstant<float>,
1190 TinyVectorIterConst<P_numtype3, N_length3> > >
1191where(const Vector<P_numtype1>& d1,
1192 float d2,
1193 const TinyVector<P_numtype3, N_length3>& d3)
1194{
1195 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1196 _bz_VecExprConstant<float>,
1197 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
1198
1199 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1200 _bz_VecExprConstant<float>(d2),
1201 d3.begin()));
1202}
1203
1204// where(Vector<P_numtype1>, float, float)
1205template<class P_numtype1>
1206inline
1207_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1208 _bz_VecExprConstant<float>,
1209 _bz_VecExprConstant<float> > >
1210where(const Vector<P_numtype1>& d1,
1211 float d2,
1212 float d3)
1213{
1214 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1215 _bz_VecExprConstant<float>,
1216 _bz_VecExprConstant<float> > T_expr;
1217
1218 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1219 _bz_VecExprConstant<float>(d2),
1220 _bz_VecExprConstant<float>(d3)));
1221}
1222
1223// where(Vector<P_numtype1>, double, Vector<P_numtype3>)
1224template<class P_numtype1, class P_numtype3>
1225inline
1226_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1227 _bz_VecExprConstant<double>,
1228 VectorIterConst<P_numtype3> > >
1229where(const Vector<P_numtype1>& d1,
1230 double d2,
1231 const Vector<P_numtype3>& d3)
1232{
1233 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1234 _bz_VecExprConstant<double>,
1235 VectorIterConst<P_numtype3> > T_expr;
1236
1237 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1238 _bz_VecExprConstant<double>(d2),
1239 d3.begin()));
1240}
1241
1242// where(Vector<P_numtype1>, double, _bz_VecExpr<P_expr3>)
1243template<class P_numtype1, class P_expr3>
1244inline
1245_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1246 _bz_VecExprConstant<double>,
1247 _bz_VecExpr<P_expr3> > >
1248where(const Vector<P_numtype1>& d1,
1249 double d2,
1250 _bz_VecExpr<P_expr3> d3)
1251{
1252 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1253 _bz_VecExprConstant<double>,
1254 _bz_VecExpr<P_expr3> > T_expr;
1255
1256 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1257 _bz_VecExprConstant<double>(d2),
1258 d3));
1259}
1260
1261// where(Vector<P_numtype1>, double, VectorPick<P_numtype3>)
1262template<class P_numtype1, class P_numtype3>
1263inline
1264_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1265 _bz_VecExprConstant<double>,
1266 VectorPickIterConst<P_numtype3> > >
1267where(const Vector<P_numtype1>& d1,
1268 double d2,
1269 const VectorPick<P_numtype3>& d3)
1270{
1271 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1272 _bz_VecExprConstant<double>,
1273 VectorPickIterConst<P_numtype3> > T_expr;
1274
1275 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1276 _bz_VecExprConstant<double>(d2),
1277 d3.begin()));
1278}
1279
1280// where(Vector<P_numtype1>, double, Range)
1281template<class P_numtype1>
1282inline
1283_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1284 _bz_VecExprConstant<double>,
1285 Range > >
1286where(const Vector<P_numtype1>& d1,
1287 double d2,
1288 Range d3)
1289{
1290 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1291 _bz_VecExprConstant<double>,
1292 Range > T_expr;
1293
1294 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1295 _bz_VecExprConstant<double>(d2),
1296 d3));
1297}
1298
1299// where(Vector<P_numtype1>, double, TinyVector<P_numtype3, N_length3>)
1300template<class P_numtype1, class P_numtype3, int N_length3>
1301inline
1302_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1303 _bz_VecExprConstant<double>,
1304 TinyVectorIterConst<P_numtype3, N_length3> > >
1305where(const Vector<P_numtype1>& d1,
1306 double d2,
1307 const TinyVector<P_numtype3, N_length3>& d3)
1308{
1309 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1310 _bz_VecExprConstant<double>,
1311 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
1312
1313 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1314 _bz_VecExprConstant<double>(d2),
1315 d3.begin()));
1316}
1317
1318// where(Vector<P_numtype1>, double, double)
1319template<class P_numtype1>
1320inline
1321_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1322 _bz_VecExprConstant<double>,
1323 _bz_VecExprConstant<double> > >
1324where(const Vector<P_numtype1>& d1,
1325 double d2,
1326 double d3)
1327{
1328 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1329 _bz_VecExprConstant<double>,
1330 _bz_VecExprConstant<double> > T_expr;
1331
1332 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1333 _bz_VecExprConstant<double>(d2),
1334 _bz_VecExprConstant<double>(d3)));
1335}
1336
1337// where(Vector<P_numtype1>, long double, Vector<P_numtype3>)
1338template<class P_numtype1, class P_numtype3>
1339inline
1340_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1341 _bz_VecExprConstant<long double>,
1342 VectorIterConst<P_numtype3> > >
1343where(const Vector<P_numtype1>& d1,
1344 long double d2,
1345 const Vector<P_numtype3>& d3)
1346{
1347 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1348 _bz_VecExprConstant<long double>,
1349 VectorIterConst<P_numtype3> > T_expr;
1350
1351 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1352 _bz_VecExprConstant<long double>(d2),
1353 d3.begin()));
1354}
1355
1356// where(Vector<P_numtype1>, long double, _bz_VecExpr<P_expr3>)
1357template<class P_numtype1, class P_expr3>
1358inline
1359_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1360 _bz_VecExprConstant<long double>,
1361 _bz_VecExpr<P_expr3> > >
1362where(const Vector<P_numtype1>& d1,
1363 long double d2,
1364 _bz_VecExpr<P_expr3> d3)
1365{
1366 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1367 _bz_VecExprConstant<long double>,
1368 _bz_VecExpr<P_expr3> > T_expr;
1369
1370 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1371 _bz_VecExprConstant<long double>(d2),
1372 d3));
1373}
1374
1375// where(Vector<P_numtype1>, long double, VectorPick<P_numtype3>)
1376template<class P_numtype1, class P_numtype3>
1377inline
1378_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1379 _bz_VecExprConstant<long double>,
1380 VectorPickIterConst<P_numtype3> > >
1381where(const Vector<P_numtype1>& d1,
1382 long double d2,
1383 const VectorPick<P_numtype3>& d3)
1384{
1385 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1386 _bz_VecExprConstant<long double>,
1387 VectorPickIterConst<P_numtype3> > T_expr;
1388
1389 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1390 _bz_VecExprConstant<long double>(d2),
1391 d3.begin()));
1392}
1393
1394// where(Vector<P_numtype1>, long double, Range)
1395template<class P_numtype1>
1396inline
1397_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1398 _bz_VecExprConstant<long double>,
1399 Range > >
1400where(const Vector<P_numtype1>& d1,
1401 long double d2,
1402 Range d3)
1403{
1404 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1405 _bz_VecExprConstant<long double>,
1406 Range > T_expr;
1407
1408 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1409 _bz_VecExprConstant<long double>(d2),
1410 d3));
1411}
1412
1413// where(Vector<P_numtype1>, long double, TinyVector<P_numtype3, N_length3>)
1414template<class P_numtype1, class P_numtype3, int N_length3>
1415inline
1416_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1417 _bz_VecExprConstant<long double>,
1418 TinyVectorIterConst<P_numtype3, N_length3> > >
1419where(const Vector<P_numtype1>& d1,
1420 long double d2,
1421 const TinyVector<P_numtype3, N_length3>& d3)
1422{
1423 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1424 _bz_VecExprConstant<long double>,
1425 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
1426
1427 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1428 _bz_VecExprConstant<long double>(d2),
1429 d3.begin()));
1430}
1431
1432// where(Vector<P_numtype1>, long double, long double)
1433template<class P_numtype1>
1434inline
1435_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1436 _bz_VecExprConstant<long double>,
1437 _bz_VecExprConstant<long double> > >
1438where(const Vector<P_numtype1>& d1,
1439 long double d2,
1440 long double d3)
1441{
1442 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1443 _bz_VecExprConstant<long double>,
1444 _bz_VecExprConstant<long double> > T_expr;
1445
1446 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1447 _bz_VecExprConstant<long double>(d2),
1448 _bz_VecExprConstant<long double>(d3)));
1449}
1450
1451// where(Vector<P_numtype1>, complex<T2>, Vector<P_numtype3>)
1452#ifdef BZ_HAVE_COMPLEX
1453template<class P_numtype1, class T2, class P_numtype3>
1454inline
1455_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1456 _bz_VecExprConstant<complex<T2> > ,
1457 VectorIterConst<P_numtype3> > >
1458where(const Vector<P_numtype1>& d1,
1459 complex<T2> d2,
1460 const Vector<P_numtype3>& d3)
1461{
1462 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1463 _bz_VecExprConstant<complex<T2> > ,
1464 VectorIterConst<P_numtype3> > T_expr;
1465
1466 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1467 _bz_VecExprConstant<complex<T2> > (d2),
1468 d3.begin()));
1469}
1470#endif // BZ_HAVE_COMPLEX
1471
1472// where(Vector<P_numtype1>, complex<T2>, _bz_VecExpr<P_expr3>)
1473#ifdef BZ_HAVE_COMPLEX
1474template<class P_numtype1, class T2, class P_expr3>
1475inline
1476_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1477 _bz_VecExprConstant<complex<T2> > ,
1478 _bz_VecExpr<P_expr3> > >
1479where(const Vector<P_numtype1>& d1,
1480 complex<T2> d2,
1481 _bz_VecExpr<P_expr3> d3)
1482{
1483 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1484 _bz_VecExprConstant<complex<T2> > ,
1485 _bz_VecExpr<P_expr3> > T_expr;
1486
1487 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1488 _bz_VecExprConstant<complex<T2> > (d2),
1489 d3));
1490}
1491#endif // BZ_HAVE_COMPLEX
1492
1493// where(Vector<P_numtype1>, complex<T2>, VectorPick<P_numtype3>)
1494#ifdef BZ_HAVE_COMPLEX
1495template<class P_numtype1, class T2, class P_numtype3>
1496inline
1497_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1498 _bz_VecExprConstant<complex<T2> > ,
1499 VectorPickIterConst<P_numtype3> > >
1500where(const Vector<P_numtype1>& d1,
1501 complex<T2> d2,
1502 const VectorPick<P_numtype3>& d3)
1503{
1504 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1505 _bz_VecExprConstant<complex<T2> > ,
1506 VectorPickIterConst<P_numtype3> > T_expr;
1507
1508 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1509 _bz_VecExprConstant<complex<T2> > (d2),
1510 d3.begin()));
1511}
1512#endif // BZ_HAVE_COMPLEX
1513
1514// where(Vector<P_numtype1>, complex<T2>, Range)
1515#ifdef BZ_HAVE_COMPLEX
1516template<class P_numtype1, class T2>
1517inline
1518_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1519 _bz_VecExprConstant<complex<T2> > ,
1520 Range > >
1521where(const Vector<P_numtype1>& d1,
1522 complex<T2> d2,
1523 Range d3)
1524{
1525 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1526 _bz_VecExprConstant<complex<T2> > ,
1527 Range > T_expr;
1528
1529 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1530 _bz_VecExprConstant<complex<T2> > (d2),
1531 d3));
1532}
1533#endif // BZ_HAVE_COMPLEX
1534
1535// where(Vector<P_numtype1>, complex<T2>, TinyVector<P_numtype3, N_length3>)
1536#ifdef BZ_HAVE_COMPLEX
1537template<class P_numtype1, class T2, class P_numtype3, int N_length3>
1538inline
1539_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1540 _bz_VecExprConstant<complex<T2> > ,
1541 TinyVectorIterConst<P_numtype3, N_length3> > >
1542where(const Vector<P_numtype1>& d1,
1543 complex<T2> d2,
1544 const TinyVector<P_numtype3, N_length3>& d3)
1545{
1546 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1547 _bz_VecExprConstant<complex<T2> > ,
1548 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
1549
1550 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1551 _bz_VecExprConstant<complex<T2> > (d2),
1552 d3.begin()));
1553}
1554#endif // BZ_HAVE_COMPLEX
1555
1556// where(Vector<P_numtype1>, complex<T2>, complex<T3>)
1557#ifdef BZ_HAVE_COMPLEX
1558template<class P_numtype1, class T2, class T3>
1559inline
1560_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
1561 _bz_VecExprConstant<complex<T2> > ,
1562 _bz_VecExprConstant<complex<T3> > > >
1563where(const Vector<P_numtype1>& d1,
1564 complex<T2> d2,
1565 complex<T3> d3)
1566{
1567 typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
1568 _bz_VecExprConstant<complex<T2> > ,
1569 _bz_VecExprConstant<complex<T3> > > T_expr;
1570
1571 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
1572 _bz_VecExprConstant<complex<T2> > (d2),
1573 _bz_VecExprConstant<complex<T3> > (d3)));
1574}
1575#endif // BZ_HAVE_COMPLEX
1576
1577// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, Vector<P_numtype3>)
1578template<class P_expr1, class P_numtype2, class P_numtype3>
1579inline
1580_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1581 VectorIterConst<P_numtype2>,
1582 VectorIterConst<P_numtype3> > >
1583where(_bz_VecExpr<P_expr1> d1,
1584 const Vector<P_numtype2>& d2,
1585 const Vector<P_numtype3>& d3)
1586{
1587 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1588 VectorIterConst<P_numtype2>,
1589 VectorIterConst<P_numtype3> > T_expr;
1590
1591 return _bz_VecExpr<T_expr>(T_expr(d1,
1592 d2.begin(),
1593 d3.begin()));
1594}
1595
1596// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, _bz_VecExpr<P_expr3>)
1597template<class P_expr1, class P_numtype2, class P_expr3>
1598inline
1599_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1600 VectorIterConst<P_numtype2>,
1601 _bz_VecExpr<P_expr3> > >
1602where(_bz_VecExpr<P_expr1> d1,
1603 const Vector<P_numtype2>& d2,
1604 _bz_VecExpr<P_expr3> d3)
1605{
1606 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1607 VectorIterConst<P_numtype2>,
1608 _bz_VecExpr<P_expr3> > T_expr;
1609
1610 return _bz_VecExpr<T_expr>(T_expr(d1,
1611 d2.begin(),
1612 d3));
1613}
1614
1615// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, VectorPick<P_numtype3>)
1616template<class P_expr1, class P_numtype2, class P_numtype3>
1617inline
1618_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1619 VectorIterConst<P_numtype2>,
1620 VectorPickIterConst<P_numtype3> > >
1621where(_bz_VecExpr<P_expr1> d1,
1622 const Vector<P_numtype2>& d2,
1623 const VectorPick<P_numtype3>& d3)
1624{
1625 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1626 VectorIterConst<P_numtype2>,
1627 VectorPickIterConst<P_numtype3> > T_expr;
1628
1629 return _bz_VecExpr<T_expr>(T_expr(d1,
1630 d2.begin(),
1631 d3.begin()));
1632}
1633
1634// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, Range)
1635template<class P_expr1, class P_numtype2>
1636inline
1637_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1638 VectorIterConst<P_numtype2>,
1639 Range > >
1640where(_bz_VecExpr<P_expr1> d1,
1641 const Vector<P_numtype2>& d2,
1642 Range d3)
1643{
1644 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1645 VectorIterConst<P_numtype2>,
1646 Range > T_expr;
1647
1648 return _bz_VecExpr<T_expr>(T_expr(d1,
1649 d2.begin(),
1650 d3));
1651}
1652
1653// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, TinyVector<P_numtype3, N_length3>)
1654template<class P_expr1, class P_numtype2, class P_numtype3, int N_length3>
1655inline
1656_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1657 VectorIterConst<P_numtype2>,
1658 TinyVectorIterConst<P_numtype3, N_length3> > >
1659where(_bz_VecExpr<P_expr1> d1,
1660 const Vector<P_numtype2>& d2,
1661 const TinyVector<P_numtype3, N_length3>& d3)
1662{
1663 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1664 VectorIterConst<P_numtype2>,
1665 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
1666
1667 return _bz_VecExpr<T_expr>(T_expr(d1,
1668 d2.begin(),
1669 d3.begin()));
1670}
1671
1672// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, int)
1673template<class P_expr1, class P_numtype2>
1674inline
1675_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1676 VectorIterConst<P_numtype2>,
1677 _bz_VecExprConstant<int> > >
1678where(_bz_VecExpr<P_expr1> d1,
1679 const Vector<P_numtype2>& d2,
1680 int d3)
1681{
1682 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1683 VectorIterConst<P_numtype2>,
1684 _bz_VecExprConstant<int> > T_expr;
1685
1686 return _bz_VecExpr<T_expr>(T_expr(d1,
1687 d2.begin(),
1688 _bz_VecExprConstant<int>(d3)));
1689}
1690
1691// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, float)
1692template<class P_expr1, class P_numtype2>
1693inline
1694_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1695 VectorIterConst<P_numtype2>,
1696 _bz_VecExprConstant<float> > >
1697where(_bz_VecExpr<P_expr1> d1,
1698 const Vector<P_numtype2>& d2,
1699 float d3)
1700{
1701 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1702 VectorIterConst<P_numtype2>,
1703 _bz_VecExprConstant<float> > T_expr;
1704
1705 return _bz_VecExpr<T_expr>(T_expr(d1,
1706 d2.begin(),
1707 _bz_VecExprConstant<float>(d3)));
1708}
1709
1710// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, double)
1711template<class P_expr1, class P_numtype2>
1712inline
1713_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1714 VectorIterConst<P_numtype2>,
1715 _bz_VecExprConstant<double> > >
1716where(_bz_VecExpr<P_expr1> d1,
1717 const Vector<P_numtype2>& d2,
1718 double d3)
1719{
1720 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1721 VectorIterConst<P_numtype2>,
1722 _bz_VecExprConstant<double> > T_expr;
1723
1724 return _bz_VecExpr<T_expr>(T_expr(d1,
1725 d2.begin(),
1726 _bz_VecExprConstant<double>(d3)));
1727}
1728
1729// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, long double)
1730template<class P_expr1, class P_numtype2>
1731inline
1732_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1733 VectorIterConst<P_numtype2>,
1734 _bz_VecExprConstant<long double> > >
1735where(_bz_VecExpr<P_expr1> d1,
1736 const Vector<P_numtype2>& d2,
1737 long double d3)
1738{
1739 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1740 VectorIterConst<P_numtype2>,
1741 _bz_VecExprConstant<long double> > T_expr;
1742
1743 return _bz_VecExpr<T_expr>(T_expr(d1,
1744 d2.begin(),
1745 _bz_VecExprConstant<long double>(d3)));
1746}
1747
1748// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, complex<T3>)
1749#ifdef BZ_HAVE_COMPLEX
1750template<class P_expr1, class P_numtype2, class T3>
1751inline
1752_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1753 VectorIterConst<P_numtype2>,
1754 _bz_VecExprConstant<complex<T3> > > >
1755where(_bz_VecExpr<P_expr1> d1,
1756 const Vector<P_numtype2>& d2,
1757 complex<T3> d3)
1758{
1759 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1760 VectorIterConst<P_numtype2>,
1761 _bz_VecExprConstant<complex<T3> > > T_expr;
1762
1763 return _bz_VecExpr<T_expr>(T_expr(d1,
1764 d2.begin(),
1765 _bz_VecExprConstant<complex<T3> > (d3)));
1766}
1767#endif // BZ_HAVE_COMPLEX
1768
1769// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, Vector<P_numtype3>)
1770template<class P_expr1, class P_expr2, class P_numtype3>
1771inline
1772_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1773 _bz_VecExpr<P_expr2>,
1774 VectorIterConst<P_numtype3> > >
1775where(_bz_VecExpr<P_expr1> d1,
1776 _bz_VecExpr<P_expr2> d2,
1777 const Vector<P_numtype3>& d3)
1778{
1779 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1780 _bz_VecExpr<P_expr2>,
1781 VectorIterConst<P_numtype3> > T_expr;
1782
1783 return _bz_VecExpr<T_expr>(T_expr(d1,
1784 d2,
1785 d3.begin()));
1786}
1787
1788// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>)
1789template<class P_expr1, class P_expr2, class P_expr3>
1790inline
1791_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1792 _bz_VecExpr<P_expr2>,
1793 _bz_VecExpr<P_expr3> > >
1794where(_bz_VecExpr<P_expr1> d1,
1795 _bz_VecExpr<P_expr2> d2,
1796 _bz_VecExpr<P_expr3> d3)
1797{
1798 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1799 _bz_VecExpr<P_expr2>,
1800 _bz_VecExpr<P_expr3> > T_expr;
1801
1802 return _bz_VecExpr<T_expr>(T_expr(d1,
1803 d2,
1804 d3));
1805}
1806
1807// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, VectorPick<P_numtype3>)
1808template<class P_expr1, class P_expr2, class P_numtype3>
1809inline
1810_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1811 _bz_VecExpr<P_expr2>,
1812 VectorPickIterConst<P_numtype3> > >
1813where(_bz_VecExpr<P_expr1> d1,
1814 _bz_VecExpr<P_expr2> d2,
1815 const VectorPick<P_numtype3>& d3)
1816{
1817 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1818 _bz_VecExpr<P_expr2>,
1819 VectorPickIterConst<P_numtype3> > T_expr;
1820
1821 return _bz_VecExpr<T_expr>(T_expr(d1,
1822 d2,
1823 d3.begin()));
1824}
1825
1826// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, Range)
1827template<class P_expr1, class P_expr2>
1828inline
1829_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1830 _bz_VecExpr<P_expr2>,
1831 Range > >
1832where(_bz_VecExpr<P_expr1> d1,
1833 _bz_VecExpr<P_expr2> d2,
1834 Range d3)
1835{
1836 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1837 _bz_VecExpr<P_expr2>,
1838 Range > T_expr;
1839
1840 return _bz_VecExpr<T_expr>(T_expr(d1,
1841 d2,
1842 d3));
1843}
1844
1845// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, TinyVector<P_numtype3, N_length3>)
1846template<class P_expr1, class P_expr2, class P_numtype3, int N_length3>
1847inline
1848_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1849 _bz_VecExpr<P_expr2>,
1850 TinyVectorIterConst<P_numtype3, N_length3> > >
1851where(_bz_VecExpr<P_expr1> d1,
1852 _bz_VecExpr<P_expr2> d2,
1853 const TinyVector<P_numtype3, N_length3>& d3)
1854{
1855 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1856 _bz_VecExpr<P_expr2>,
1857 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
1858
1859 return _bz_VecExpr<T_expr>(T_expr(d1,
1860 d2,
1861 d3.begin()));
1862}
1863
1864// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, int)
1865template<class P_expr1, class P_expr2>
1866inline
1867_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1868 _bz_VecExpr<P_expr2>,
1869 _bz_VecExprConstant<int> > >
1870where(_bz_VecExpr<P_expr1> d1,
1871 _bz_VecExpr<P_expr2> d2,
1872 int d3)
1873{
1874 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1875 _bz_VecExpr<P_expr2>,
1876 _bz_VecExprConstant<int> > T_expr;
1877
1878 return _bz_VecExpr<T_expr>(T_expr(d1,
1879 d2,
1880 _bz_VecExprConstant<int>(d3)));
1881}
1882
1883// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, float)
1884template<class P_expr1, class P_expr2>
1885inline
1886_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1887 _bz_VecExpr<P_expr2>,
1888 _bz_VecExprConstant<float> > >
1889where(_bz_VecExpr<P_expr1> d1,
1890 _bz_VecExpr<P_expr2> d2,
1891 float d3)
1892{
1893 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1894 _bz_VecExpr<P_expr2>,
1895 _bz_VecExprConstant<float> > T_expr;
1896
1897 return _bz_VecExpr<T_expr>(T_expr(d1,
1898 d2,
1899 _bz_VecExprConstant<float>(d3)));
1900}
1901
1902// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, double)
1903template<class P_expr1, class P_expr2>
1904inline
1905_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1906 _bz_VecExpr<P_expr2>,
1907 _bz_VecExprConstant<double> > >
1908where(_bz_VecExpr<P_expr1> d1,
1909 _bz_VecExpr<P_expr2> d2,
1910 double d3)
1911{
1912 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1913 _bz_VecExpr<P_expr2>,
1914 _bz_VecExprConstant<double> > T_expr;
1915
1916 return _bz_VecExpr<T_expr>(T_expr(d1,
1917 d2,
1918 _bz_VecExprConstant<double>(d3)));
1919}
1920
1921// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, long double)
1922template<class P_expr1, class P_expr2>
1923inline
1924_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1925 _bz_VecExpr<P_expr2>,
1926 _bz_VecExprConstant<long double> > >
1927where(_bz_VecExpr<P_expr1> d1,
1928 _bz_VecExpr<P_expr2> d2,
1929 long double d3)
1930{
1931 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1932 _bz_VecExpr<P_expr2>,
1933 _bz_VecExprConstant<long double> > T_expr;
1934
1935 return _bz_VecExpr<T_expr>(T_expr(d1,
1936 d2,
1937 _bz_VecExprConstant<long double>(d3)));
1938}
1939
1940// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, complex<T3>)
1941#ifdef BZ_HAVE_COMPLEX
1942template<class P_expr1, class P_expr2, class T3>
1943inline
1944_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1945 _bz_VecExpr<P_expr2>,
1946 _bz_VecExprConstant<complex<T3> > > >
1947where(_bz_VecExpr<P_expr1> d1,
1948 _bz_VecExpr<P_expr2> d2,
1949 complex<T3> d3)
1950{
1951 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1952 _bz_VecExpr<P_expr2>,
1953 _bz_VecExprConstant<complex<T3> > > T_expr;
1954
1955 return _bz_VecExpr<T_expr>(T_expr(d1,
1956 d2,
1957 _bz_VecExprConstant<complex<T3> > (d3)));
1958}
1959#endif // BZ_HAVE_COMPLEX
1960
1961// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, Vector<P_numtype3>)
1962template<class P_expr1, class P_numtype2, class P_numtype3>
1963inline
1964_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1965 VectorPickIterConst<P_numtype2>,
1966 VectorIterConst<P_numtype3> > >
1967where(_bz_VecExpr<P_expr1> d1,
1968 const VectorPick<P_numtype2>& d2,
1969 const Vector<P_numtype3>& d3)
1970{
1971 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1972 VectorPickIterConst<P_numtype2>,
1973 VectorIterConst<P_numtype3> > T_expr;
1974
1975 return _bz_VecExpr<T_expr>(T_expr(d1,
1976 d2.begin(),
1977 d3.begin()));
1978}
1979
1980// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3>)
1981template<class P_expr1, class P_numtype2, class P_expr3>
1982inline
1983_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
1984 VectorPickIterConst<P_numtype2>,
1985 _bz_VecExpr<P_expr3> > >
1986where(_bz_VecExpr<P_expr1> d1,
1987 const VectorPick<P_numtype2>& d2,
1988 _bz_VecExpr<P_expr3> d3)
1989{
1990 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
1991 VectorPickIterConst<P_numtype2>,
1992 _bz_VecExpr<P_expr3> > T_expr;
1993
1994 return _bz_VecExpr<T_expr>(T_expr(d1,
1995 d2.begin(),
1996 d3));
1997}
1998
1999// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, VectorPick<P_numtype3>)
2000template<class P_expr1, class P_numtype2, class P_numtype3>
2001inline
2002_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2003 VectorPickIterConst<P_numtype2>,
2004 VectorPickIterConst<P_numtype3> > >
2005where(_bz_VecExpr<P_expr1> d1,
2006 const VectorPick<P_numtype2>& d2,
2007 const VectorPick<P_numtype3>& d3)
2008{
2009 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2010 VectorPickIterConst<P_numtype2>,
2011 VectorPickIterConst<P_numtype3> > T_expr;
2012
2013 return _bz_VecExpr<T_expr>(T_expr(d1,
2014 d2.begin(),
2015 d3.begin()));
2016}
2017
2018// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, Range)
2019template<class P_expr1, class P_numtype2>
2020inline
2021_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2022 VectorPickIterConst<P_numtype2>,
2023 Range > >
2024where(_bz_VecExpr<P_expr1> d1,
2025 const VectorPick<P_numtype2>& d2,
2026 Range d3)
2027{
2028 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2029 VectorPickIterConst<P_numtype2>,
2030 Range > T_expr;
2031
2032 return _bz_VecExpr<T_expr>(T_expr(d1,
2033 d2.begin(),
2034 d3));
2035}
2036
2037// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, TinyVector<P_numtype3, N_length3>)
2038template<class P_expr1, class P_numtype2, class P_numtype3, int N_length3>
2039inline
2040_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2041 VectorPickIterConst<P_numtype2>,
2042 TinyVectorIterConst<P_numtype3, N_length3> > >
2043where(_bz_VecExpr<P_expr1> d1,
2044 const VectorPick<P_numtype2>& d2,
2045 const TinyVector<P_numtype3, N_length3>& d3)
2046{
2047 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2048 VectorPickIterConst<P_numtype2>,
2049 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
2050
2051 return _bz_VecExpr<T_expr>(T_expr(d1,
2052 d2.begin(),
2053 d3.begin()));
2054}
2055
2056// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, int)
2057template<class P_expr1, class P_numtype2>
2058inline
2059_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2060 VectorPickIterConst<P_numtype2>,
2061 _bz_VecExprConstant<int> > >
2062where(_bz_VecExpr<P_expr1> d1,
2063 const VectorPick<P_numtype2>& d2,
2064 int d3)
2065{
2066 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2067 VectorPickIterConst<P_numtype2>,
2068 _bz_VecExprConstant<int> > T_expr;
2069
2070 return _bz_VecExpr<T_expr>(T_expr(d1,
2071 d2.begin(),
2072 _bz_VecExprConstant<int>(d3)));
2073}
2074
2075// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, float)
2076template<class P_expr1, class P_numtype2>
2077inline
2078_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2079 VectorPickIterConst<P_numtype2>,
2080 _bz_VecExprConstant<float> > >
2081where(_bz_VecExpr<P_expr1> d1,
2082 const VectorPick<P_numtype2>& d2,
2083 float d3)
2084{
2085 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2086 VectorPickIterConst<P_numtype2>,
2087 _bz_VecExprConstant<float> > T_expr;
2088
2089 return _bz_VecExpr<T_expr>(T_expr(d1,
2090 d2.begin(),
2091 _bz_VecExprConstant<float>(d3)));
2092}
2093
2094// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, double)
2095template<class P_expr1, class P_numtype2>
2096inline
2097_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2098 VectorPickIterConst<P_numtype2>,
2099 _bz_VecExprConstant<double> > >
2100where(_bz_VecExpr<P_expr1> d1,
2101 const VectorPick<P_numtype2>& d2,
2102 double d3)
2103{
2104 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2105 VectorPickIterConst<P_numtype2>,
2106 _bz_VecExprConstant<double> > T_expr;
2107
2108 return _bz_VecExpr<T_expr>(T_expr(d1,
2109 d2.begin(),
2110 _bz_VecExprConstant<double>(d3)));
2111}
2112
2113// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, long double)
2114template<class P_expr1, class P_numtype2>
2115inline
2116_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2117 VectorPickIterConst<P_numtype2>,
2118 _bz_VecExprConstant<long double> > >
2119where(_bz_VecExpr<P_expr1> d1,
2120 const VectorPick<P_numtype2>& d2,
2121 long double d3)
2122{
2123 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2124 VectorPickIterConst<P_numtype2>,
2125 _bz_VecExprConstant<long double> > T_expr;
2126
2127 return _bz_VecExpr<T_expr>(T_expr(d1,
2128 d2.begin(),
2129 _bz_VecExprConstant<long double>(d3)));
2130}
2131
2132// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, complex<T3>)
2133#ifdef BZ_HAVE_COMPLEX
2134template<class P_expr1, class P_numtype2, class T3>
2135inline
2136_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2137 VectorPickIterConst<P_numtype2>,
2138 _bz_VecExprConstant<complex<T3> > > >
2139where(_bz_VecExpr<P_expr1> d1,
2140 const VectorPick<P_numtype2>& d2,
2141 complex<T3> d3)
2142{
2143 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2144 VectorPickIterConst<P_numtype2>,
2145 _bz_VecExprConstant<complex<T3> > > T_expr;
2146
2147 return _bz_VecExpr<T_expr>(T_expr(d1,
2148 d2.begin(),
2149 _bz_VecExprConstant<complex<T3> > (d3)));
2150}
2151#endif // BZ_HAVE_COMPLEX
2152
2153// where(_bz_VecExpr<P_expr1>, Range, Vector<P_numtype3>)
2154template<class P_expr1, class P_numtype3>
2155inline
2156_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2157 Range,
2158 VectorIterConst<P_numtype3> > >
2159where(_bz_VecExpr<P_expr1> d1,
2160 Range d2,
2161 const Vector<P_numtype3>& d3)
2162{
2163 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2164 Range,
2165 VectorIterConst<P_numtype3> > T_expr;
2166
2167 return _bz_VecExpr<T_expr>(T_expr(d1,
2168 d2,
2169 d3.begin()));
2170}
2171
2172// where(_bz_VecExpr<P_expr1>, Range, _bz_VecExpr<P_expr3>)
2173template<class P_expr1, class P_expr3>
2174inline
2175_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2176 Range,
2177 _bz_VecExpr<P_expr3> > >
2178where(_bz_VecExpr<P_expr1> d1,
2179 Range d2,
2180 _bz_VecExpr<P_expr3> d3)
2181{
2182 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2183 Range,
2184 _bz_VecExpr<P_expr3> > T_expr;
2185
2186 return _bz_VecExpr<T_expr>(T_expr(d1,
2187 d2,
2188 d3));
2189}
2190
2191// where(_bz_VecExpr<P_expr1>, Range, VectorPick<P_numtype3>)
2192template<class P_expr1, class P_numtype3>
2193inline
2194_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2195 Range,
2196 VectorPickIterConst<P_numtype3> > >
2197where(_bz_VecExpr<P_expr1> d1,
2198 Range d2,
2199 const VectorPick<P_numtype3>& d3)
2200{
2201 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2202 Range,
2203 VectorPickIterConst<P_numtype3> > T_expr;
2204
2205 return _bz_VecExpr<T_expr>(T_expr(d1,
2206 d2,
2207 d3.begin()));
2208}
2209
2210// where(_bz_VecExpr<P_expr1>, Range, Range)
2211template<class P_expr1>
2212inline
2213_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2214 Range,
2215 Range > >
2216where(_bz_VecExpr<P_expr1> d1,
2217 Range d2,
2218 Range d3)
2219{
2220 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2221 Range,
2222 Range > T_expr;
2223
2224 return _bz_VecExpr<T_expr>(T_expr(d1,
2225 d2,
2226 d3));
2227}
2228
2229// where(_bz_VecExpr<P_expr1>, Range, TinyVector<P_numtype3, N_length3>)
2230template<class P_expr1, class P_numtype3, int N_length3>
2231inline
2232_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2233 Range,
2234 TinyVectorIterConst<P_numtype3, N_length3> > >
2235where(_bz_VecExpr<P_expr1> d1,
2236 Range d2,
2237 const TinyVector<P_numtype3, N_length3>& d3)
2238{
2239 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2240 Range,
2241 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
2242
2243 return _bz_VecExpr<T_expr>(T_expr(d1,
2244 d2,
2245 d3.begin()));
2246}
2247
2248// where(_bz_VecExpr<P_expr1>, Range, int)
2249template<class P_expr1>
2250inline
2251_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2252 Range,
2253 _bz_VecExprConstant<int> > >
2254where(_bz_VecExpr<P_expr1> d1,
2255 Range d2,
2256 int d3)
2257{
2258 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2259 Range,
2260 _bz_VecExprConstant<int> > T_expr;
2261
2262 return _bz_VecExpr<T_expr>(T_expr(d1,
2263 d2,
2264 _bz_VecExprConstant<int>(d3)));
2265}
2266
2267// where(_bz_VecExpr<P_expr1>, Range, float)
2268template<class P_expr1>
2269inline
2270_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2271 Range,
2272 _bz_VecExprConstant<float> > >
2273where(_bz_VecExpr<P_expr1> d1,
2274 Range d2,
2275 float d3)
2276{
2277 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2278 Range,
2279 _bz_VecExprConstant<float> > T_expr;
2280
2281 return _bz_VecExpr<T_expr>(T_expr(d1,
2282 d2,
2283 _bz_VecExprConstant<float>(d3)));
2284}
2285
2286// where(_bz_VecExpr<P_expr1>, Range, double)
2287template<class P_expr1>
2288inline
2289_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2290 Range,
2291 _bz_VecExprConstant<double> > >
2292where(_bz_VecExpr<P_expr1> d1,
2293 Range d2,
2294 double d3)
2295{
2296 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2297 Range,
2298 _bz_VecExprConstant<double> > T_expr;
2299
2300 return _bz_VecExpr<T_expr>(T_expr(d1,
2301 d2,
2302 _bz_VecExprConstant<double>(d3)));
2303}
2304
2305// where(_bz_VecExpr<P_expr1>, Range, long double)
2306template<class P_expr1>
2307inline
2308_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2309 Range,
2310 _bz_VecExprConstant<long double> > >
2311where(_bz_VecExpr<P_expr1> d1,
2312 Range d2,
2313 long double d3)
2314{
2315 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2316 Range,
2317 _bz_VecExprConstant<long double> > T_expr;
2318
2319 return _bz_VecExpr<T_expr>(T_expr(d1,
2320 d2,
2321 _bz_VecExprConstant<long double>(d3)));
2322}
2323
2324// where(_bz_VecExpr<P_expr1>, Range, complex<T3>)
2325#ifdef BZ_HAVE_COMPLEX
2326template<class P_expr1, class T3>
2327inline
2328_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2329 Range,
2330 _bz_VecExprConstant<complex<T3> > > >
2331where(_bz_VecExpr<P_expr1> d1,
2332 Range d2,
2333 complex<T3> d3)
2334{
2335 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2336 Range,
2337 _bz_VecExprConstant<complex<T3> > > T_expr;
2338
2339 return _bz_VecExpr<T_expr>(T_expr(d1,
2340 d2,
2341 _bz_VecExprConstant<complex<T3> > (d3)));
2342}
2343#endif // BZ_HAVE_COMPLEX
2344
2345// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, Vector<P_numtype3>)
2346template<class P_expr1, class P_numtype2, int N_length2, class P_numtype3>
2347inline
2348_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2349 TinyVectorIterConst<P_numtype2, N_length2>,
2350 VectorIterConst<P_numtype3> > >
2351where(_bz_VecExpr<P_expr1> d1,
2352 const TinyVector<P_numtype2, N_length2>& d2,
2353 const Vector<P_numtype3>& d3)
2354{
2355 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2356 TinyVectorIterConst<P_numtype2, N_length2>,
2357 VectorIterConst<P_numtype3> > T_expr;
2358
2359 return _bz_VecExpr<T_expr>(T_expr(d1,
2360 d2.begin(),
2361 d3.begin()));
2362}
2363
2364// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, _bz_VecExpr<P_expr3>)
2365template<class P_expr1, class P_numtype2, int N_length2, class P_expr3>
2366inline
2367_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2368 TinyVectorIterConst<P_numtype2, N_length2>,
2369 _bz_VecExpr<P_expr3> > >
2370where(_bz_VecExpr<P_expr1> d1,
2371 const TinyVector<P_numtype2, N_length2>& d2,
2372 _bz_VecExpr<P_expr3> d3)
2373{
2374 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2375 TinyVectorIterConst<P_numtype2, N_length2>,
2376 _bz_VecExpr<P_expr3> > T_expr;
2377
2378 return _bz_VecExpr<T_expr>(T_expr(d1,
2379 d2.begin(),
2380 d3));
2381}
2382
2383// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, VectorPick<P_numtype3>)
2384template<class P_expr1, class P_numtype2, int N_length2, class P_numtype3>
2385inline
2386_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2387 TinyVectorIterConst<P_numtype2, N_length2>,
2388 VectorPickIterConst<P_numtype3> > >
2389where(_bz_VecExpr<P_expr1> d1,
2390 const TinyVector<P_numtype2, N_length2>& d2,
2391 const VectorPick<P_numtype3>& d3)
2392{
2393 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2394 TinyVectorIterConst<P_numtype2, N_length2>,
2395 VectorPickIterConst<P_numtype3> > T_expr;
2396
2397 return _bz_VecExpr<T_expr>(T_expr(d1,
2398 d2.begin(),
2399 d3.begin()));
2400}
2401
2402// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, Range)
2403template<class P_expr1, class P_numtype2, int N_length2>
2404inline
2405_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2406 TinyVectorIterConst<P_numtype2, N_length2>,
2407 Range > >
2408where(_bz_VecExpr<P_expr1> d1,
2409 const TinyVector<P_numtype2, N_length2>& d2,
2410 Range d3)
2411{
2412 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2413 TinyVectorIterConst<P_numtype2, N_length2>,
2414 Range > T_expr;
2415
2416 return _bz_VecExpr<T_expr>(T_expr(d1,
2417 d2.begin(),
2418 d3));
2419}
2420
2421// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, TinyVector<P_numtype3, N_length3>)
2422template<class P_expr1, class P_numtype2, int N_length2, class P_numtype3, int N_length3>
2423inline
2424_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2425 TinyVectorIterConst<P_numtype2, N_length2>,
2426 TinyVectorIterConst<P_numtype3, N_length3> > >
2427where(_bz_VecExpr<P_expr1> d1,
2428 const TinyVector<P_numtype2, N_length2>& d2,
2429 const TinyVector<P_numtype3, N_length3>& d3)
2430{
2431 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2432 TinyVectorIterConst<P_numtype2, N_length2>,
2433 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
2434
2435 return _bz_VecExpr<T_expr>(T_expr(d1,
2436 d2.begin(),
2437 d3.begin()));
2438}
2439
2440// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, int)
2441template<class P_expr1, class P_numtype2, int N_length2>
2442inline
2443_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2444 TinyVectorIterConst<P_numtype2, N_length2>,
2445 _bz_VecExprConstant<int> > >
2446where(_bz_VecExpr<P_expr1> d1,
2447 const TinyVector<P_numtype2, N_length2>& d2,
2448 int d3)
2449{
2450 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2451 TinyVectorIterConst<P_numtype2, N_length2>,
2452 _bz_VecExprConstant<int> > T_expr;
2453
2454 return _bz_VecExpr<T_expr>(T_expr(d1,
2455 d2.begin(),
2456 _bz_VecExprConstant<int>(d3)));
2457}
2458
2459// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, float)
2460template<class P_expr1, class P_numtype2, int N_length2>
2461inline
2462_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2463 TinyVectorIterConst<P_numtype2, N_length2>,
2464 _bz_VecExprConstant<float> > >
2465where(_bz_VecExpr<P_expr1> d1,
2466 const TinyVector<P_numtype2, N_length2>& d2,
2467 float d3)
2468{
2469 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2470 TinyVectorIterConst<P_numtype2, N_length2>,
2471 _bz_VecExprConstant<float> > T_expr;
2472
2473 return _bz_VecExpr<T_expr>(T_expr(d1,
2474 d2.begin(),
2475 _bz_VecExprConstant<float>(d3)));
2476}
2477
2478// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, double)
2479template<class P_expr1, class P_numtype2, int N_length2>
2480inline
2481_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2482 TinyVectorIterConst<P_numtype2, N_length2>,
2483 _bz_VecExprConstant<double> > >
2484where(_bz_VecExpr<P_expr1> d1,
2485 const TinyVector<P_numtype2, N_length2>& d2,
2486 double d3)
2487{
2488 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2489 TinyVectorIterConst<P_numtype2, N_length2>,
2490 _bz_VecExprConstant<double> > T_expr;
2491
2492 return _bz_VecExpr<T_expr>(T_expr(d1,
2493 d2.begin(),
2494 _bz_VecExprConstant<double>(d3)));
2495}
2496
2497// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, long double)
2498template<class P_expr1, class P_numtype2, int N_length2>
2499inline
2500_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2501 TinyVectorIterConst<P_numtype2, N_length2>,
2502 _bz_VecExprConstant<long double> > >
2503where(_bz_VecExpr<P_expr1> d1,
2504 const TinyVector<P_numtype2, N_length2>& d2,
2505 long double d3)
2506{
2507 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2508 TinyVectorIterConst<P_numtype2, N_length2>,
2509 _bz_VecExprConstant<long double> > T_expr;
2510
2511 return _bz_VecExpr<T_expr>(T_expr(d1,
2512 d2.begin(),
2513 _bz_VecExprConstant<long double>(d3)));
2514}
2515
2516// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, complex<T3>)
2517#ifdef BZ_HAVE_COMPLEX
2518template<class P_expr1, class P_numtype2, int N_length2, class T3>
2519inline
2520_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2521 TinyVectorIterConst<P_numtype2, N_length2>,
2522 _bz_VecExprConstant<complex<T3> > > >
2523where(_bz_VecExpr<P_expr1> d1,
2524 const TinyVector<P_numtype2, N_length2>& d2,
2525 complex<T3> d3)
2526{
2527 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2528 TinyVectorIterConst<P_numtype2, N_length2>,
2529 _bz_VecExprConstant<complex<T3> > > T_expr;
2530
2531 return _bz_VecExpr<T_expr>(T_expr(d1,
2532 d2.begin(),
2533 _bz_VecExprConstant<complex<T3> > (d3)));
2534}
2535#endif // BZ_HAVE_COMPLEX
2536
2537// where(_bz_VecExpr<P_expr1>, int, Vector<P_numtype3>)
2538template<class P_expr1, class P_numtype3>
2539inline
2540_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2541 _bz_VecExprConstant<int>,
2542 VectorIterConst<P_numtype3> > >
2543where(_bz_VecExpr<P_expr1> d1,
2544 int d2,
2545 const Vector<P_numtype3>& d3)
2546{
2547 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2548 _bz_VecExprConstant<int>,
2549 VectorIterConst<P_numtype3> > T_expr;
2550
2551 return _bz_VecExpr<T_expr>(T_expr(d1,
2552 _bz_VecExprConstant<int>(d2),
2553 d3.begin()));
2554}
2555
2556// where(_bz_VecExpr<P_expr1>, int, _bz_VecExpr<P_expr3>)
2557template<class P_expr1, class P_expr3>
2558inline
2559_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2560 _bz_VecExprConstant<int>,
2561 _bz_VecExpr<P_expr3> > >
2562where(_bz_VecExpr<P_expr1> d1,
2563 int d2,
2564 _bz_VecExpr<P_expr3> d3)
2565{
2566 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2567 _bz_VecExprConstant<int>,
2568 _bz_VecExpr<P_expr3> > T_expr;
2569
2570 return _bz_VecExpr<T_expr>(T_expr(d1,
2571 _bz_VecExprConstant<int>(d2),
2572 d3));
2573}
2574
2575// where(_bz_VecExpr<P_expr1>, int, VectorPick<P_numtype3>)
2576template<class P_expr1, class P_numtype3>
2577inline
2578_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2579 _bz_VecExprConstant<int>,
2580 VectorPickIterConst<P_numtype3> > >
2581where(_bz_VecExpr<P_expr1> d1,
2582 int d2,
2583 const VectorPick<P_numtype3>& d3)
2584{
2585 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2586 _bz_VecExprConstant<int>,
2587 VectorPickIterConst<P_numtype3> > T_expr;
2588
2589 return _bz_VecExpr<T_expr>(T_expr(d1,
2590 _bz_VecExprConstant<int>(d2),
2591 d3.begin()));
2592}
2593
2594// where(_bz_VecExpr<P_expr1>, int, Range)
2595template<class P_expr1>
2596inline
2597_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2598 _bz_VecExprConstant<int>,
2599 Range > >
2600where(_bz_VecExpr<P_expr1> d1,
2601 int d2,
2602 Range d3)
2603{
2604 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2605 _bz_VecExprConstant<int>,
2606 Range > T_expr;
2607
2608 return _bz_VecExpr<T_expr>(T_expr(d1,
2609 _bz_VecExprConstant<int>(d2),
2610 d3));
2611}
2612
2613// where(_bz_VecExpr<P_expr1>, int, TinyVector<P_numtype3, N_length3>)
2614template<class P_expr1, class P_numtype3, int N_length3>
2615inline
2616_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2617 _bz_VecExprConstant<int>,
2618 TinyVectorIterConst<P_numtype3, N_length3> > >
2619where(_bz_VecExpr<P_expr1> d1,
2620 int d2,
2621 const TinyVector<P_numtype3, N_length3>& d3)
2622{
2623 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2624 _bz_VecExprConstant<int>,
2625 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
2626
2627 return _bz_VecExpr<T_expr>(T_expr(d1,
2628 _bz_VecExprConstant<int>(d2),
2629 d3.begin()));
2630}
2631
2632// where(_bz_VecExpr<P_expr1>, int, int)
2633template<class P_expr1>
2634inline
2635_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2636 _bz_VecExprConstant<int>,
2637 _bz_VecExprConstant<int> > >
2638where(_bz_VecExpr<P_expr1> d1,
2639 int d2,
2640 int d3)
2641{
2642 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2643 _bz_VecExprConstant<int>,
2644 _bz_VecExprConstant<int> > T_expr;
2645
2646 return _bz_VecExpr<T_expr>(T_expr(d1,
2647 _bz_VecExprConstant<int>(d2),
2648 _bz_VecExprConstant<int>(d3)));
2649}
2650
2651// where(_bz_VecExpr<P_expr1>, float, Vector<P_numtype3>)
2652template<class P_expr1, class P_numtype3>
2653inline
2654_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2655 _bz_VecExprConstant<float>,
2656 VectorIterConst<P_numtype3> > >
2657where(_bz_VecExpr<P_expr1> d1,
2658 float d2,
2659 const Vector<P_numtype3>& d3)
2660{
2661 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2662 _bz_VecExprConstant<float>,
2663 VectorIterConst<P_numtype3> > T_expr;
2664
2665 return _bz_VecExpr<T_expr>(T_expr(d1,
2666 _bz_VecExprConstant<float>(d2),
2667 d3.begin()));
2668}
2669
2670// where(_bz_VecExpr<P_expr1>, float, _bz_VecExpr<P_expr3>)
2671template<class P_expr1, class P_expr3>
2672inline
2673_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2674 _bz_VecExprConstant<float>,
2675 _bz_VecExpr<P_expr3> > >
2676where(_bz_VecExpr<P_expr1> d1,
2677 float d2,
2678 _bz_VecExpr<P_expr3> d3)
2679{
2680 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2681 _bz_VecExprConstant<float>,
2682 _bz_VecExpr<P_expr3> > T_expr;
2683
2684 return _bz_VecExpr<T_expr>(T_expr(d1,
2685 _bz_VecExprConstant<float>(d2),
2686 d3));
2687}
2688
2689// where(_bz_VecExpr<P_expr1>, float, VectorPick<P_numtype3>)
2690template<class P_expr1, class P_numtype3>
2691inline
2692_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2693 _bz_VecExprConstant<float>,
2694 VectorPickIterConst<P_numtype3> > >
2695where(_bz_VecExpr<P_expr1> d1,
2696 float d2,
2697 const VectorPick<P_numtype3>& d3)
2698{
2699 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2700 _bz_VecExprConstant<float>,
2701 VectorPickIterConst<P_numtype3> > T_expr;
2702
2703 return _bz_VecExpr<T_expr>(T_expr(d1,
2704 _bz_VecExprConstant<float>(d2),
2705 d3.begin()));
2706}
2707
2708// where(_bz_VecExpr<P_expr1>, float, Range)
2709template<class P_expr1>
2710inline
2711_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2712 _bz_VecExprConstant<float>,
2713 Range > >
2714where(_bz_VecExpr<P_expr1> d1,
2715 float d2,
2716 Range d3)
2717{
2718 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2719 _bz_VecExprConstant<float>,
2720 Range > T_expr;
2721
2722 return _bz_VecExpr<T_expr>(T_expr(d1,
2723 _bz_VecExprConstant<float>(d2),
2724 d3));
2725}
2726
2727// where(_bz_VecExpr<P_expr1>, float, TinyVector<P_numtype3, N_length3>)
2728template<class P_expr1, class P_numtype3, int N_length3>
2729inline
2730_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2731 _bz_VecExprConstant<float>,
2732 TinyVectorIterConst<P_numtype3, N_length3> > >
2733where(_bz_VecExpr<P_expr1> d1,
2734 float d2,
2735 const TinyVector<P_numtype3, N_length3>& d3)
2736{
2737 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2738 _bz_VecExprConstant<float>,
2739 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
2740
2741 return _bz_VecExpr<T_expr>(T_expr(d1,
2742 _bz_VecExprConstant<float>(d2),
2743 d3.begin()));
2744}
2745
2746// where(_bz_VecExpr<P_expr1>, float, float)
2747template<class P_expr1>
2748inline
2749_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2750 _bz_VecExprConstant<float>,
2751 _bz_VecExprConstant<float> > >
2752where(_bz_VecExpr<P_expr1> d1,
2753 float d2,
2754 float d3)
2755{
2756 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2757 _bz_VecExprConstant<float>,
2758 _bz_VecExprConstant<float> > T_expr;
2759
2760 return _bz_VecExpr<T_expr>(T_expr(d1,
2761 _bz_VecExprConstant<float>(d2),
2762 _bz_VecExprConstant<float>(d3)));
2763}
2764
2765// where(_bz_VecExpr<P_expr1>, double, Vector<P_numtype3>)
2766template<class P_expr1, class P_numtype3>
2767inline
2768_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2769 _bz_VecExprConstant<double>,
2770 VectorIterConst<P_numtype3> > >
2771where(_bz_VecExpr<P_expr1> d1,
2772 double d2,
2773 const Vector<P_numtype3>& d3)
2774{
2775 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2776 _bz_VecExprConstant<double>,
2777 VectorIterConst<P_numtype3> > T_expr;
2778
2779 return _bz_VecExpr<T_expr>(T_expr(d1,
2780 _bz_VecExprConstant<double>(d2),
2781 d3.begin()));
2782}
2783
2784// where(_bz_VecExpr<P_expr1>, double, _bz_VecExpr<P_expr3>)
2785template<class P_expr1, class P_expr3>
2786inline
2787_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2788 _bz_VecExprConstant<double>,
2789 _bz_VecExpr<P_expr3> > >
2790where(_bz_VecExpr<P_expr1> d1,
2791 double d2,
2792 _bz_VecExpr<P_expr3> d3)
2793{
2794 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2795 _bz_VecExprConstant<double>,
2796 _bz_VecExpr<P_expr3> > T_expr;
2797
2798 return _bz_VecExpr<T_expr>(T_expr(d1,
2799 _bz_VecExprConstant<double>(d2),
2800 d3));
2801}
2802
2803// where(_bz_VecExpr<P_expr1>, double, VectorPick<P_numtype3>)
2804template<class P_expr1, class P_numtype3>
2805inline
2806_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2807 _bz_VecExprConstant<double>,
2808 VectorPickIterConst<P_numtype3> > >
2809where(_bz_VecExpr<P_expr1> d1,
2810 double d2,
2811 const VectorPick<P_numtype3>& d3)
2812{
2813 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2814 _bz_VecExprConstant<double>,
2815 VectorPickIterConst<P_numtype3> > T_expr;
2816
2817 return _bz_VecExpr<T_expr>(T_expr(d1,
2818 _bz_VecExprConstant<double>(d2),
2819 d3.begin()));
2820}
2821
2822// where(_bz_VecExpr<P_expr1>, double, Range)
2823template<class P_expr1>
2824inline
2825_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2826 _bz_VecExprConstant<double>,
2827 Range > >
2828where(_bz_VecExpr<P_expr1> d1,
2829 double d2,
2830 Range d3)
2831{
2832 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2833 _bz_VecExprConstant<double>,
2834 Range > T_expr;
2835
2836 return _bz_VecExpr<T_expr>(T_expr(d1,
2837 _bz_VecExprConstant<double>(d2),
2838 d3));
2839}
2840
2841// where(_bz_VecExpr<P_expr1>, double, TinyVector<P_numtype3, N_length3>)
2842template<class P_expr1, class P_numtype3, int N_length3>
2843inline
2844_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2845 _bz_VecExprConstant<double>,
2846 TinyVectorIterConst<P_numtype3, N_length3> > >
2847where(_bz_VecExpr<P_expr1> d1,
2848 double d2,
2849 const TinyVector<P_numtype3, N_length3>& d3)
2850{
2851 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2852 _bz_VecExprConstant<double>,
2853 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
2854
2855 return _bz_VecExpr<T_expr>(T_expr(d1,
2856 _bz_VecExprConstant<double>(d2),
2857 d3.begin()));
2858}
2859
2860// where(_bz_VecExpr<P_expr1>, double, double)
2861template<class P_expr1>
2862inline
2863_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2864 _bz_VecExprConstant<double>,
2865 _bz_VecExprConstant<double> > >
2866where(_bz_VecExpr<P_expr1> d1,
2867 double d2,
2868 double d3)
2869{
2870 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2871 _bz_VecExprConstant<double>,
2872 _bz_VecExprConstant<double> > T_expr;
2873
2874 return _bz_VecExpr<T_expr>(T_expr(d1,
2875 _bz_VecExprConstant<double>(d2),
2876 _bz_VecExprConstant<double>(d3)));
2877}
2878
2879// where(_bz_VecExpr<P_expr1>, long double, Vector<P_numtype3>)
2880template<class P_expr1, class P_numtype3>
2881inline
2882_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2883 _bz_VecExprConstant<long double>,
2884 VectorIterConst<P_numtype3> > >
2885where(_bz_VecExpr<P_expr1> d1,
2886 long double d2,
2887 const Vector<P_numtype3>& d3)
2888{
2889 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2890 _bz_VecExprConstant<long double>,
2891 VectorIterConst<P_numtype3> > T_expr;
2892
2893 return _bz_VecExpr<T_expr>(T_expr(d1,
2894 _bz_VecExprConstant<long double>(d2),
2895 d3.begin()));
2896}
2897
2898// where(_bz_VecExpr<P_expr1>, long double, _bz_VecExpr<P_expr3>)
2899template<class P_expr1, class P_expr3>
2900inline
2901_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2902 _bz_VecExprConstant<long double>,
2903 _bz_VecExpr<P_expr3> > >
2904where(_bz_VecExpr<P_expr1> d1,
2905 long double d2,
2906 _bz_VecExpr<P_expr3> d3)
2907{
2908 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2909 _bz_VecExprConstant<long double>,
2910 _bz_VecExpr<P_expr3> > T_expr;
2911
2912 return _bz_VecExpr<T_expr>(T_expr(d1,
2913 _bz_VecExprConstant<long double>(d2),
2914 d3));
2915}
2916
2917// where(_bz_VecExpr<P_expr1>, long double, VectorPick<P_numtype3>)
2918template<class P_expr1, class P_numtype3>
2919inline
2920_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2921 _bz_VecExprConstant<long double>,
2922 VectorPickIterConst<P_numtype3> > >
2923where(_bz_VecExpr<P_expr1> d1,
2924 long double d2,
2925 const VectorPick<P_numtype3>& d3)
2926{
2927 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2928 _bz_VecExprConstant<long double>,
2929 VectorPickIterConst<P_numtype3> > T_expr;
2930
2931 return _bz_VecExpr<T_expr>(T_expr(d1,
2932 _bz_VecExprConstant<long double>(d2),
2933 d3.begin()));
2934}
2935
2936// where(_bz_VecExpr<P_expr1>, long double, Range)
2937template<class P_expr1>
2938inline
2939_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2940 _bz_VecExprConstant<long double>,
2941 Range > >
2942where(_bz_VecExpr<P_expr1> d1,
2943 long double d2,
2944 Range d3)
2945{
2946 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2947 _bz_VecExprConstant<long double>,
2948 Range > T_expr;
2949
2950 return _bz_VecExpr<T_expr>(T_expr(d1,
2951 _bz_VecExprConstant<long double>(d2),
2952 d3));
2953}
2954
2955// where(_bz_VecExpr<P_expr1>, long double, TinyVector<P_numtype3, N_length3>)
2956template<class P_expr1, class P_numtype3, int N_length3>
2957inline
2958_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2959 _bz_VecExprConstant<long double>,
2960 TinyVectorIterConst<P_numtype3, N_length3> > >
2961where(_bz_VecExpr<P_expr1> d1,
2962 long double d2,
2963 const TinyVector<P_numtype3, N_length3>& d3)
2964{
2965 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2966 _bz_VecExprConstant<long double>,
2967 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
2968
2969 return _bz_VecExpr<T_expr>(T_expr(d1,
2970 _bz_VecExprConstant<long double>(d2),
2971 d3.begin()));
2972}
2973
2974// where(_bz_VecExpr<P_expr1>, long double, long double)
2975template<class P_expr1>
2976inline
2977_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2978 _bz_VecExprConstant<long double>,
2979 _bz_VecExprConstant<long double> > >
2980where(_bz_VecExpr<P_expr1> d1,
2981 long double d2,
2982 long double d3)
2983{
2984 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
2985 _bz_VecExprConstant<long double>,
2986 _bz_VecExprConstant<long double> > T_expr;
2987
2988 return _bz_VecExpr<T_expr>(T_expr(d1,
2989 _bz_VecExprConstant<long double>(d2),
2990 _bz_VecExprConstant<long double>(d3)));
2991}
2992
2993// where(_bz_VecExpr<P_expr1>, complex<T2>, Vector<P_numtype3>)
2994#ifdef BZ_HAVE_COMPLEX
2995template<class P_expr1, class T2, class P_numtype3>
2996inline
2997_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
2998 _bz_VecExprConstant<complex<T2> > ,
2999 VectorIterConst<P_numtype3> > >
3000where(_bz_VecExpr<P_expr1> d1,
3001 complex<T2> d2,
3002 const Vector<P_numtype3>& d3)
3003{
3004 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
3005 _bz_VecExprConstant<complex<T2> > ,
3006 VectorIterConst<P_numtype3> > T_expr;
3007
3008 return _bz_VecExpr<T_expr>(T_expr(d1,
3009 _bz_VecExprConstant<complex<T2> > (d2),
3010 d3.begin()));
3011}
3012#endif // BZ_HAVE_COMPLEX
3013
3014// where(_bz_VecExpr<P_expr1>, complex<T2>, _bz_VecExpr<P_expr3>)
3015#ifdef BZ_HAVE_COMPLEX
3016template<class P_expr1, class T2, class P_expr3>
3017inline
3018_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
3019 _bz_VecExprConstant<complex<T2> > ,
3020 _bz_VecExpr<P_expr3> > >
3021where(_bz_VecExpr<P_expr1> d1,
3022 complex<T2> d2,
3023 _bz_VecExpr<P_expr3> d3)
3024{
3025 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
3026 _bz_VecExprConstant<complex<T2> > ,
3027 _bz_VecExpr<P_expr3> > T_expr;
3028
3029 return _bz_VecExpr<T_expr>(T_expr(d1,
3030 _bz_VecExprConstant<complex<T2> > (d2),
3031 d3));
3032}
3033#endif // BZ_HAVE_COMPLEX
3034
3035// where(_bz_VecExpr<P_expr1>, complex<T2>, VectorPick<P_numtype3>)
3036#ifdef BZ_HAVE_COMPLEX
3037template<class P_expr1, class T2, class P_numtype3>
3038inline
3039_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
3040 _bz_VecExprConstant<complex<T2> > ,
3041 VectorPickIterConst<P_numtype3> > >
3042where(_bz_VecExpr<P_expr1> d1,
3043 complex<T2> d2,
3044 const VectorPick<P_numtype3>& d3)
3045{
3046 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
3047 _bz_VecExprConstant<complex<T2> > ,
3048 VectorPickIterConst<P_numtype3> > T_expr;
3049
3050 return _bz_VecExpr<T_expr>(T_expr(d1,
3051 _bz_VecExprConstant<complex<T2> > (d2),
3052 d3.begin()));
3053}
3054#endif // BZ_HAVE_COMPLEX
3055
3056// where(_bz_VecExpr<P_expr1>, complex<T2>, Range)
3057#ifdef BZ_HAVE_COMPLEX
3058template<class P_expr1, class T2>
3059inline
3060_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
3061 _bz_VecExprConstant<complex<T2> > ,
3062 Range > >
3063where(_bz_VecExpr<P_expr1> d1,
3064 complex<T2> d2,
3065 Range d3)
3066{
3067 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
3068 _bz_VecExprConstant<complex<T2> > ,
3069 Range > T_expr;
3070
3071 return _bz_VecExpr<T_expr>(T_expr(d1,
3072 _bz_VecExprConstant<complex<T2> > (d2),
3073 d3));
3074}
3075#endif // BZ_HAVE_COMPLEX
3076
3077// where(_bz_VecExpr<P_expr1>, complex<T2>, TinyVector<P_numtype3, N_length3>)
3078#ifdef BZ_HAVE_COMPLEX
3079template<class P_expr1, class T2, class P_numtype3, int N_length3>
3080inline
3081_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
3082 _bz_VecExprConstant<complex<T2> > ,
3083 TinyVectorIterConst<P_numtype3, N_length3> > >
3084where(_bz_VecExpr<P_expr1> d1,
3085 complex<T2> d2,
3086 const TinyVector<P_numtype3, N_length3>& d3)
3087{
3088 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
3089 _bz_VecExprConstant<complex<T2> > ,
3090 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
3091
3092 return _bz_VecExpr<T_expr>(T_expr(d1,
3093 _bz_VecExprConstant<complex<T2> > (d2),
3094 d3.begin()));
3095}
3096#endif // BZ_HAVE_COMPLEX
3097
3098// where(_bz_VecExpr<P_expr1>, complex<T2>, complex<T3>)
3099#ifdef BZ_HAVE_COMPLEX
3100template<class P_expr1, class T2, class T3>
3101inline
3102_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
3103 _bz_VecExprConstant<complex<T2> > ,
3104 _bz_VecExprConstant<complex<T3> > > >
3105where(_bz_VecExpr<P_expr1> d1,
3106 complex<T2> d2,
3107 complex<T3> d3)
3108{
3109 typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
3110 _bz_VecExprConstant<complex<T2> > ,
3111 _bz_VecExprConstant<complex<T3> > > T_expr;
3112
3113 return _bz_VecExpr<T_expr>(T_expr(d1,
3114 _bz_VecExprConstant<complex<T2> > (d2),
3115 _bz_VecExprConstant<complex<T3> > (d3)));
3116}
3117#endif // BZ_HAVE_COMPLEX
3118
3119// where(VectorPick<P_numtype1>, Vector<P_numtype2>, Vector<P_numtype3>)
3120template<class P_numtype1, class P_numtype2, class P_numtype3>
3121inline
3122_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3123 VectorIterConst<P_numtype2>,
3124 VectorIterConst<P_numtype3> > >
3125where(const VectorPick<P_numtype1>& d1,
3126 const Vector<P_numtype2>& d2,
3127 const Vector<P_numtype3>& d3)
3128{
3129 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3130 VectorIterConst<P_numtype2>,
3131 VectorIterConst<P_numtype3> > T_expr;
3132
3133 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3134 d2.begin(),
3135 d3.begin()));
3136}
3137
3138// where(VectorPick<P_numtype1>, Vector<P_numtype2>, _bz_VecExpr<P_expr3>)
3139template<class P_numtype1, class P_numtype2, class P_expr3>
3140inline
3141_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3142 VectorIterConst<P_numtype2>,
3143 _bz_VecExpr<P_expr3> > >
3144where(const VectorPick<P_numtype1>& d1,
3145 const Vector<P_numtype2>& d2,
3146 _bz_VecExpr<P_expr3> d3)
3147{
3148 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3149 VectorIterConst<P_numtype2>,
3150 _bz_VecExpr<P_expr3> > T_expr;
3151
3152 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3153 d2.begin(),
3154 d3));
3155}
3156
3157// where(VectorPick<P_numtype1>, Vector<P_numtype2>, VectorPick<P_numtype3>)
3158template<class P_numtype1, class P_numtype2, class P_numtype3>
3159inline
3160_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3161 VectorIterConst<P_numtype2>,
3162 VectorPickIterConst<P_numtype3> > >
3163where(const VectorPick<P_numtype1>& d1,
3164 const Vector<P_numtype2>& d2,
3165 const VectorPick<P_numtype3>& d3)
3166{
3167 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3168 VectorIterConst<P_numtype2>,
3169 VectorPickIterConst<P_numtype3> > T_expr;
3170
3171 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3172 d2.begin(),
3173 d3.begin()));
3174}
3175
3176// where(VectorPick<P_numtype1>, Vector<P_numtype2>, Range)
3177template<class P_numtype1, class P_numtype2>
3178inline
3179_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3180 VectorIterConst<P_numtype2>,
3181 Range > >
3182where(const VectorPick<P_numtype1>& d1,
3183 const Vector<P_numtype2>& d2,
3184 Range d3)
3185{
3186 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3187 VectorIterConst<P_numtype2>,
3188 Range > T_expr;
3189
3190 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3191 d2.begin(),
3192 d3));
3193}
3194
3195// where(VectorPick<P_numtype1>, Vector<P_numtype2>, TinyVector<P_numtype3, N_length3>)
3196template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length3>
3197inline
3198_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3199 VectorIterConst<P_numtype2>,
3200 TinyVectorIterConst<P_numtype3, N_length3> > >
3201where(const VectorPick<P_numtype1>& d1,
3202 const Vector<P_numtype2>& d2,
3203 const TinyVector<P_numtype3, N_length3>& d3)
3204{
3205 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3206 VectorIterConst<P_numtype2>,
3207 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
3208
3209 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3210 d2.begin(),
3211 d3.begin()));
3212}
3213
3214// where(VectorPick<P_numtype1>, Vector<P_numtype2>, int)
3215template<class P_numtype1, class P_numtype2>
3216inline
3217_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3218 VectorIterConst<P_numtype2>,
3219 _bz_VecExprConstant<int> > >
3220where(const VectorPick<P_numtype1>& d1,
3221 const Vector<P_numtype2>& d2,
3222 int d3)
3223{
3224 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3225 VectorIterConst<P_numtype2>,
3226 _bz_VecExprConstant<int> > T_expr;
3227
3228 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3229 d2.begin(),
3230 _bz_VecExprConstant<int>(d3)));
3231}
3232
3233// where(VectorPick<P_numtype1>, Vector<P_numtype2>, float)
3234template<class P_numtype1, class P_numtype2>
3235inline
3236_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3237 VectorIterConst<P_numtype2>,
3238 _bz_VecExprConstant<float> > >
3239where(const VectorPick<P_numtype1>& d1,
3240 const Vector<P_numtype2>& d2,
3241 float d3)
3242{
3243 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3244 VectorIterConst<P_numtype2>,
3245 _bz_VecExprConstant<float> > T_expr;
3246
3247 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3248 d2.begin(),
3249 _bz_VecExprConstant<float>(d3)));
3250}
3251
3252// where(VectorPick<P_numtype1>, Vector<P_numtype2>, double)
3253template<class P_numtype1, class P_numtype2>
3254inline
3255_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3256 VectorIterConst<P_numtype2>,
3257 _bz_VecExprConstant<double> > >
3258where(const VectorPick<P_numtype1>& d1,
3259 const Vector<P_numtype2>& d2,
3260 double d3)
3261{
3262 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3263 VectorIterConst<P_numtype2>,
3264 _bz_VecExprConstant<double> > T_expr;
3265
3266 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3267 d2.begin(),
3268 _bz_VecExprConstant<double>(d3)));
3269}
3270
3271// where(VectorPick<P_numtype1>, Vector<P_numtype2>, long double)
3272template<class P_numtype1, class P_numtype2>
3273inline
3274_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3275 VectorIterConst<P_numtype2>,
3276 _bz_VecExprConstant<long double> > >
3277where(const VectorPick<P_numtype1>& d1,
3278 const Vector<P_numtype2>& d2,
3279 long double d3)
3280{
3281 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3282 VectorIterConst<P_numtype2>,
3283 _bz_VecExprConstant<long double> > T_expr;
3284
3285 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3286 d2.begin(),
3287 _bz_VecExprConstant<long double>(d3)));
3288}
3289
3290// where(VectorPick<P_numtype1>, Vector<P_numtype2>, complex<T3>)
3291#ifdef BZ_HAVE_COMPLEX
3292template<class P_numtype1, class P_numtype2, class T3>
3293inline
3294_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3295 VectorIterConst<P_numtype2>,
3296 _bz_VecExprConstant<complex<T3> > > >
3297where(const VectorPick<P_numtype1>& d1,
3298 const Vector<P_numtype2>& d2,
3299 complex<T3> d3)
3300{
3301 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3302 VectorIterConst<P_numtype2>,
3303 _bz_VecExprConstant<complex<T3> > > T_expr;
3304
3305 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3306 d2.begin(),
3307 _bz_VecExprConstant<complex<T3> > (d3)));
3308}
3309#endif // BZ_HAVE_COMPLEX
3310
3311// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, Vector<P_numtype3>)
3312template<class P_numtype1, class P_expr2, class P_numtype3>
3313inline
3314_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3315 _bz_VecExpr<P_expr2>,
3316 VectorIterConst<P_numtype3> > >
3317where(const VectorPick<P_numtype1>& d1,
3318 _bz_VecExpr<P_expr2> d2,
3319 const Vector<P_numtype3>& d3)
3320{
3321 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3322 _bz_VecExpr<P_expr2>,
3323 VectorIterConst<P_numtype3> > T_expr;
3324
3325 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3326 d2,
3327 d3.begin()));
3328}
3329
3330// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>)
3331template<class P_numtype1, class P_expr2, class P_expr3>
3332inline
3333_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3334 _bz_VecExpr<P_expr2>,
3335 _bz_VecExpr<P_expr3> > >
3336where(const VectorPick<P_numtype1>& d1,
3337 _bz_VecExpr<P_expr2> d2,
3338 _bz_VecExpr<P_expr3> d3)
3339{
3340 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3341 _bz_VecExpr<P_expr2>,
3342 _bz_VecExpr<P_expr3> > T_expr;
3343
3344 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3345 d2,
3346 d3));
3347}
3348
3349// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, VectorPick<P_numtype3>)
3350template<class P_numtype1, class P_expr2, class P_numtype3>
3351inline
3352_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3353 _bz_VecExpr<P_expr2>,
3354 VectorPickIterConst<P_numtype3> > >
3355where(const VectorPick<P_numtype1>& d1,
3356 _bz_VecExpr<P_expr2> d2,
3357 const VectorPick<P_numtype3>& d3)
3358{
3359 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3360 _bz_VecExpr<P_expr2>,
3361 VectorPickIterConst<P_numtype3> > T_expr;
3362
3363 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3364 d2,
3365 d3.begin()));
3366}
3367
3368// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, Range)
3369template<class P_numtype1, class P_expr2>
3370inline
3371_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3372 _bz_VecExpr<P_expr2>,
3373 Range > >
3374where(const VectorPick<P_numtype1>& d1,
3375 _bz_VecExpr<P_expr2> d2,
3376 Range d3)
3377{
3378 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3379 _bz_VecExpr<P_expr2>,
3380 Range > T_expr;
3381
3382 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3383 d2,
3384 d3));
3385}
3386
3387// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, TinyVector<P_numtype3, N_length3>)
3388template<class P_numtype1, class P_expr2, class P_numtype3, int N_length3>
3389inline
3390_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3391 _bz_VecExpr<P_expr2>,
3392 TinyVectorIterConst<P_numtype3, N_length3> > >
3393where(const VectorPick<P_numtype1>& d1,
3394 _bz_VecExpr<P_expr2> d2,
3395 const TinyVector<P_numtype3, N_length3>& d3)
3396{
3397 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3398 _bz_VecExpr<P_expr2>,
3399 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
3400
3401 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3402 d2,
3403 d3.begin()));
3404}
3405
3406// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, int)
3407template<class P_numtype1, class P_expr2>
3408inline
3409_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3410 _bz_VecExpr<P_expr2>,
3411 _bz_VecExprConstant<int> > >
3412where(const VectorPick<P_numtype1>& d1,
3413 _bz_VecExpr<P_expr2> d2,
3414 int d3)
3415{
3416 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3417 _bz_VecExpr<P_expr2>,
3418 _bz_VecExprConstant<int> > T_expr;
3419
3420 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3421 d2,
3422 _bz_VecExprConstant<int>(d3)));
3423}
3424
3425// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, float)
3426template<class P_numtype1, class P_expr2>
3427inline
3428_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3429 _bz_VecExpr<P_expr2>,
3430 _bz_VecExprConstant<float> > >
3431where(const VectorPick<P_numtype1>& d1,
3432 _bz_VecExpr<P_expr2> d2,
3433 float d3)
3434{
3435 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3436 _bz_VecExpr<P_expr2>,
3437 _bz_VecExprConstant<float> > T_expr;
3438
3439 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3440 d2,
3441 _bz_VecExprConstant<float>(d3)));
3442}
3443
3444// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, double)
3445template<class P_numtype1, class P_expr2>
3446inline
3447_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3448 _bz_VecExpr<P_expr2>,
3449 _bz_VecExprConstant<double> > >
3450where(const VectorPick<P_numtype1>& d1,
3451 _bz_VecExpr<P_expr2> d2,
3452 double d3)
3453{
3454 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3455 _bz_VecExpr<P_expr2>,
3456 _bz_VecExprConstant<double> > T_expr;
3457
3458 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3459 d2,
3460 _bz_VecExprConstant<double>(d3)));
3461}
3462
3463// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, long double)
3464template<class P_numtype1, class P_expr2>
3465inline
3466_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3467 _bz_VecExpr<P_expr2>,
3468 _bz_VecExprConstant<long double> > >
3469where(const VectorPick<P_numtype1>& d1,
3470 _bz_VecExpr<P_expr2> d2,
3471 long double d3)
3472{
3473 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3474 _bz_VecExpr<P_expr2>,
3475 _bz_VecExprConstant<long double> > T_expr;
3476
3477 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3478 d2,
3479 _bz_VecExprConstant<long double>(d3)));
3480}
3481
3482// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, complex<T3>)
3483#ifdef BZ_HAVE_COMPLEX
3484template<class P_numtype1, class P_expr2, class T3>
3485inline
3486_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3487 _bz_VecExpr<P_expr2>,
3488 _bz_VecExprConstant<complex<T3> > > >
3489where(const VectorPick<P_numtype1>& d1,
3490 _bz_VecExpr<P_expr2> d2,
3491 complex<T3> d3)
3492{
3493 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3494 _bz_VecExpr<P_expr2>,
3495 _bz_VecExprConstant<complex<T3> > > T_expr;
3496
3497 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3498 d2,
3499 _bz_VecExprConstant<complex<T3> > (d3)));
3500}
3501#endif // BZ_HAVE_COMPLEX
3502
3503// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, Vector<P_numtype3>)
3504template<class P_numtype1, class P_numtype2, class P_numtype3>
3505inline
3506_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3507 VectorPickIterConst<P_numtype2>,
3508 VectorIterConst<P_numtype3> > >
3509where(const VectorPick<P_numtype1>& d1,
3510 const VectorPick<P_numtype2>& d2,
3511 const Vector<P_numtype3>& d3)
3512{
3513 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3514 VectorPickIterConst<P_numtype2>,
3515 VectorIterConst<P_numtype3> > T_expr;
3516
3517 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3518 d2.begin(),
3519 d3.begin()));
3520}
3521
3522// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3>)
3523template<class P_numtype1, class P_numtype2, class P_expr3>
3524inline
3525_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3526 VectorPickIterConst<P_numtype2>,
3527 _bz_VecExpr<P_expr3> > >
3528where(const VectorPick<P_numtype1>& d1,
3529 const VectorPick<P_numtype2>& d2,
3530 _bz_VecExpr<P_expr3> d3)
3531{
3532 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3533 VectorPickIterConst<P_numtype2>,
3534 _bz_VecExpr<P_expr3> > T_expr;
3535
3536 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3537 d2.begin(),
3538 d3));
3539}
3540
3541// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, VectorPick<P_numtype3>)
3542template<class P_numtype1, class P_numtype2, class P_numtype3>
3543inline
3544_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3545 VectorPickIterConst<P_numtype2>,
3546 VectorPickIterConst<P_numtype3> > >
3547where(const VectorPick<P_numtype1>& d1,
3548 const VectorPick<P_numtype2>& d2,
3549 const VectorPick<P_numtype3>& d3)
3550{
3551 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3552 VectorPickIterConst<P_numtype2>,
3553 VectorPickIterConst<P_numtype3> > T_expr;
3554
3555 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3556 d2.begin(),
3557 d3.begin()));
3558}
3559
3560// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, Range)
3561template<class P_numtype1, class P_numtype2>
3562inline
3563_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3564 VectorPickIterConst<P_numtype2>,
3565 Range > >
3566where(const VectorPick<P_numtype1>& d1,
3567 const VectorPick<P_numtype2>& d2,
3568 Range d3)
3569{
3570 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3571 VectorPickIterConst<P_numtype2>,
3572 Range > T_expr;
3573
3574 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3575 d2.begin(),
3576 d3));
3577}
3578
3579// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, TinyVector<P_numtype3, N_length3>)
3580template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length3>
3581inline
3582_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3583 VectorPickIterConst<P_numtype2>,
3584 TinyVectorIterConst<P_numtype3, N_length3> > >
3585where(const VectorPick<P_numtype1>& d1,
3586 const VectorPick<P_numtype2>& d2,
3587 const TinyVector<P_numtype3, N_length3>& d3)
3588{
3589 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3590 VectorPickIterConst<P_numtype2>,
3591 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
3592
3593 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3594 d2.begin(),
3595 d3.begin()));
3596}
3597
3598// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, int)
3599template<class P_numtype1, class P_numtype2>
3600inline
3601_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3602 VectorPickIterConst<P_numtype2>,
3603 _bz_VecExprConstant<int> > >
3604where(const VectorPick<P_numtype1>& d1,
3605 const VectorPick<P_numtype2>& d2,
3606 int d3)
3607{
3608 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3609 VectorPickIterConst<P_numtype2>,
3610 _bz_VecExprConstant<int> > T_expr;
3611
3612 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3613 d2.begin(),
3614 _bz_VecExprConstant<int>(d3)));
3615}
3616
3617// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, float)
3618template<class P_numtype1, class P_numtype2>
3619inline
3620_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3621 VectorPickIterConst<P_numtype2>,
3622 _bz_VecExprConstant<float> > >
3623where(const VectorPick<P_numtype1>& d1,
3624 const VectorPick<P_numtype2>& d2,
3625 float d3)
3626{
3627 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3628 VectorPickIterConst<P_numtype2>,
3629 _bz_VecExprConstant<float> > T_expr;
3630
3631 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3632 d2.begin(),
3633 _bz_VecExprConstant<float>(d3)));
3634}
3635
3636// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, double)
3637template<class P_numtype1, class P_numtype2>
3638inline
3639_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3640 VectorPickIterConst<P_numtype2>,
3641 _bz_VecExprConstant<double> > >
3642where(const VectorPick<P_numtype1>& d1,
3643 const VectorPick<P_numtype2>& d2,
3644 double d3)
3645{
3646 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3647 VectorPickIterConst<P_numtype2>,
3648 _bz_VecExprConstant<double> > T_expr;
3649
3650 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3651 d2.begin(),
3652 _bz_VecExprConstant<double>(d3)));
3653}
3654
3655// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, long double)
3656template<class P_numtype1, class P_numtype2>
3657inline
3658_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3659 VectorPickIterConst<P_numtype2>,
3660 _bz_VecExprConstant<long double> > >
3661where(const VectorPick<P_numtype1>& d1,
3662 const VectorPick<P_numtype2>& d2,
3663 long double d3)
3664{
3665 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3666 VectorPickIterConst<P_numtype2>,
3667 _bz_VecExprConstant<long double> > T_expr;
3668
3669 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3670 d2.begin(),
3671 _bz_VecExprConstant<long double>(d3)));
3672}
3673
3674// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, complex<T3>)
3675#ifdef BZ_HAVE_COMPLEX
3676template<class P_numtype1, class P_numtype2, class T3>
3677inline
3678_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3679 VectorPickIterConst<P_numtype2>,
3680 _bz_VecExprConstant<complex<T3> > > >
3681where(const VectorPick<P_numtype1>& d1,
3682 const VectorPick<P_numtype2>& d2,
3683 complex<T3> d3)
3684{
3685 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3686 VectorPickIterConst<P_numtype2>,
3687 _bz_VecExprConstant<complex<T3> > > T_expr;
3688
3689 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3690 d2.begin(),
3691 _bz_VecExprConstant<complex<T3> > (d3)));
3692}
3693#endif // BZ_HAVE_COMPLEX
3694
3695// where(VectorPick<P_numtype1>, Range, Vector<P_numtype3>)
3696template<class P_numtype1, class P_numtype3>
3697inline
3698_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3699 Range,
3700 VectorIterConst<P_numtype3> > >
3701where(const VectorPick<P_numtype1>& d1,
3702 Range d2,
3703 const Vector<P_numtype3>& d3)
3704{
3705 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3706 Range,
3707 VectorIterConst<P_numtype3> > T_expr;
3708
3709 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3710 d2,
3711 d3.begin()));
3712}
3713
3714// where(VectorPick<P_numtype1>, Range, _bz_VecExpr<P_expr3>)
3715template<class P_numtype1, class P_expr3>
3716inline
3717_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3718 Range,
3719 _bz_VecExpr<P_expr3> > >
3720where(const VectorPick<P_numtype1>& d1,
3721 Range d2,
3722 _bz_VecExpr<P_expr3> d3)
3723{
3724 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3725 Range,
3726 _bz_VecExpr<P_expr3> > T_expr;
3727
3728 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3729 d2,
3730 d3));
3731}
3732
3733// where(VectorPick<P_numtype1>, Range, VectorPick<P_numtype3>)
3734template<class P_numtype1, class P_numtype3>
3735inline
3736_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3737 Range,
3738 VectorPickIterConst<P_numtype3> > >
3739where(const VectorPick<P_numtype1>& d1,
3740 Range d2,
3741 const VectorPick<P_numtype3>& d3)
3742{
3743 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3744 Range,
3745 VectorPickIterConst<P_numtype3> > T_expr;
3746
3747 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3748 d2,
3749 d3.begin()));
3750}
3751
3752// where(VectorPick<P_numtype1>, Range, Range)
3753template<class P_numtype1>
3754inline
3755_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3756 Range,
3757 Range > >
3758where(const VectorPick<P_numtype1>& d1,
3759 Range d2,
3760 Range d3)
3761{
3762 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3763 Range,
3764 Range > T_expr;
3765
3766 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3767 d2,
3768 d3));
3769}
3770
3771// where(VectorPick<P_numtype1>, Range, TinyVector<P_numtype3, N_length3>)
3772template<class P_numtype1, class P_numtype3, int N_length3>
3773inline
3774_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3775 Range,
3776 TinyVectorIterConst<P_numtype3, N_length3> > >
3777where(const VectorPick<P_numtype1>& d1,
3778 Range d2,
3779 const TinyVector<P_numtype3, N_length3>& d3)
3780{
3781 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3782 Range,
3783 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
3784
3785 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3786 d2,
3787 d3.begin()));
3788}
3789
3790// where(VectorPick<P_numtype1>, Range, int)
3791template<class P_numtype1>
3792inline
3793_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3794 Range,
3795 _bz_VecExprConstant<int> > >
3796where(const VectorPick<P_numtype1>& d1,
3797 Range d2,
3798 int d3)
3799{
3800 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3801 Range,
3802 _bz_VecExprConstant<int> > T_expr;
3803
3804 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3805 d2,
3806 _bz_VecExprConstant<int>(d3)));
3807}
3808
3809// where(VectorPick<P_numtype1>, Range, float)
3810template<class P_numtype1>
3811inline
3812_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3813 Range,
3814 _bz_VecExprConstant<float> > >
3815where(const VectorPick<P_numtype1>& d1,
3816 Range d2,
3817 float d3)
3818{
3819 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3820 Range,
3821 _bz_VecExprConstant<float> > T_expr;
3822
3823 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3824 d2,
3825 _bz_VecExprConstant<float>(d3)));
3826}
3827
3828// where(VectorPick<P_numtype1>, Range, double)
3829template<class P_numtype1>
3830inline
3831_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3832 Range,
3833 _bz_VecExprConstant<double> > >
3834where(const VectorPick<P_numtype1>& d1,
3835 Range d2,
3836 double d3)
3837{
3838 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3839 Range,
3840 _bz_VecExprConstant<double> > T_expr;
3841
3842 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3843 d2,
3844 _bz_VecExprConstant<double>(d3)));
3845}
3846
3847// where(VectorPick<P_numtype1>, Range, long double)
3848template<class P_numtype1>
3849inline
3850_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3851 Range,
3852 _bz_VecExprConstant<long double> > >
3853where(const VectorPick<P_numtype1>& d1,
3854 Range d2,
3855 long double d3)
3856{
3857 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3858 Range,
3859 _bz_VecExprConstant<long double> > T_expr;
3860
3861 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3862 d2,
3863 _bz_VecExprConstant<long double>(d3)));
3864}
3865
3866// where(VectorPick<P_numtype1>, Range, complex<T3>)
3867#ifdef BZ_HAVE_COMPLEX
3868template<class P_numtype1, class T3>
3869inline
3870_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3871 Range,
3872 _bz_VecExprConstant<complex<T3> > > >
3873where(const VectorPick<P_numtype1>& d1,
3874 Range d2,
3875 complex<T3> d3)
3876{
3877 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3878 Range,
3879 _bz_VecExprConstant<complex<T3> > > T_expr;
3880
3881 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3882 d2,
3883 _bz_VecExprConstant<complex<T3> > (d3)));
3884}
3885#endif // BZ_HAVE_COMPLEX
3886
3887// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, Vector<P_numtype3>)
3888template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype3>
3889inline
3890_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3891 TinyVectorIterConst<P_numtype2, N_length2>,
3892 VectorIterConst<P_numtype3> > >
3893where(const VectorPick<P_numtype1>& d1,
3894 const TinyVector<P_numtype2, N_length2>& d2,
3895 const Vector<P_numtype3>& d3)
3896{
3897 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3898 TinyVectorIterConst<P_numtype2, N_length2>,
3899 VectorIterConst<P_numtype3> > T_expr;
3900
3901 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3902 d2.begin(),
3903 d3.begin()));
3904}
3905
3906// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, _bz_VecExpr<P_expr3>)
3907template<class P_numtype1, class P_numtype2, int N_length2, class P_expr3>
3908inline
3909_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3910 TinyVectorIterConst<P_numtype2, N_length2>,
3911 _bz_VecExpr<P_expr3> > >
3912where(const VectorPick<P_numtype1>& d1,
3913 const TinyVector<P_numtype2, N_length2>& d2,
3914 _bz_VecExpr<P_expr3> d3)
3915{
3916 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3917 TinyVectorIterConst<P_numtype2, N_length2>,
3918 _bz_VecExpr<P_expr3> > T_expr;
3919
3920 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3921 d2.begin(),
3922 d3));
3923}
3924
3925// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, VectorPick<P_numtype3>)
3926template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype3>
3927inline
3928_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3929 TinyVectorIterConst<P_numtype2, N_length2>,
3930 VectorPickIterConst<P_numtype3> > >
3931where(const VectorPick<P_numtype1>& d1,
3932 const TinyVector<P_numtype2, N_length2>& d2,
3933 const VectorPick<P_numtype3>& d3)
3934{
3935 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3936 TinyVectorIterConst<P_numtype2, N_length2>,
3937 VectorPickIterConst<P_numtype3> > T_expr;
3938
3939 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3940 d2.begin(),
3941 d3.begin()));
3942}
3943
3944// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, Range)
3945template<class P_numtype1, class P_numtype2, int N_length2>
3946inline
3947_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3948 TinyVectorIterConst<P_numtype2, N_length2>,
3949 Range > >
3950where(const VectorPick<P_numtype1>& d1,
3951 const TinyVector<P_numtype2, N_length2>& d2,
3952 Range d3)
3953{
3954 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3955 TinyVectorIterConst<P_numtype2, N_length2>,
3956 Range > T_expr;
3957
3958 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3959 d2.begin(),
3960 d3));
3961}
3962
3963// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, TinyVector<P_numtype3, N_length3>)
3964template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype3, int N_length3>
3965inline
3966_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3967 TinyVectorIterConst<P_numtype2, N_length2>,
3968 TinyVectorIterConst<P_numtype3, N_length3> > >
3969where(const VectorPick<P_numtype1>& d1,
3970 const TinyVector<P_numtype2, N_length2>& d2,
3971 const TinyVector<P_numtype3, N_length3>& d3)
3972{
3973 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3974 TinyVectorIterConst<P_numtype2, N_length2>,
3975 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
3976
3977 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3978 d2.begin(),
3979 d3.begin()));
3980}
3981
3982// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, int)
3983template<class P_numtype1, class P_numtype2, int N_length2>
3984inline
3985_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
3986 TinyVectorIterConst<P_numtype2, N_length2>,
3987 _bz_VecExprConstant<int> > >
3988where(const VectorPick<P_numtype1>& d1,
3989 const TinyVector<P_numtype2, N_length2>& d2,
3990 int d3)
3991{
3992 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
3993 TinyVectorIterConst<P_numtype2, N_length2>,
3994 _bz_VecExprConstant<int> > T_expr;
3995
3996 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
3997 d2.begin(),
3998 _bz_VecExprConstant<int>(d3)));
3999}
4000
4001// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, float)
4002template<class P_numtype1, class P_numtype2, int N_length2>
4003inline
4004_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4005 TinyVectorIterConst<P_numtype2, N_length2>,
4006 _bz_VecExprConstant<float> > >
4007where(const VectorPick<P_numtype1>& d1,
4008 const TinyVector<P_numtype2, N_length2>& d2,
4009 float d3)
4010{
4011 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4012 TinyVectorIterConst<P_numtype2, N_length2>,
4013 _bz_VecExprConstant<float> > T_expr;
4014
4015 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4016 d2.begin(),
4017 _bz_VecExprConstant<float>(d3)));
4018}
4019
4020// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, double)
4021template<class P_numtype1, class P_numtype2, int N_length2>
4022inline
4023_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4024 TinyVectorIterConst<P_numtype2, N_length2>,
4025 _bz_VecExprConstant<double> > >
4026where(const VectorPick<P_numtype1>& d1,
4027 const TinyVector<P_numtype2, N_length2>& d2,
4028 double d3)
4029{
4030 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4031 TinyVectorIterConst<P_numtype2, N_length2>,
4032 _bz_VecExprConstant<double> > T_expr;
4033
4034 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4035 d2.begin(),
4036 _bz_VecExprConstant<double>(d3)));
4037}
4038
4039// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, long double)
4040template<class P_numtype1, class P_numtype2, int N_length2>
4041inline
4042_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4043 TinyVectorIterConst<P_numtype2, N_length2>,
4044 _bz_VecExprConstant<long double> > >
4045where(const VectorPick<P_numtype1>& d1,
4046 const TinyVector<P_numtype2, N_length2>& d2,
4047 long double d3)
4048{
4049 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4050 TinyVectorIterConst<P_numtype2, N_length2>,
4051 _bz_VecExprConstant<long double> > T_expr;
4052
4053 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4054 d2.begin(),
4055 _bz_VecExprConstant<long double>(d3)));
4056}
4057
4058// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, complex<T3>)
4059#ifdef BZ_HAVE_COMPLEX
4060template<class P_numtype1, class P_numtype2, int N_length2, class T3>
4061inline
4062_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4063 TinyVectorIterConst<P_numtype2, N_length2>,
4064 _bz_VecExprConstant<complex<T3> > > >
4065where(const VectorPick<P_numtype1>& d1,
4066 const TinyVector<P_numtype2, N_length2>& d2,
4067 complex<T3> d3)
4068{
4069 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4070 TinyVectorIterConst<P_numtype2, N_length2>,
4071 _bz_VecExprConstant<complex<T3> > > T_expr;
4072
4073 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4074 d2.begin(),
4075 _bz_VecExprConstant<complex<T3> > (d3)));
4076}
4077#endif // BZ_HAVE_COMPLEX
4078
4079// where(VectorPick<P_numtype1>, int, Vector<P_numtype3>)
4080template<class P_numtype1, class P_numtype3>
4081inline
4082_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4083 _bz_VecExprConstant<int>,
4084 VectorIterConst<P_numtype3> > >
4085where(const VectorPick<P_numtype1>& d1,
4086 int d2,
4087 const Vector<P_numtype3>& d3)
4088{
4089 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4090 _bz_VecExprConstant<int>,
4091 VectorIterConst<P_numtype3> > T_expr;
4092
4093 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4094 _bz_VecExprConstant<int>(d2),
4095 d3.begin()));
4096}
4097
4098// where(VectorPick<P_numtype1>, int, _bz_VecExpr<P_expr3>)
4099template<class P_numtype1, class P_expr3>
4100inline
4101_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4102 _bz_VecExprConstant<int>,
4103 _bz_VecExpr<P_expr3> > >
4104where(const VectorPick<P_numtype1>& d1,
4105 int d2,
4106 _bz_VecExpr<P_expr3> d3)
4107{
4108 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4109 _bz_VecExprConstant<int>,
4110 _bz_VecExpr<P_expr3> > T_expr;
4111
4112 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4113 _bz_VecExprConstant<int>(d2),
4114 d3));
4115}
4116
4117// where(VectorPick<P_numtype1>, int, VectorPick<P_numtype3>)
4118template<class P_numtype1, class P_numtype3>
4119inline
4120_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4121 _bz_VecExprConstant<int>,
4122 VectorPickIterConst<P_numtype3> > >
4123where(const VectorPick<P_numtype1>& d1,
4124 int d2,
4125 const VectorPick<P_numtype3>& d3)
4126{
4127 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4128 _bz_VecExprConstant<int>,
4129 VectorPickIterConst<P_numtype3> > T_expr;
4130
4131 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4132 _bz_VecExprConstant<int>(d2),
4133 d3.begin()));
4134}
4135
4136// where(VectorPick<P_numtype1>, int, Range)
4137template<class P_numtype1>
4138inline
4139_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4140 _bz_VecExprConstant<int>,
4141 Range > >
4142where(const VectorPick<P_numtype1>& d1,
4143 int d2,
4144 Range d3)
4145{
4146 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4147 _bz_VecExprConstant<int>,
4148 Range > T_expr;
4149
4150 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4151 _bz_VecExprConstant<int>(d2),
4152 d3));
4153}
4154
4155// where(VectorPick<P_numtype1>, int, TinyVector<P_numtype3, N_length3>)
4156template<class P_numtype1, class P_numtype3, int N_length3>
4157inline
4158_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4159 _bz_VecExprConstant<int>,
4160 TinyVectorIterConst<P_numtype3, N_length3> > >
4161where(const VectorPick<P_numtype1>& d1,
4162 int d2,
4163 const TinyVector<P_numtype3, N_length3>& d3)
4164{
4165 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4166 _bz_VecExprConstant<int>,
4167 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
4168
4169 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4170 _bz_VecExprConstant<int>(d2),
4171 d3.begin()));
4172}
4173
4174// where(VectorPick<P_numtype1>, int, int)
4175template<class P_numtype1>
4176inline
4177_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4178 _bz_VecExprConstant<int>,
4179 _bz_VecExprConstant<int> > >
4180where(const VectorPick<P_numtype1>& d1,
4181 int d2,
4182 int d3)
4183{
4184 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4185 _bz_VecExprConstant<int>,
4186 _bz_VecExprConstant<int> > T_expr;
4187
4188 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4189 _bz_VecExprConstant<int>(d2),
4190 _bz_VecExprConstant<int>(d3)));
4191}
4192
4193// where(VectorPick<P_numtype1>, float, Vector<P_numtype3>)
4194template<class P_numtype1, class P_numtype3>
4195inline
4196_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4197 _bz_VecExprConstant<float>,
4198 VectorIterConst<P_numtype3> > >
4199where(const VectorPick<P_numtype1>& d1,
4200 float d2,
4201 const Vector<P_numtype3>& d3)
4202{
4203 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4204 _bz_VecExprConstant<float>,
4205 VectorIterConst<P_numtype3> > T_expr;
4206
4207 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4208 _bz_VecExprConstant<float>(d2),
4209 d3.begin()));
4210}
4211
4212// where(VectorPick<P_numtype1>, float, _bz_VecExpr<P_expr3>)
4213template<class P_numtype1, class P_expr3>
4214inline
4215_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4216 _bz_VecExprConstant<float>,
4217 _bz_VecExpr<P_expr3> > >
4218where(const VectorPick<P_numtype1>& d1,
4219 float d2,
4220 _bz_VecExpr<P_expr3> d3)
4221{
4222 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4223 _bz_VecExprConstant<float>,
4224 _bz_VecExpr<P_expr3> > T_expr;
4225
4226 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4227 _bz_VecExprConstant<float>(d2),
4228 d3));
4229}
4230
4231// where(VectorPick<P_numtype1>, float, VectorPick<P_numtype3>)
4232template<class P_numtype1, class P_numtype3>
4233inline
4234_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4235 _bz_VecExprConstant<float>,
4236 VectorPickIterConst<P_numtype3> > >
4237where(const VectorPick<P_numtype1>& d1,
4238 float d2,
4239 const VectorPick<P_numtype3>& d3)
4240{
4241 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4242 _bz_VecExprConstant<float>,
4243 VectorPickIterConst<P_numtype3> > T_expr;
4244
4245 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4246 _bz_VecExprConstant<float>(d2),
4247 d3.begin()));
4248}
4249
4250// where(VectorPick<P_numtype1>, float, Range)
4251template<class P_numtype1>
4252inline
4253_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4254 _bz_VecExprConstant<float>,
4255 Range > >
4256where(const VectorPick<P_numtype1>& d1,
4257 float d2,
4258 Range d3)
4259{
4260 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4261 _bz_VecExprConstant<float>,
4262 Range > T_expr;
4263
4264 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4265 _bz_VecExprConstant<float>(d2),
4266 d3));
4267}
4268
4269// where(VectorPick<P_numtype1>, float, TinyVector<P_numtype3, N_length3>)
4270template<class P_numtype1, class P_numtype3, int N_length3>
4271inline
4272_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4273 _bz_VecExprConstant<float>,
4274 TinyVectorIterConst<P_numtype3, N_length3> > >
4275where(const VectorPick<P_numtype1>& d1,
4276 float d2,
4277 const TinyVector<P_numtype3, N_length3>& d3)
4278{
4279 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4280 _bz_VecExprConstant<float>,
4281 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
4282
4283 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4284 _bz_VecExprConstant<float>(d2),
4285 d3.begin()));
4286}
4287
4288// where(VectorPick<P_numtype1>, float, float)
4289template<class P_numtype1>
4290inline
4291_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4292 _bz_VecExprConstant<float>,
4293 _bz_VecExprConstant<float> > >
4294where(const VectorPick<P_numtype1>& d1,
4295 float d2,
4296 float d3)
4297{
4298 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4299 _bz_VecExprConstant<float>,
4300 _bz_VecExprConstant<float> > T_expr;
4301
4302 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4303 _bz_VecExprConstant<float>(d2),
4304 _bz_VecExprConstant<float>(d3)));
4305}
4306
4307// where(VectorPick<P_numtype1>, double, Vector<P_numtype3>)
4308template<class P_numtype1, class P_numtype3>
4309inline
4310_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4311 _bz_VecExprConstant<double>,
4312 VectorIterConst<P_numtype3> > >
4313where(const VectorPick<P_numtype1>& d1,
4314 double d2,
4315 const Vector<P_numtype3>& d3)
4316{
4317 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4318 _bz_VecExprConstant<double>,
4319 VectorIterConst<P_numtype3> > T_expr;
4320
4321 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4322 _bz_VecExprConstant<double>(d2),
4323 d3.begin()));
4324}
4325
4326// where(VectorPick<P_numtype1>, double, _bz_VecExpr<P_expr3>)
4327template<class P_numtype1, class P_expr3>
4328inline
4329_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4330 _bz_VecExprConstant<double>,
4331 _bz_VecExpr<P_expr3> > >
4332where(const VectorPick<P_numtype1>& d1,
4333 double d2,
4334 _bz_VecExpr<P_expr3> d3)
4335{
4336 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4337 _bz_VecExprConstant<double>,
4338 _bz_VecExpr<P_expr3> > T_expr;
4339
4340 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4341 _bz_VecExprConstant<double>(d2),
4342 d3));
4343}
4344
4345// where(VectorPick<P_numtype1>, double, VectorPick<P_numtype3>)
4346template<class P_numtype1, class P_numtype3>
4347inline
4348_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4349 _bz_VecExprConstant<double>,
4350 VectorPickIterConst<P_numtype3> > >
4351where(const VectorPick<P_numtype1>& d1,
4352 double d2,
4353 const VectorPick<P_numtype3>& d3)
4354{
4355 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4356 _bz_VecExprConstant<double>,
4357 VectorPickIterConst<P_numtype3> > T_expr;
4358
4359 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4360 _bz_VecExprConstant<double>(d2),
4361 d3.begin()));
4362}
4363
4364// where(VectorPick<P_numtype1>, double, Range)
4365template<class P_numtype1>
4366inline
4367_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4368 _bz_VecExprConstant<double>,
4369 Range > >
4370where(const VectorPick<P_numtype1>& d1,
4371 double d2,
4372 Range d3)
4373{
4374 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4375 _bz_VecExprConstant<double>,
4376 Range > T_expr;
4377
4378 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4379 _bz_VecExprConstant<double>(d2),
4380 d3));
4381}
4382
4383// where(VectorPick<P_numtype1>, double, TinyVector<P_numtype3, N_length3>)
4384template<class P_numtype1, class P_numtype3, int N_length3>
4385inline
4386_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4387 _bz_VecExprConstant<double>,
4388 TinyVectorIterConst<P_numtype3, N_length3> > >
4389where(const VectorPick<P_numtype1>& d1,
4390 double d2,
4391 const TinyVector<P_numtype3, N_length3>& d3)
4392{
4393 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4394 _bz_VecExprConstant<double>,
4395 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
4396
4397 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4398 _bz_VecExprConstant<double>(d2),
4399 d3.begin()));
4400}
4401
4402// where(VectorPick<P_numtype1>, double, double)
4403template<class P_numtype1>
4404inline
4405_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4406 _bz_VecExprConstant<double>,
4407 _bz_VecExprConstant<double> > >
4408where(const VectorPick<P_numtype1>& d1,
4409 double d2,
4410 double d3)
4411{
4412 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4413 _bz_VecExprConstant<double>,
4414 _bz_VecExprConstant<double> > T_expr;
4415
4416 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4417 _bz_VecExprConstant<double>(d2),
4418 _bz_VecExprConstant<double>(d3)));
4419}
4420
4421// where(VectorPick<P_numtype1>, long double, Vector<P_numtype3>)
4422template<class P_numtype1, class P_numtype3>
4423inline
4424_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4425 _bz_VecExprConstant<long double>,
4426 VectorIterConst<P_numtype3> > >
4427where(const VectorPick<P_numtype1>& d1,
4428 long double d2,
4429 const Vector<P_numtype3>& d3)
4430{
4431 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4432 _bz_VecExprConstant<long double>,
4433 VectorIterConst<P_numtype3> > T_expr;
4434
4435 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4436 _bz_VecExprConstant<long double>(d2),
4437 d3.begin()));
4438}
4439
4440// where(VectorPick<P_numtype1>, long double, _bz_VecExpr<P_expr3>)
4441template<class P_numtype1, class P_expr3>
4442inline
4443_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4444 _bz_VecExprConstant<long double>,
4445 _bz_VecExpr<P_expr3> > >
4446where(const VectorPick<P_numtype1>& d1,
4447 long double d2,
4448 _bz_VecExpr<P_expr3> d3)
4449{
4450 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4451 _bz_VecExprConstant<long double>,
4452 _bz_VecExpr<P_expr3> > T_expr;
4453
4454 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4455 _bz_VecExprConstant<long double>(d2),
4456 d3));
4457}
4458
4459// where(VectorPick<P_numtype1>, long double, VectorPick<P_numtype3>)
4460template<class P_numtype1, class P_numtype3>
4461inline
4462_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4463 _bz_VecExprConstant<long double>,
4464 VectorPickIterConst<P_numtype3> > >
4465where(const VectorPick<P_numtype1>& d1,
4466 long double d2,
4467 const VectorPick<P_numtype3>& d3)
4468{
4469 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4470 _bz_VecExprConstant<long double>,
4471 VectorPickIterConst<P_numtype3> > T_expr;
4472
4473 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4474 _bz_VecExprConstant<long double>(d2),
4475 d3.begin()));
4476}
4477
4478// where(VectorPick<P_numtype1>, long double, Range)
4479template<class P_numtype1>
4480inline
4481_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4482 _bz_VecExprConstant<long double>,
4483 Range > >
4484where(const VectorPick<P_numtype1>& d1,
4485 long double d2,
4486 Range d3)
4487{
4488 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4489 _bz_VecExprConstant<long double>,
4490 Range > T_expr;
4491
4492 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4493 _bz_VecExprConstant<long double>(d2),
4494 d3));
4495}
4496
4497// where(VectorPick<P_numtype1>, long double, TinyVector<P_numtype3, N_length3>)
4498template<class P_numtype1, class P_numtype3, int N_length3>
4499inline
4500_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4501 _bz_VecExprConstant<long double>,
4502 TinyVectorIterConst<P_numtype3, N_length3> > >
4503where(const VectorPick<P_numtype1>& d1,
4504 long double d2,
4505 const TinyVector<P_numtype3, N_length3>& d3)
4506{
4507 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4508 _bz_VecExprConstant<long double>,
4509 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
4510
4511 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4512 _bz_VecExprConstant<long double>(d2),
4513 d3.begin()));
4514}
4515
4516// where(VectorPick<P_numtype1>, long double, long double)
4517template<class P_numtype1>
4518inline
4519_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4520 _bz_VecExprConstant<long double>,
4521 _bz_VecExprConstant<long double> > >
4522where(const VectorPick<P_numtype1>& d1,
4523 long double d2,
4524 long double d3)
4525{
4526 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4527 _bz_VecExprConstant<long double>,
4528 _bz_VecExprConstant<long double> > T_expr;
4529
4530 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4531 _bz_VecExprConstant<long double>(d2),
4532 _bz_VecExprConstant<long double>(d3)));
4533}
4534
4535// where(VectorPick<P_numtype1>, complex<T2>, Vector<P_numtype3>)
4536#ifdef BZ_HAVE_COMPLEX
4537template<class P_numtype1, class T2, class P_numtype3>
4538inline
4539_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4540 _bz_VecExprConstant<complex<T2> > ,
4541 VectorIterConst<P_numtype3> > >
4542where(const VectorPick<P_numtype1>& d1,
4543 complex<T2> d2,
4544 const Vector<P_numtype3>& d3)
4545{
4546 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4547 _bz_VecExprConstant<complex<T2> > ,
4548 VectorIterConst<P_numtype3> > T_expr;
4549
4550 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4551 _bz_VecExprConstant<complex<T2> > (d2),
4552 d3.begin()));
4553}
4554#endif // BZ_HAVE_COMPLEX
4555
4556// where(VectorPick<P_numtype1>, complex<T2>, _bz_VecExpr<P_expr3>)
4557#ifdef BZ_HAVE_COMPLEX
4558template<class P_numtype1, class T2, class P_expr3>
4559inline
4560_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4561 _bz_VecExprConstant<complex<T2> > ,
4562 _bz_VecExpr<P_expr3> > >
4563where(const VectorPick<P_numtype1>& d1,
4564 complex<T2> d2,
4565 _bz_VecExpr<P_expr3> d3)
4566{
4567 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4568 _bz_VecExprConstant<complex<T2> > ,
4569 _bz_VecExpr<P_expr3> > T_expr;
4570
4571 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4572 _bz_VecExprConstant<complex<T2> > (d2),
4573 d3));
4574}
4575#endif // BZ_HAVE_COMPLEX
4576
4577// where(VectorPick<P_numtype1>, complex<T2>, VectorPick<P_numtype3>)
4578#ifdef BZ_HAVE_COMPLEX
4579template<class P_numtype1, class T2, class P_numtype3>
4580inline
4581_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4582 _bz_VecExprConstant<complex<T2> > ,
4583 VectorPickIterConst<P_numtype3> > >
4584where(const VectorPick<P_numtype1>& d1,
4585 complex<T2> d2,
4586 const VectorPick<P_numtype3>& d3)
4587{
4588 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4589 _bz_VecExprConstant<complex<T2> > ,
4590 VectorPickIterConst<P_numtype3> > T_expr;
4591
4592 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4593 _bz_VecExprConstant<complex<T2> > (d2),
4594 d3.begin()));
4595}
4596#endif // BZ_HAVE_COMPLEX
4597
4598// where(VectorPick<P_numtype1>, complex<T2>, Range)
4599#ifdef BZ_HAVE_COMPLEX
4600template<class P_numtype1, class T2>
4601inline
4602_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4603 _bz_VecExprConstant<complex<T2> > ,
4604 Range > >
4605where(const VectorPick<P_numtype1>& d1,
4606 complex<T2> d2,
4607 Range d3)
4608{
4609 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4610 _bz_VecExprConstant<complex<T2> > ,
4611 Range > T_expr;
4612
4613 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4614 _bz_VecExprConstant<complex<T2> > (d2),
4615 d3));
4616}
4617#endif // BZ_HAVE_COMPLEX
4618
4619// where(VectorPick<P_numtype1>, complex<T2>, TinyVector<P_numtype3, N_length3>)
4620#ifdef BZ_HAVE_COMPLEX
4621template<class P_numtype1, class T2, class P_numtype3, int N_length3>
4622inline
4623_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4624 _bz_VecExprConstant<complex<T2> > ,
4625 TinyVectorIterConst<P_numtype3, N_length3> > >
4626where(const VectorPick<P_numtype1>& d1,
4627 complex<T2> d2,
4628 const TinyVector<P_numtype3, N_length3>& d3)
4629{
4630 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4631 _bz_VecExprConstant<complex<T2> > ,
4632 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
4633
4634 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4635 _bz_VecExprConstant<complex<T2> > (d2),
4636 d3.begin()));
4637}
4638#endif // BZ_HAVE_COMPLEX
4639
4640// where(VectorPick<P_numtype1>, complex<T2>, complex<T3>)
4641#ifdef BZ_HAVE_COMPLEX
4642template<class P_numtype1, class T2, class T3>
4643inline
4644_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
4645 _bz_VecExprConstant<complex<T2> > ,
4646 _bz_VecExprConstant<complex<T3> > > >
4647where(const VectorPick<P_numtype1>& d1,
4648 complex<T2> d2,
4649 complex<T3> d3)
4650{
4651 typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
4652 _bz_VecExprConstant<complex<T2> > ,
4653 _bz_VecExprConstant<complex<T3> > > T_expr;
4654
4655 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
4656 _bz_VecExprConstant<complex<T2> > (d2),
4657 _bz_VecExprConstant<complex<T3> > (d3)));
4658}
4659#endif // BZ_HAVE_COMPLEX
4660
4661// where(Range, Vector<P_numtype2>, Vector<P_numtype3>)
4662template<class P_numtype2, class P_numtype3>
4663inline
4664_bz_VecExpr<_bz_VecWhere<Range,
4665 VectorIterConst<P_numtype2>,
4666 VectorIterConst<P_numtype3> > >
4667where(Range d1,
4668 const Vector<P_numtype2>& d2,
4669 const Vector<P_numtype3>& d3)
4670{
4671 typedef _bz_VecWhere<Range,
4672 VectorIterConst<P_numtype2>,
4673 VectorIterConst<P_numtype3> > T_expr;
4674
4675 return _bz_VecExpr<T_expr>(T_expr(d1,
4676 d2.begin(),
4677 d3.begin()));
4678}
4679
4680// where(Range, Vector<P_numtype2>, _bz_VecExpr<P_expr3>)
4681template<class P_numtype2, class P_expr3>
4682inline
4683_bz_VecExpr<_bz_VecWhere<Range,
4684 VectorIterConst<P_numtype2>,
4685 _bz_VecExpr<P_expr3> > >
4686where(Range d1,
4687 const Vector<P_numtype2>& d2,
4688 _bz_VecExpr<P_expr3> d3)
4689{
4690 typedef _bz_VecWhere<Range,
4691 VectorIterConst<P_numtype2>,
4692 _bz_VecExpr<P_expr3> > T_expr;
4693
4694 return _bz_VecExpr<T_expr>(T_expr(d1,
4695 d2.begin(),
4696 d3));
4697}
4698
4699// where(Range, Vector<P_numtype2>, VectorPick<P_numtype3>)
4700template<class P_numtype2, class P_numtype3>
4701inline
4702_bz_VecExpr<_bz_VecWhere<Range,
4703 VectorIterConst<P_numtype2>,
4704 VectorPickIterConst<P_numtype3> > >
4705where(Range d1,
4706 const Vector<P_numtype2>& d2,
4707 const VectorPick<P_numtype3>& d3)
4708{
4709 typedef _bz_VecWhere<Range,
4710 VectorIterConst<P_numtype2>,
4711 VectorPickIterConst<P_numtype3> > T_expr;
4712
4713 return _bz_VecExpr<T_expr>(T_expr(d1,
4714 d2.begin(),
4715 d3.begin()));
4716}
4717
4718// where(Range, Vector<P_numtype2>, Range)
4719template<class P_numtype2>
4720inline
4721_bz_VecExpr<_bz_VecWhere<Range,
4722 VectorIterConst<P_numtype2>,
4723 Range > >
4724where(Range d1,
4725 const Vector<P_numtype2>& d2,
4726 Range d3)
4727{
4728 typedef _bz_VecWhere<Range,
4729 VectorIterConst<P_numtype2>,
4730 Range > T_expr;
4731
4732 return _bz_VecExpr<T_expr>(T_expr(d1,
4733 d2.begin(),
4734 d3));
4735}
4736
4737// where(Range, Vector<P_numtype2>, TinyVector<P_numtype3, N_length3>)
4738template<class P_numtype2, class P_numtype3, int N_length3>
4739inline
4740_bz_VecExpr<_bz_VecWhere<Range,
4741 VectorIterConst<P_numtype2>,
4742 TinyVectorIterConst<P_numtype3, N_length3> > >
4743where(Range d1,
4744 const Vector<P_numtype2>& d2,
4745 const TinyVector<P_numtype3, N_length3>& d3)
4746{
4747 typedef _bz_VecWhere<Range,
4748 VectorIterConst<P_numtype2>,
4749 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
4750
4751 return _bz_VecExpr<T_expr>(T_expr(d1,
4752 d2.begin(),
4753 d3.begin()));
4754}
4755
4756// where(Range, Vector<P_numtype2>, int)
4757template<class P_numtype2>
4758inline
4759_bz_VecExpr<_bz_VecWhere<Range,
4760 VectorIterConst<P_numtype2>,
4761 _bz_VecExprConstant<int> > >
4762where(Range d1,
4763 const Vector<P_numtype2>& d2,
4764 int d3)
4765{
4766 typedef _bz_VecWhere<Range,
4767 VectorIterConst<P_numtype2>,
4768 _bz_VecExprConstant<int> > T_expr;
4769
4770 return _bz_VecExpr<T_expr>(T_expr(d1,
4771 d2.begin(),
4772 _bz_VecExprConstant<int>(d3)));
4773}
4774
4775// where(Range, Vector<P_numtype2>, float)
4776template<class P_numtype2>
4777inline
4778_bz_VecExpr<_bz_VecWhere<Range,
4779 VectorIterConst<P_numtype2>,
4780 _bz_VecExprConstant<float> > >
4781where(Range d1,
4782 const Vector<P_numtype2>& d2,
4783 float d3)
4784{
4785 typedef _bz_VecWhere<Range,
4786 VectorIterConst<P_numtype2>,
4787 _bz_VecExprConstant<float> > T_expr;
4788
4789 return _bz_VecExpr<T_expr>(T_expr(d1,
4790 d2.begin(),
4791 _bz_VecExprConstant<float>(d3)));
4792}
4793
4794// where(Range, Vector<P_numtype2>, double)
4795template<class P_numtype2>
4796inline
4797_bz_VecExpr<_bz_VecWhere<Range,
4798 VectorIterConst<P_numtype2>,
4799 _bz_VecExprConstant<double> > >
4800where(Range d1,
4801 const Vector<P_numtype2>& d2,
4802 double d3)
4803{
4804 typedef _bz_VecWhere<Range,
4805 VectorIterConst<P_numtype2>,
4806 _bz_VecExprConstant<double> > T_expr;
4807
4808 return _bz_VecExpr<T_expr>(T_expr(d1,
4809 d2.begin(),
4810 _bz_VecExprConstant<double>(d3)));
4811}
4812
4813// where(Range, Vector<P_numtype2>, long double)
4814template<class P_numtype2>
4815inline
4816_bz_VecExpr<_bz_VecWhere<Range,
4817 VectorIterConst<P_numtype2>,
4818 _bz_VecExprConstant<long double> > >
4819where(Range d1,
4820 const Vector<P_numtype2>& d2,
4821 long double d3)
4822{
4823 typedef _bz_VecWhere<Range,
4824 VectorIterConst<P_numtype2>,
4825 _bz_VecExprConstant<long double> > T_expr;
4826
4827 return _bz_VecExpr<T_expr>(T_expr(d1,
4828 d2.begin(),
4829 _bz_VecExprConstant<long double>(d3)));
4830}
4831
4832// where(Range, Vector<P_numtype2>, complex<T3>)
4833#ifdef BZ_HAVE_COMPLEX
4834template<class P_numtype2, class T3>
4835inline
4836_bz_VecExpr<_bz_VecWhere<Range,
4837 VectorIterConst<P_numtype2>,
4838 _bz_VecExprConstant<complex<T3> > > >
4839where(Range d1,
4840 const Vector<P_numtype2>& d2,
4841 complex<T3> d3)
4842{
4843 typedef _bz_VecWhere<Range,
4844 VectorIterConst<P_numtype2>,
4845 _bz_VecExprConstant<complex<T3> > > T_expr;
4846
4847 return _bz_VecExpr<T_expr>(T_expr(d1,
4848 d2.begin(),
4849 _bz_VecExprConstant<complex<T3> > (d3)));
4850}
4851#endif // BZ_HAVE_COMPLEX
4852
4853// where(Range, _bz_VecExpr<P_expr2>, Vector<P_numtype3>)
4854template<class P_expr2, class P_numtype3>
4855inline
4856_bz_VecExpr<_bz_VecWhere<Range,
4857 _bz_VecExpr<P_expr2>,
4858 VectorIterConst<P_numtype3> > >
4859where(Range d1,
4860 _bz_VecExpr<P_expr2> d2,
4861 const Vector<P_numtype3>& d3)
4862{
4863 typedef _bz_VecWhere<Range,
4864 _bz_VecExpr<P_expr2>,
4865 VectorIterConst<P_numtype3> > T_expr;
4866
4867 return _bz_VecExpr<T_expr>(T_expr(d1,
4868 d2,
4869 d3.begin()));
4870}
4871
4872// where(Range, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>)
4873template<class P_expr2, class P_expr3>
4874inline
4875_bz_VecExpr<_bz_VecWhere<Range,
4876 _bz_VecExpr<P_expr2>,
4877 _bz_VecExpr<P_expr3> > >
4878where(Range d1,
4879 _bz_VecExpr<P_expr2> d2,
4880 _bz_VecExpr<P_expr3> d3)
4881{
4882 typedef _bz_VecWhere<Range,
4883 _bz_VecExpr<P_expr2>,
4884 _bz_VecExpr<P_expr3> > T_expr;
4885
4886 return _bz_VecExpr<T_expr>(T_expr(d1,
4887 d2,
4888 d3));
4889}
4890
4891// where(Range, _bz_VecExpr<P_expr2>, VectorPick<P_numtype3>)
4892template<class P_expr2, class P_numtype3>
4893inline
4894_bz_VecExpr<_bz_VecWhere<Range,
4895 _bz_VecExpr<P_expr2>,
4896 VectorPickIterConst<P_numtype3> > >
4897where(Range d1,
4898 _bz_VecExpr<P_expr2> d2,
4899 const VectorPick<P_numtype3>& d3)
4900{
4901 typedef _bz_VecWhere<Range,
4902 _bz_VecExpr<P_expr2>,
4903 VectorPickIterConst<P_numtype3> > T_expr;
4904
4905 return _bz_VecExpr<T_expr>(T_expr(d1,
4906 d2,
4907 d3.begin()));
4908}
4909
4910// where(Range, _bz_VecExpr<P_expr2>, Range)
4911template<class P_expr2>
4912inline
4913_bz_VecExpr<_bz_VecWhere<Range,
4914 _bz_VecExpr<P_expr2>,
4915 Range > >
4916where(Range d1,
4917 _bz_VecExpr<P_expr2> d2,
4918 Range d3)
4919{
4920 typedef _bz_VecWhere<Range,
4921 _bz_VecExpr<P_expr2>,
4922 Range > T_expr;
4923
4924 return _bz_VecExpr<T_expr>(T_expr(d1,
4925 d2,
4926 d3));
4927}
4928
4929// where(Range, _bz_VecExpr<P_expr2>, TinyVector<P_numtype3, N_length3>)
4930template<class P_expr2, class P_numtype3, int N_length3>
4931inline
4932_bz_VecExpr<_bz_VecWhere<Range,
4933 _bz_VecExpr<P_expr2>,
4934 TinyVectorIterConst<P_numtype3, N_length3> > >
4935where(Range d1,
4936 _bz_VecExpr<P_expr2> d2,
4937 const TinyVector<P_numtype3, N_length3>& d3)
4938{
4939 typedef _bz_VecWhere<Range,
4940 _bz_VecExpr<P_expr2>,
4941 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
4942
4943 return _bz_VecExpr<T_expr>(T_expr(d1,
4944 d2,
4945 d3.begin()));
4946}
4947
4948// where(Range, _bz_VecExpr<P_expr2>, int)
4949template<class P_expr2>
4950inline
4951_bz_VecExpr<_bz_VecWhere<Range,
4952 _bz_VecExpr<P_expr2>,
4953 _bz_VecExprConstant<int> > >
4954where(Range d1,
4955 _bz_VecExpr<P_expr2> d2,
4956 int d3)
4957{
4958 typedef _bz_VecWhere<Range,
4959 _bz_VecExpr<P_expr2>,
4960 _bz_VecExprConstant<int> > T_expr;
4961
4962 return _bz_VecExpr<T_expr>(T_expr(d1,
4963 d2,
4964 _bz_VecExprConstant<int>(d3)));
4965}
4966
4967// where(Range, _bz_VecExpr<P_expr2>, float)
4968template<class P_expr2>
4969inline
4970_bz_VecExpr<_bz_VecWhere<Range,
4971 _bz_VecExpr<P_expr2>,
4972 _bz_VecExprConstant<float> > >
4973where(Range d1,
4974 _bz_VecExpr<P_expr2> d2,
4975 float d3)
4976{
4977 typedef _bz_VecWhere<Range,
4978 _bz_VecExpr<P_expr2>,
4979 _bz_VecExprConstant<float> > T_expr;
4980
4981 return _bz_VecExpr<T_expr>(T_expr(d1,
4982 d2,
4983 _bz_VecExprConstant<float>(d3)));
4984}
4985
4986// where(Range, _bz_VecExpr<P_expr2>, double)
4987template<class P_expr2>
4988inline
4989_bz_VecExpr<_bz_VecWhere<Range,
4990 _bz_VecExpr<P_expr2>,
4991 _bz_VecExprConstant<double> > >
4992where(Range d1,
4993 _bz_VecExpr<P_expr2> d2,
4994 double d3)
4995{
4996 typedef _bz_VecWhere<Range,
4997 _bz_VecExpr<P_expr2>,
4998 _bz_VecExprConstant<double> > T_expr;
4999
5000 return _bz_VecExpr<T_expr>(T_expr(d1,
5001 d2,
5002 _bz_VecExprConstant<double>(d3)));
5003}
5004
5005// where(Range, _bz_VecExpr<P_expr2>, long double)
5006template<class P_expr2>
5007inline
5008_bz_VecExpr<_bz_VecWhere<Range,
5009 _bz_VecExpr<P_expr2>,
5010 _bz_VecExprConstant<long double> > >
5011where(Range d1,
5012 _bz_VecExpr<P_expr2> d2,
5013 long double d3)
5014{
5015 typedef _bz_VecWhere<Range,
5016 _bz_VecExpr<P_expr2>,
5017 _bz_VecExprConstant<long double> > T_expr;
5018
5019 return _bz_VecExpr<T_expr>(T_expr(d1,
5020 d2,
5021 _bz_VecExprConstant<long double>(d3)));
5022}
5023
5024// where(Range, _bz_VecExpr<P_expr2>, complex<T3>)
5025#ifdef BZ_HAVE_COMPLEX
5026template<class P_expr2, class T3>
5027inline
5028_bz_VecExpr<_bz_VecWhere<Range,
5029 _bz_VecExpr<P_expr2>,
5030 _bz_VecExprConstant<complex<T3> > > >
5031where(Range d1,
5032 _bz_VecExpr<P_expr2> d2,
5033 complex<T3> d3)
5034{
5035 typedef _bz_VecWhere<Range,
5036 _bz_VecExpr<P_expr2>,
5037 _bz_VecExprConstant<complex<T3> > > T_expr;
5038
5039 return _bz_VecExpr<T_expr>(T_expr(d1,
5040 d2,
5041 _bz_VecExprConstant<complex<T3> > (d3)));
5042}
5043#endif // BZ_HAVE_COMPLEX
5044
5045// where(Range, VectorPick<P_numtype2>, Vector<P_numtype3>)
5046template<class P_numtype2, class P_numtype3>
5047inline
5048_bz_VecExpr<_bz_VecWhere<Range,
5049 VectorPickIterConst<P_numtype2>,
5050 VectorIterConst<P_numtype3> > >
5051where(Range d1,
5052 const VectorPick<P_numtype2>& d2,
5053 const Vector<P_numtype3>& d3)
5054{
5055 typedef _bz_VecWhere<Range,
5056 VectorPickIterConst<P_numtype2>,
5057 VectorIterConst<P_numtype3> > T_expr;
5058
5059 return _bz_VecExpr<T_expr>(T_expr(d1,
5060 d2.begin(),
5061 d3.begin()));
5062}
5063
5064// where(Range, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3>)
5065template<class P_numtype2, class P_expr3>
5066inline
5067_bz_VecExpr<_bz_VecWhere<Range,
5068 VectorPickIterConst<P_numtype2>,
5069 _bz_VecExpr<P_expr3> > >
5070where(Range d1,
5071 const VectorPick<P_numtype2>& d2,
5072 _bz_VecExpr<P_expr3> d3)
5073{
5074 typedef _bz_VecWhere<Range,
5075 VectorPickIterConst<P_numtype2>,
5076 _bz_VecExpr<P_expr3> > T_expr;
5077
5078 return _bz_VecExpr<T_expr>(T_expr(d1,
5079 d2.begin(),
5080 d3));
5081}
5082
5083// where(Range, VectorPick<P_numtype2>, VectorPick<P_numtype3>)
5084template<class P_numtype2, class P_numtype3>
5085inline
5086_bz_VecExpr<_bz_VecWhere<Range,
5087 VectorPickIterConst<P_numtype2>,
5088 VectorPickIterConst<P_numtype3> > >
5089where(Range d1,
5090 const VectorPick<P_numtype2>& d2,
5091 const VectorPick<P_numtype3>& d3)
5092{
5093 typedef _bz_VecWhere<Range,
5094 VectorPickIterConst<P_numtype2>,
5095 VectorPickIterConst<P_numtype3> > T_expr;
5096
5097 return _bz_VecExpr<T_expr>(T_expr(d1,
5098 d2.begin(),
5099 d3.begin()));
5100}
5101
5102// where(Range, VectorPick<P_numtype2>, Range)
5103template<class P_numtype2>
5104inline
5105_bz_VecExpr<_bz_VecWhere<Range,
5106 VectorPickIterConst<P_numtype2>,
5107 Range > >
5108where(Range d1,
5109 const VectorPick<P_numtype2>& d2,
5110 Range d3)
5111{
5112 typedef _bz_VecWhere<Range,
5113 VectorPickIterConst<P_numtype2>,
5114 Range > T_expr;
5115
5116 return _bz_VecExpr<T_expr>(T_expr(d1,
5117 d2.begin(),
5118 d3));
5119}
5120
5121// where(Range, VectorPick<P_numtype2>, TinyVector<P_numtype3, N_length3>)
5122template<class P_numtype2, class P_numtype3, int N_length3>
5123inline
5124_bz_VecExpr<_bz_VecWhere<Range,
5125 VectorPickIterConst<P_numtype2>,
5126 TinyVectorIterConst<P_numtype3, N_length3> > >
5127where(Range d1,
5128 const VectorPick<P_numtype2>& d2,
5129 const TinyVector<P_numtype3, N_length3>& d3)
5130{
5131 typedef _bz_VecWhere<Range,
5132 VectorPickIterConst<P_numtype2>,
5133 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
5134
5135 return _bz_VecExpr<T_expr>(T_expr(d1,
5136 d2.begin(),
5137 d3.begin()));
5138}
5139
5140// where(Range, VectorPick<P_numtype2>, int)
5141template<class P_numtype2>
5142inline
5143_bz_VecExpr<_bz_VecWhere<Range,
5144 VectorPickIterConst<P_numtype2>,
5145 _bz_VecExprConstant<int> > >
5146where(Range d1,
5147 const VectorPick<P_numtype2>& d2,
5148 int d3)
5149{
5150 typedef _bz_VecWhere<Range,
5151 VectorPickIterConst<P_numtype2>,
5152 _bz_VecExprConstant<int> > T_expr;
5153
5154 return _bz_VecExpr<T_expr>(T_expr(d1,
5155 d2.begin(),
5156 _bz_VecExprConstant<int>(d3)));
5157}
5158
5159// where(Range, VectorPick<P_numtype2>, float)
5160template<class P_numtype2>
5161inline
5162_bz_VecExpr<_bz_VecWhere<Range,
5163 VectorPickIterConst<P_numtype2>,
5164 _bz_VecExprConstant<float> > >
5165where(Range d1,
5166 const VectorPick<P_numtype2>& d2,
5167 float d3)
5168{
5169 typedef _bz_VecWhere<Range,
5170 VectorPickIterConst<P_numtype2>,
5171 _bz_VecExprConstant<float> > T_expr;
5172
5173 return _bz_VecExpr<T_expr>(T_expr(d1,
5174 d2.begin(),
5175 _bz_VecExprConstant<float>(d3)));
5176}
5177
5178// where(Range, VectorPick<P_numtype2>, double)
5179template<class P_numtype2>
5180inline
5181_bz_VecExpr<_bz_VecWhere<Range,
5182 VectorPickIterConst<P_numtype2>,
5183 _bz_VecExprConstant<double> > >
5184where(Range d1,
5185 const VectorPick<P_numtype2>& d2,
5186 double d3)
5187{
5188 typedef _bz_VecWhere<Range,
5189 VectorPickIterConst<P_numtype2>,
5190 _bz_VecExprConstant<double> > T_expr;
5191
5192 return _bz_VecExpr<T_expr>(T_expr(d1,
5193 d2.begin(),
5194 _bz_VecExprConstant<double>(d3)));
5195}
5196
5197// where(Range, VectorPick<P_numtype2>, long double)
5198template<class P_numtype2>
5199inline
5200_bz_VecExpr<_bz_VecWhere<Range,
5201 VectorPickIterConst<P_numtype2>,
5202 _bz_VecExprConstant<long double> > >
5203where(Range d1,
5204 const VectorPick<P_numtype2>& d2,
5205 long double d3)
5206{
5207 typedef _bz_VecWhere<Range,
5208 VectorPickIterConst<P_numtype2>,
5209 _bz_VecExprConstant<long double> > T_expr;
5210
5211 return _bz_VecExpr<T_expr>(T_expr(d1,
5212 d2.begin(),
5213 _bz_VecExprConstant<long double>(d3)));
5214}
5215
5216// where(Range, VectorPick<P_numtype2>, complex<T3>)
5217#ifdef BZ_HAVE_COMPLEX
5218template<class P_numtype2, class T3>
5219inline
5220_bz_VecExpr<_bz_VecWhere<Range,
5221 VectorPickIterConst<P_numtype2>,
5222 _bz_VecExprConstant<complex<T3> > > >
5223where(Range d1,
5224 const VectorPick<P_numtype2>& d2,
5225 complex<T3> d3)
5226{
5227 typedef _bz_VecWhere<Range,
5228 VectorPickIterConst<P_numtype2>,
5229 _bz_VecExprConstant<complex<T3> > > T_expr;
5230
5231 return _bz_VecExpr<T_expr>(T_expr(d1,
5232 d2.begin(),
5233 _bz_VecExprConstant<complex<T3> > (d3)));
5234}
5235#endif // BZ_HAVE_COMPLEX
5236
5237// where(Range, Range, Vector<P_numtype3>)
5238template<class P_numtype3>
5239inline
5240_bz_VecExpr<_bz_VecWhere<Range,
5241 Range,
5242 VectorIterConst<P_numtype3> > >
5243where(Range d1,
5244 Range d2,
5245 const Vector<P_numtype3>& d3)
5246{
5247 typedef _bz_VecWhere<Range,
5248 Range,
5249 VectorIterConst<P_numtype3> > T_expr;
5250
5251 return _bz_VecExpr<T_expr>(T_expr(d1,
5252 d2,
5253 d3.begin()));
5254}
5255
5256// where(Range, Range, _bz_VecExpr<P_expr3>)
5257template<class P_expr3>
5258inline
5259_bz_VecExpr<_bz_VecWhere<Range,
5260 Range,
5261 _bz_VecExpr<P_expr3> > >
5262where(Range d1,
5263 Range d2,
5264 _bz_VecExpr<P_expr3> d3)
5265{
5266 typedef _bz_VecWhere<Range,
5267 Range,
5268 _bz_VecExpr<P_expr3> > T_expr;
5269
5270 return _bz_VecExpr<T_expr>(T_expr(d1,
5271 d2,
5272 d3));
5273}
5274
5275// where(Range, Range, VectorPick<P_numtype3>)
5276template<class P_numtype3>
5277inline
5278_bz_VecExpr<_bz_VecWhere<Range,
5279 Range,
5280 VectorPickIterConst<P_numtype3> > >
5281where(Range d1,
5282 Range d2,
5283 const VectorPick<P_numtype3>& d3)
5284{
5285 typedef _bz_VecWhere<Range,
5286 Range,
5287 VectorPickIterConst<P_numtype3> > T_expr;
5288
5289 return _bz_VecExpr<T_expr>(T_expr(d1,
5290 d2,
5291 d3.begin()));
5292}
5293
5294// where(Range, Range, Range)
5295
5296inline
5297_bz_VecExpr<_bz_VecWhere<Range,
5298 Range,
5299 Range > >
5300where(Range d1,
5301 Range d2,
5302 Range d3)
5303{
5304 typedef _bz_VecWhere<Range,
5305 Range,
5306 Range > T_expr;
5307
5308 return _bz_VecExpr<T_expr>(T_expr(d1,
5309 d2,
5310 d3));
5311}
5312
5313// where(Range, Range, TinyVector<P_numtype3, N_length3>)
5314template<class P_numtype3, int N_length3>
5315inline
5316_bz_VecExpr<_bz_VecWhere<Range,
5317 Range,
5318 TinyVectorIterConst<P_numtype3, N_length3> > >
5319where(Range d1,
5320 Range d2,
5321 const TinyVector<P_numtype3, N_length3>& d3)
5322{
5323 typedef _bz_VecWhere<Range,
5324 Range,
5325 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
5326
5327 return _bz_VecExpr<T_expr>(T_expr(d1,
5328 d2,
5329 d3.begin()));
5330}
5331
5332// where(Range, Range, int)
5333
5334inline
5335_bz_VecExpr<_bz_VecWhere<Range,
5336 Range,
5337 _bz_VecExprConstant<int> > >
5338where(Range d1,
5339 Range d2,
5340 int d3)
5341{
5342 typedef _bz_VecWhere<Range,
5343 Range,
5344 _bz_VecExprConstant<int> > T_expr;
5345
5346 return _bz_VecExpr<T_expr>(T_expr(d1,
5347 d2,
5348 _bz_VecExprConstant<int>(d3)));
5349}
5350
5351// where(Range, Range, float)
5352
5353inline
5354_bz_VecExpr<_bz_VecWhere<Range,
5355 Range,
5356 _bz_VecExprConstant<float> > >
5357where(Range d1,
5358 Range d2,
5359 float d3)
5360{
5361 typedef _bz_VecWhere<Range,
5362 Range,
5363 _bz_VecExprConstant<float> > T_expr;
5364
5365 return _bz_VecExpr<T_expr>(T_expr(d1,
5366 d2,
5367 _bz_VecExprConstant<float>(d3)));
5368}
5369
5370// where(Range, Range, double)
5371
5372inline
5373_bz_VecExpr<_bz_VecWhere<Range,
5374 Range,
5375 _bz_VecExprConstant<double> > >
5376where(Range d1,
5377 Range d2,
5378 double d3)
5379{
5380 typedef _bz_VecWhere<Range,
5381 Range,
5382 _bz_VecExprConstant<double> > T_expr;
5383
5384 return _bz_VecExpr<T_expr>(T_expr(d1,
5385 d2,
5386 _bz_VecExprConstant<double>(d3)));
5387}
5388
5389// where(Range, Range, long double)
5390
5391inline
5392_bz_VecExpr<_bz_VecWhere<Range,
5393 Range,
5394 _bz_VecExprConstant<long double> > >
5395where(Range d1,
5396 Range d2,
5397 long double d3)
5398{
5399 typedef _bz_VecWhere<Range,
5400 Range,
5401 _bz_VecExprConstant<long double> > T_expr;
5402
5403 return _bz_VecExpr<T_expr>(T_expr(d1,
5404 d2,
5405 _bz_VecExprConstant<long double>(d3)));
5406}
5407
5408// where(Range, Range, complex<T3>)
5409#ifdef BZ_HAVE_COMPLEX
5410template<class T3>
5411inline
5412_bz_VecExpr<_bz_VecWhere<Range,
5413 Range,
5414 _bz_VecExprConstant<complex<T3> > > >
5415where(Range d1,
5416 Range d2,
5417 complex<T3> d3)
5418{
5419 typedef _bz_VecWhere<Range,
5420 Range,
5421 _bz_VecExprConstant<complex<T3> > > T_expr;
5422
5423 return _bz_VecExpr<T_expr>(T_expr(d1,
5424 d2,
5425 _bz_VecExprConstant<complex<T3> > (d3)));
5426}
5427#endif // BZ_HAVE_COMPLEX
5428
5429// where(Range, TinyVector<P_numtype2, N_length2>, Vector<P_numtype3>)
5430template<class P_numtype2, int N_length2, class P_numtype3>
5431inline
5432_bz_VecExpr<_bz_VecWhere<Range,
5433 TinyVectorIterConst<P_numtype2, N_length2>,
5434 VectorIterConst<P_numtype3> > >
5435where(Range d1,
5436 const TinyVector<P_numtype2, N_length2>& d2,
5437 const Vector<P_numtype3>& d3)
5438{
5439 typedef _bz_VecWhere<Range,
5440 TinyVectorIterConst<P_numtype2, N_length2>,
5441 VectorIterConst<P_numtype3> > T_expr;
5442
5443 return _bz_VecExpr<T_expr>(T_expr(d1,
5444 d2.begin(),
5445 d3.begin()));
5446}
5447
5448// where(Range, TinyVector<P_numtype2, N_length2>, _bz_VecExpr<P_expr3>)
5449template<class P_numtype2, int N_length2, class P_expr3>
5450inline
5451_bz_VecExpr<_bz_VecWhere<Range,
5452 TinyVectorIterConst<P_numtype2, N_length2>,
5453 _bz_VecExpr<P_expr3> > >
5454where(Range d1,
5455 const TinyVector<P_numtype2, N_length2>& d2,
5456 _bz_VecExpr<P_expr3> d3)
5457{
5458 typedef _bz_VecWhere<Range,
5459 TinyVectorIterConst<P_numtype2, N_length2>,
5460 _bz_VecExpr<P_expr3> > T_expr;
5461
5462 return _bz_VecExpr<T_expr>(T_expr(d1,
5463 d2.begin(),
5464 d3));
5465}
5466
5467// where(Range, TinyVector<P_numtype2, N_length2>, VectorPick<P_numtype3>)
5468template<class P_numtype2, int N_length2, class P_numtype3>
5469inline
5470_bz_VecExpr<_bz_VecWhere<Range,
5471 TinyVectorIterConst<P_numtype2, N_length2>,
5472 VectorPickIterConst<P_numtype3> > >
5473where(Range d1,
5474 const TinyVector<P_numtype2, N_length2>& d2,
5475 const VectorPick<P_numtype3>& d3)
5476{
5477 typedef _bz_VecWhere<Range,
5478 TinyVectorIterConst<P_numtype2, N_length2>,
5479 VectorPickIterConst<P_numtype3> > T_expr;
5480
5481 return _bz_VecExpr<T_expr>(T_expr(d1,
5482 d2.begin(),
5483 d3.begin()));
5484}
5485
5486// where(Range, TinyVector<P_numtype2, N_length2>, Range)
5487template<class P_numtype2, int N_length2>
5488inline
5489_bz_VecExpr<_bz_VecWhere<Range,
5490 TinyVectorIterConst<P_numtype2, N_length2>,
5491 Range > >
5492where(Range d1,
5493 const TinyVector<P_numtype2, N_length2>& d2,
5494 Range d3)
5495{
5496 typedef _bz_VecWhere<Range,
5497 TinyVectorIterConst<P_numtype2, N_length2>,
5498 Range > T_expr;
5499
5500 return _bz_VecExpr<T_expr>(T_expr(d1,
5501 d2.begin(),
5502 d3));
5503}
5504
5505// where(Range, TinyVector<P_numtype2, N_length2>, TinyVector<P_numtype3, N_length3>)
5506template<class P_numtype2, int N_length2, class P_numtype3, int N_length3>
5507inline
5508_bz_VecExpr<_bz_VecWhere<Range,
5509 TinyVectorIterConst<P_numtype2, N_length2>,
5510 TinyVectorIterConst<P_numtype3, N_length3> > >
5511where(Range d1,
5512 const TinyVector<P_numtype2, N_length2>& d2,
5513 const TinyVector<P_numtype3, N_length3>& d3)
5514{
5515 typedef _bz_VecWhere<Range,
5516 TinyVectorIterConst<P_numtype2, N_length2>,
5517 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
5518
5519 return _bz_VecExpr<T_expr>(T_expr(d1,
5520 d2.begin(),
5521 d3.begin()));
5522}
5523
5524// where(Range, TinyVector<P_numtype2, N_length2>, int)
5525template<class P_numtype2, int N_length2>
5526inline
5527_bz_VecExpr<_bz_VecWhere<Range,
5528 TinyVectorIterConst<P_numtype2, N_length2>,
5529 _bz_VecExprConstant<int> > >
5530where(Range d1,
5531 const TinyVector<P_numtype2, N_length2>& d2,
5532 int d3)
5533{
5534 typedef _bz_VecWhere<Range,
5535 TinyVectorIterConst<P_numtype2, N_length2>,
5536 _bz_VecExprConstant<int> > T_expr;
5537
5538 return _bz_VecExpr<T_expr>(T_expr(d1,
5539 d2.begin(),
5540 _bz_VecExprConstant<int>(d3)));
5541}
5542
5543// where(Range, TinyVector<P_numtype2, N_length2>, float)
5544template<class P_numtype2, int N_length2>
5545inline
5546_bz_VecExpr<_bz_VecWhere<Range,
5547 TinyVectorIterConst<P_numtype2, N_length2>,
5548 _bz_VecExprConstant<float> > >
5549where(Range d1,
5550 const TinyVector<P_numtype2, N_length2>& d2,
5551 float d3)
5552{
5553 typedef _bz_VecWhere<Range,
5554 TinyVectorIterConst<P_numtype2, N_length2>,
5555 _bz_VecExprConstant<float> > T_expr;
5556
5557 return _bz_VecExpr<T_expr>(T_expr(d1,
5558 d2.begin(),
5559 _bz_VecExprConstant<float>(d3)));
5560}
5561
5562// where(Range, TinyVector<P_numtype2, N_length2>, double)
5563template<class P_numtype2, int N_length2>
5564inline
5565_bz_VecExpr<_bz_VecWhere<Range,
5566 TinyVectorIterConst<P_numtype2, N_length2>,
5567 _bz_VecExprConstant<double> > >
5568where(Range d1,
5569 const TinyVector<P_numtype2, N_length2>& d2,
5570 double d3)
5571{
5572 typedef _bz_VecWhere<Range,
5573 TinyVectorIterConst<P_numtype2, N_length2>,
5574 _bz_VecExprConstant<double> > T_expr;
5575
5576 return _bz_VecExpr<T_expr>(T_expr(d1,
5577 d2.begin(),
5578 _bz_VecExprConstant<double>(d3)));
5579}
5580
5581// where(Range, TinyVector<P_numtype2, N_length2>, long double)
5582template<class P_numtype2, int N_length2>
5583inline
5584_bz_VecExpr<_bz_VecWhere<Range,
5585 TinyVectorIterConst<P_numtype2, N_length2>,
5586 _bz_VecExprConstant<long double> > >
5587where(Range d1,
5588 const TinyVector<P_numtype2, N_length2>& d2,
5589 long double d3)
5590{
5591 typedef _bz_VecWhere<Range,
5592 TinyVectorIterConst<P_numtype2, N_length2>,
5593 _bz_VecExprConstant<long double> > T_expr;
5594
5595 return _bz_VecExpr<T_expr>(T_expr(d1,
5596 d2.begin(),
5597 _bz_VecExprConstant<long double>(d3)));
5598}
5599
5600// where(Range, TinyVector<P_numtype2, N_length2>, complex<T3>)
5601#ifdef BZ_HAVE_COMPLEX
5602template<class P_numtype2, int N_length2, class T3>
5603inline
5604_bz_VecExpr<_bz_VecWhere<Range,
5605 TinyVectorIterConst<P_numtype2, N_length2>,
5606 _bz_VecExprConstant<complex<T3> > > >
5607where(Range d1,
5608 const TinyVector<P_numtype2, N_length2>& d2,
5609 complex<T3> d3)
5610{
5611 typedef _bz_VecWhere<Range,
5612 TinyVectorIterConst<P_numtype2, N_length2>,
5613 _bz_VecExprConstant<complex<T3> > > T_expr;
5614
5615 return _bz_VecExpr<T_expr>(T_expr(d1,
5616 d2.begin(),
5617 _bz_VecExprConstant<complex<T3> > (d3)));
5618}
5619#endif // BZ_HAVE_COMPLEX
5620
5621// where(Range, int, Vector<P_numtype3>)
5622template<class P_numtype3>
5623inline
5624_bz_VecExpr<_bz_VecWhere<Range,
5625 _bz_VecExprConstant<int>,
5626 VectorIterConst<P_numtype3> > >
5627where(Range d1,
5628 int d2,
5629 const Vector<P_numtype3>& d3)
5630{
5631 typedef _bz_VecWhere<Range,
5632 _bz_VecExprConstant<int>,
5633 VectorIterConst<P_numtype3> > T_expr;
5634
5635 return _bz_VecExpr<T_expr>(T_expr(d1,
5636 _bz_VecExprConstant<int>(d2),
5637 d3.begin()));
5638}
5639
5640// where(Range, int, _bz_VecExpr<P_expr3>)
5641template<class P_expr3>
5642inline
5643_bz_VecExpr<_bz_VecWhere<Range,
5644 _bz_VecExprConstant<int>,
5645 _bz_VecExpr<P_expr3> > >
5646where(Range d1,
5647 int d2,
5648 _bz_VecExpr<P_expr3> d3)
5649{
5650 typedef _bz_VecWhere<Range,
5651 _bz_VecExprConstant<int>,
5652 _bz_VecExpr<P_expr3> > T_expr;
5653
5654 return _bz_VecExpr<T_expr>(T_expr(d1,
5655 _bz_VecExprConstant<int>(d2),
5656 d3));
5657}
5658
5659// where(Range, int, VectorPick<P_numtype3>)
5660template<class P_numtype3>
5661inline
5662_bz_VecExpr<_bz_VecWhere<Range,
5663 _bz_VecExprConstant<int>,
5664 VectorPickIterConst<P_numtype3> > >
5665where(Range d1,
5666 int d2,
5667 const VectorPick<P_numtype3>& d3)
5668{
5669 typedef _bz_VecWhere<Range,
5670 _bz_VecExprConstant<int>,
5671 VectorPickIterConst<P_numtype3> > T_expr;
5672
5673 return _bz_VecExpr<T_expr>(T_expr(d1,
5674 _bz_VecExprConstant<int>(d2),
5675 d3.begin()));
5676}
5677
5678// where(Range, int, Range)
5679
5680inline
5681_bz_VecExpr<_bz_VecWhere<Range,
5682 _bz_VecExprConstant<int>,
5683 Range > >
5684where(Range d1,
5685 int d2,
5686 Range d3)
5687{
5688 typedef _bz_VecWhere<Range,
5689 _bz_VecExprConstant<int>,
5690 Range > T_expr;
5691
5692 return _bz_VecExpr<T_expr>(T_expr(d1,
5693 _bz_VecExprConstant<int>(d2),
5694 d3));
5695}
5696
5697// where(Range, int, TinyVector<P_numtype3, N_length3>)
5698template<class P_numtype3, int N_length3>
5699inline
5700_bz_VecExpr<_bz_VecWhere<Range,
5701 _bz_VecExprConstant<int>,
5702 TinyVectorIterConst<P_numtype3, N_length3> > >
5703where(Range d1,
5704 int d2,
5705 const TinyVector<P_numtype3, N_length3>& d3)
5706{
5707 typedef _bz_VecWhere<Range,
5708 _bz_VecExprConstant<int>,
5709 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
5710
5711 return _bz_VecExpr<T_expr>(T_expr(d1,
5712 _bz_VecExprConstant<int>(d2),
5713 d3.begin()));
5714}
5715
5716// where(Range, int, int)
5717
5718inline
5719_bz_VecExpr<_bz_VecWhere<Range,
5720 _bz_VecExprConstant<int>,
5721 _bz_VecExprConstant<int> > >
5722where(Range d1,
5723 int d2,
5724 int d3)
5725{
5726 typedef _bz_VecWhere<Range,
5727 _bz_VecExprConstant<int>,
5728 _bz_VecExprConstant<int> > T_expr;
5729
5730 return _bz_VecExpr<T_expr>(T_expr(d1,
5731 _bz_VecExprConstant<int>(d2),
5732 _bz_VecExprConstant<int>(d3)));
5733}
5734
5735// where(Range, float, Vector<P_numtype3>)
5736template<class P_numtype3>
5737inline
5738_bz_VecExpr<_bz_VecWhere<Range,
5739 _bz_VecExprConstant<float>,
5740 VectorIterConst<P_numtype3> > >
5741where(Range d1,
5742 float d2,
5743 const Vector<P_numtype3>& d3)
5744{
5745 typedef _bz_VecWhere<Range,
5746 _bz_VecExprConstant<float>,
5747 VectorIterConst<P_numtype3> > T_expr;
5748
5749 return _bz_VecExpr<T_expr>(T_expr(d1,
5750 _bz_VecExprConstant<float>(d2),
5751 d3.begin()));
5752}
5753
5754// where(Range, float, _bz_VecExpr<P_expr3>)
5755template<class P_expr3>
5756inline
5757_bz_VecExpr<_bz_VecWhere<Range,
5758 _bz_VecExprConstant<float>,
5759 _bz_VecExpr<P_expr3> > >
5760where(Range d1,
5761 float d2,
5762 _bz_VecExpr<P_expr3> d3)
5763{
5764 typedef _bz_VecWhere<Range,
5765 _bz_VecExprConstant<float>,
5766 _bz_VecExpr<P_expr3> > T_expr;
5767
5768 return _bz_VecExpr<T_expr>(T_expr(d1,
5769 _bz_VecExprConstant<float>(d2),
5770 d3));
5771}
5772
5773// where(Range, float, VectorPick<P_numtype3>)
5774template<class P_numtype3>
5775inline
5776_bz_VecExpr<_bz_VecWhere<Range,
5777 _bz_VecExprConstant<float>,
5778 VectorPickIterConst<P_numtype3> > >
5779where(Range d1,
5780 float d2,
5781 const VectorPick<P_numtype3>& d3)
5782{
5783 typedef _bz_VecWhere<Range,
5784 _bz_VecExprConstant<float>,
5785 VectorPickIterConst<P_numtype3> > T_expr;
5786
5787 return _bz_VecExpr<T_expr>(T_expr(d1,
5788 _bz_VecExprConstant<float>(d2),
5789 d3.begin()));
5790}
5791
5792// where(Range, float, Range)
5793
5794inline
5795_bz_VecExpr<_bz_VecWhere<Range,
5796 _bz_VecExprConstant<float>,
5797 Range > >
5798where(Range d1,
5799 float d2,
5800 Range d3)
5801{
5802 typedef _bz_VecWhere<Range,
5803 _bz_VecExprConstant<float>,
5804 Range > T_expr;
5805
5806 return _bz_VecExpr<T_expr>(T_expr(d1,
5807 _bz_VecExprConstant<float>(d2),
5808 d3));
5809}
5810
5811// where(Range, float, TinyVector<P_numtype3, N_length3>)
5812template<class P_numtype3, int N_length3>
5813inline
5814_bz_VecExpr<_bz_VecWhere<Range,
5815 _bz_VecExprConstant<float>,
5816 TinyVectorIterConst<P_numtype3, N_length3> > >
5817where(Range d1,
5818 float d2,
5819 const TinyVector<P_numtype3, N_length3>& d3)
5820{
5821 typedef _bz_VecWhere<Range,
5822 _bz_VecExprConstant<float>,
5823 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
5824
5825 return _bz_VecExpr<T_expr>(T_expr(d1,
5826 _bz_VecExprConstant<float>(d2),
5827 d3.begin()));
5828}
5829
5830// where(Range, float, float)
5831
5832inline
5833_bz_VecExpr<_bz_VecWhere<Range,
5834 _bz_VecExprConstant<float>,
5835 _bz_VecExprConstant<float> > >
5836where(Range d1,
5837 float d2,
5838 float d3)
5839{
5840 typedef _bz_VecWhere<Range,
5841 _bz_VecExprConstant<float>,
5842 _bz_VecExprConstant<float> > T_expr;
5843
5844 return _bz_VecExpr<T_expr>(T_expr(d1,
5845 _bz_VecExprConstant<float>(d2),
5846 _bz_VecExprConstant<float>(d3)));
5847}
5848
5849// where(Range, double, Vector<P_numtype3>)
5850template<class P_numtype3>
5851inline
5852_bz_VecExpr<_bz_VecWhere<Range,
5853 _bz_VecExprConstant<double>,
5854 VectorIterConst<P_numtype3> > >
5855where(Range d1,
5856 double d2,
5857 const Vector<P_numtype3>& d3)
5858{
5859 typedef _bz_VecWhere<Range,
5860 _bz_VecExprConstant<double>,
5861 VectorIterConst<P_numtype3> > T_expr;
5862
5863 return _bz_VecExpr<T_expr>(T_expr(d1,
5864 _bz_VecExprConstant<double>(d2),
5865 d3.begin()));
5866}
5867
5868// where(Range, double, _bz_VecExpr<P_expr3>)
5869template<class P_expr3>
5870inline
5871_bz_VecExpr<_bz_VecWhere<Range,
5872 _bz_VecExprConstant<double>,
5873 _bz_VecExpr<P_expr3> > >
5874where(Range d1,
5875 double d2,
5876 _bz_VecExpr<P_expr3> d3)
5877{
5878 typedef _bz_VecWhere<Range,
5879 _bz_VecExprConstant<double>,
5880 _bz_VecExpr<P_expr3> > T_expr;
5881
5882 return _bz_VecExpr<T_expr>(T_expr(d1,
5883 _bz_VecExprConstant<double>(d2),
5884 d3));
5885}
5886
5887// where(Range, double, VectorPick<P_numtype3>)
5888template<class P_numtype3>
5889inline
5890_bz_VecExpr<_bz_VecWhere<Range,
5891 _bz_VecExprConstant<double>,
5892 VectorPickIterConst<P_numtype3> > >
5893where(Range d1,
5894 double d2,
5895 const VectorPick<P_numtype3>& d3)
5896{
5897 typedef _bz_VecWhere<Range,
5898 _bz_VecExprConstant<double>,
5899 VectorPickIterConst<P_numtype3> > T_expr;
5900
5901 return _bz_VecExpr<T_expr>(T_expr(d1,
5902 _bz_VecExprConstant<double>(d2),
5903 d3.begin()));
5904}
5905
5906// where(Range, double, Range)
5907
5908inline
5909_bz_VecExpr<_bz_VecWhere<Range,
5910 _bz_VecExprConstant<double>,
5911 Range > >
5912where(Range d1,
5913 double d2,
5914 Range d3)
5915{
5916 typedef _bz_VecWhere<Range,
5917 _bz_VecExprConstant<double>,
5918 Range > T_expr;
5919
5920 return _bz_VecExpr<T_expr>(T_expr(d1,
5921 _bz_VecExprConstant<double>(d2),
5922 d3));
5923}
5924
5925// where(Range, double, TinyVector<P_numtype3, N_length3>)
5926template<class P_numtype3, int N_length3>
5927inline
5928_bz_VecExpr<_bz_VecWhere<Range,
5929 _bz_VecExprConstant<double>,
5930 TinyVectorIterConst<P_numtype3, N_length3> > >
5931where(Range d1,
5932 double d2,
5933 const TinyVector<P_numtype3, N_length3>& d3)
5934{
5935 typedef _bz_VecWhere<Range,
5936 _bz_VecExprConstant<double>,
5937 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
5938
5939 return _bz_VecExpr<T_expr>(T_expr(d1,
5940 _bz_VecExprConstant<double>(d2),
5941 d3.begin()));
5942}
5943
5944// where(Range, double, double)
5945
5946inline
5947_bz_VecExpr<_bz_VecWhere<Range,
5948 _bz_VecExprConstant<double>,
5949 _bz_VecExprConstant<double> > >
5950where(Range d1,
5951 double d2,
5952 double d3)
5953{
5954 typedef _bz_VecWhere<Range,
5955 _bz_VecExprConstant<double>,
5956 _bz_VecExprConstant<double> > T_expr;
5957
5958 return _bz_VecExpr<T_expr>(T_expr(d1,
5959 _bz_VecExprConstant<double>(d2),
5960 _bz_VecExprConstant<double>(d3)));
5961}
5962
5963// where(Range, long double, Vector<P_numtype3>)
5964template<class P_numtype3>
5965inline
5966_bz_VecExpr<_bz_VecWhere<Range,
5967 _bz_VecExprConstant<long double>,
5968 VectorIterConst<P_numtype3> > >
5969where(Range d1,
5970 long double d2,
5971 const Vector<P_numtype3>& d3)
5972{
5973 typedef _bz_VecWhere<Range,
5974 _bz_VecExprConstant<long double>,
5975 VectorIterConst<P_numtype3> > T_expr;
5976
5977 return _bz_VecExpr<T_expr>(T_expr(d1,
5978 _bz_VecExprConstant<long double>(d2),
5979 d3.begin()));
5980}
5981
5982// where(Range, long double, _bz_VecExpr<P_expr3>)
5983template<class P_expr3>
5984inline
5985_bz_VecExpr<_bz_VecWhere<Range,
5986 _bz_VecExprConstant<long double>,
5987 _bz_VecExpr<P_expr3> > >
5988where(Range d1,
5989 long double d2,
5990 _bz_VecExpr<P_expr3> d3)
5991{
5992 typedef _bz_VecWhere<Range,
5993 _bz_VecExprConstant<long double>,
5994 _bz_VecExpr<P_expr3> > T_expr;
5995
5996 return _bz_VecExpr<T_expr>(T_expr(d1,
5997 _bz_VecExprConstant<long double>(d2),
5998 d3));
5999}
6000
6001// where(Range, long double, VectorPick<P_numtype3>)
6002template<class P_numtype3>
6003inline
6004_bz_VecExpr<_bz_VecWhere<Range,
6005 _bz_VecExprConstant<long double>,
6006 VectorPickIterConst<P_numtype3> > >
6007where(Range d1,
6008 long double d2,
6009 const VectorPick<P_numtype3>& d3)
6010{
6011 typedef _bz_VecWhere<Range,
6012 _bz_VecExprConstant<long double>,
6013 VectorPickIterConst<P_numtype3> > T_expr;
6014
6015 return _bz_VecExpr<T_expr>(T_expr(d1,
6016 _bz_VecExprConstant<long double>(d2),
6017 d3.begin()));
6018}
6019
6020// where(Range, long double, Range)
6021
6022inline
6023_bz_VecExpr<_bz_VecWhere<Range,
6024 _bz_VecExprConstant<long double>,
6025 Range > >
6026where(Range d1,
6027 long double d2,
6028 Range d3)
6029{
6030 typedef _bz_VecWhere<Range,
6031 _bz_VecExprConstant<long double>,
6032 Range > T_expr;
6033
6034 return _bz_VecExpr<T_expr>(T_expr(d1,
6035 _bz_VecExprConstant<long double>(d2),
6036 d3));
6037}
6038
6039// where(Range, long double, TinyVector<P_numtype3, N_length3>)
6040template<class P_numtype3, int N_length3>
6041inline
6042_bz_VecExpr<_bz_VecWhere<Range,
6043 _bz_VecExprConstant<long double>,
6044 TinyVectorIterConst<P_numtype3, N_length3> > >
6045where(Range d1,
6046 long double d2,
6047 const TinyVector<P_numtype3, N_length3>& d3)
6048{
6049 typedef _bz_VecWhere<Range,
6050 _bz_VecExprConstant<long double>,
6051 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
6052
6053 return _bz_VecExpr<T_expr>(T_expr(d1,
6054 _bz_VecExprConstant<long double>(d2),
6055 d3.begin()));
6056}
6057
6058// where(Range, long double, long double)
6059
6060inline
6061_bz_VecExpr<_bz_VecWhere<Range,
6062 _bz_VecExprConstant<long double>,
6063 _bz_VecExprConstant<long double> > >
6064where(Range d1,
6065 long double d2,
6066 long double d3)
6067{
6068 typedef _bz_VecWhere<Range,
6069 _bz_VecExprConstant<long double>,
6070 _bz_VecExprConstant<long double> > T_expr;
6071
6072 return _bz_VecExpr<T_expr>(T_expr(d1,
6073 _bz_VecExprConstant<long double>(d2),
6074 _bz_VecExprConstant<long double>(d3)));
6075}
6076
6077// where(Range, complex<T2>, Vector<P_numtype3>)
6078#ifdef BZ_HAVE_COMPLEX
6079template<class T2, class P_numtype3>
6080inline
6081_bz_VecExpr<_bz_VecWhere<Range,
6082 _bz_VecExprConstant<complex<T2> > ,
6083 VectorIterConst<P_numtype3> > >
6084where(Range d1,
6085 complex<T2> d2,
6086 const Vector<P_numtype3>& d3)
6087{
6088 typedef _bz_VecWhere<Range,
6089 _bz_VecExprConstant<complex<T2> > ,
6090 VectorIterConst<P_numtype3> > T_expr;
6091
6092 return _bz_VecExpr<T_expr>(T_expr(d1,
6093 _bz_VecExprConstant<complex<T2> > (d2),
6094 d3.begin()));
6095}
6096#endif // BZ_HAVE_COMPLEX
6097
6098// where(Range, complex<T2>, _bz_VecExpr<P_expr3>)
6099#ifdef BZ_HAVE_COMPLEX
6100template<class T2, class P_expr3>
6101inline
6102_bz_VecExpr<_bz_VecWhere<Range,
6103 _bz_VecExprConstant<complex<T2> > ,
6104 _bz_VecExpr<P_expr3> > >
6105where(Range d1,
6106 complex<T2> d2,
6107 _bz_VecExpr<P_expr3> d3)
6108{
6109 typedef _bz_VecWhere<Range,
6110 _bz_VecExprConstant<complex<T2> > ,
6111 _bz_VecExpr<P_expr3> > T_expr;
6112
6113 return _bz_VecExpr<T_expr>(T_expr(d1,
6114 _bz_VecExprConstant<complex<T2> > (d2),
6115 d3));
6116}
6117#endif // BZ_HAVE_COMPLEX
6118
6119// where(Range, complex<T2>, VectorPick<P_numtype3>)
6120#ifdef BZ_HAVE_COMPLEX
6121template<class T2, class P_numtype3>
6122inline
6123_bz_VecExpr<_bz_VecWhere<Range,
6124 _bz_VecExprConstant<complex<T2> > ,
6125 VectorPickIterConst<P_numtype3> > >
6126where(Range d1,
6127 complex<T2> d2,
6128 const VectorPick<P_numtype3>& d3)
6129{
6130 typedef _bz_VecWhere<Range,
6131 _bz_VecExprConstant<complex<T2> > ,
6132 VectorPickIterConst<P_numtype3> > T_expr;
6133
6134 return _bz_VecExpr<T_expr>(T_expr(d1,
6135 _bz_VecExprConstant<complex<T2> > (d2),
6136 d3.begin()));
6137}
6138#endif // BZ_HAVE_COMPLEX
6139
6140// where(Range, complex<T2>, Range)
6141#ifdef BZ_HAVE_COMPLEX
6142template<class T2>
6143inline
6144_bz_VecExpr<_bz_VecWhere<Range,
6145 _bz_VecExprConstant<complex<T2> > ,
6146 Range > >
6147where(Range d1,
6148 complex<T2> d2,
6149 Range d3)
6150{
6151 typedef _bz_VecWhere<Range,
6152 _bz_VecExprConstant<complex<T2> > ,
6153 Range > T_expr;
6154
6155 return _bz_VecExpr<T_expr>(T_expr(d1,
6156 _bz_VecExprConstant<complex<T2> > (d2),
6157 d3));
6158}
6159#endif // BZ_HAVE_COMPLEX
6160
6161// where(Range, complex<T2>, TinyVector<P_numtype3, N_length3>)
6162#ifdef BZ_HAVE_COMPLEX
6163template<class T2, class P_numtype3, int N_length3>
6164inline
6165_bz_VecExpr<_bz_VecWhere<Range,
6166 _bz_VecExprConstant<complex<T2> > ,
6167 TinyVectorIterConst<P_numtype3, N_length3> > >
6168where(Range d1,
6169 complex<T2> d2,
6170 const TinyVector<P_numtype3, N_length3>& d3)
6171{
6172 typedef _bz_VecWhere<Range,
6173 _bz_VecExprConstant<complex<T2> > ,
6174 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
6175
6176 return _bz_VecExpr<T_expr>(T_expr(d1,
6177 _bz_VecExprConstant<complex<T2> > (d2),
6178 d3.begin()));
6179}
6180#endif // BZ_HAVE_COMPLEX
6181
6182// where(Range, complex<T2>, complex<T3>)
6183#ifdef BZ_HAVE_COMPLEX
6184template<class T2, class T3>
6185inline
6186_bz_VecExpr<_bz_VecWhere<Range,
6187 _bz_VecExprConstant<complex<T2> > ,
6188 _bz_VecExprConstant<complex<T3> > > >
6189where(Range d1,
6190 complex<T2> d2,
6191 complex<T3> d3)
6192{
6193 typedef _bz_VecWhere<Range,
6194 _bz_VecExprConstant<complex<T2> > ,
6195 _bz_VecExprConstant<complex<T3> > > T_expr;
6196
6197 return _bz_VecExpr<T_expr>(T_expr(d1,
6198 _bz_VecExprConstant<complex<T2> > (d2),
6199 _bz_VecExprConstant<complex<T3> > (d3)));
6200}
6201#endif // BZ_HAVE_COMPLEX
6202
6203// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, Vector<P_numtype3>)
6204template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype3>
6205inline
6206_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6207 VectorIterConst<P_numtype2>,
6208 VectorIterConst<P_numtype3> > >
6209where(const TinyVector<P_numtype1, N_length1>& d1,
6210 const Vector<P_numtype2>& d2,
6211 const Vector<P_numtype3>& d3)
6212{
6213 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6214 VectorIterConst<P_numtype2>,
6215 VectorIterConst<P_numtype3> > T_expr;
6216
6217 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6218 d2.begin(),
6219 d3.begin()));
6220}
6221
6222// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, _bz_VecExpr<P_expr3>)
6223template<class P_numtype1, int N_length1, class P_numtype2, class P_expr3>
6224inline
6225_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6226 VectorIterConst<P_numtype2>,
6227 _bz_VecExpr<P_expr3> > >
6228where(const TinyVector<P_numtype1, N_length1>& d1,
6229 const Vector<P_numtype2>& d2,
6230 _bz_VecExpr<P_expr3> d3)
6231{
6232 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6233 VectorIterConst<P_numtype2>,
6234 _bz_VecExpr<P_expr3> > T_expr;
6235
6236 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6237 d2.begin(),
6238 d3));
6239}
6240
6241// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, VectorPick<P_numtype3>)
6242template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype3>
6243inline
6244_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6245 VectorIterConst<P_numtype2>,
6246 VectorPickIterConst<P_numtype3> > >
6247where(const TinyVector<P_numtype1, N_length1>& d1,
6248 const Vector<P_numtype2>& d2,
6249 const VectorPick<P_numtype3>& d3)
6250{
6251 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6252 VectorIterConst<P_numtype2>,
6253 VectorPickIterConst<P_numtype3> > T_expr;
6254
6255 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6256 d2.begin(),
6257 d3.begin()));
6258}
6259
6260// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, Range)
6261template<class P_numtype1, int N_length1, class P_numtype2>
6262inline
6263_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6264 VectorIterConst<P_numtype2>,
6265 Range > >
6266where(const TinyVector<P_numtype1, N_length1>& d1,
6267 const Vector<P_numtype2>& d2,
6268 Range d3)
6269{
6270 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6271 VectorIterConst<P_numtype2>,
6272 Range > T_expr;
6273
6274 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6275 d2.begin(),
6276 d3));
6277}
6278
6279// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, TinyVector<P_numtype3, N_length3>)
6280template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype3, int N_length3>
6281inline
6282_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6283 VectorIterConst<P_numtype2>,
6284 TinyVectorIterConst<P_numtype3, N_length3> > >
6285where(const TinyVector<P_numtype1, N_length1>& d1,
6286 const Vector<P_numtype2>& d2,
6287 const TinyVector<P_numtype3, N_length3>& d3)
6288{
6289 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6290 VectorIterConst<P_numtype2>,
6291 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
6292
6293 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6294 d2.begin(),
6295 d3.begin()));
6296}
6297
6298// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, int)
6299template<class P_numtype1, int N_length1, class P_numtype2>
6300inline
6301_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6302 VectorIterConst<P_numtype2>,
6303 _bz_VecExprConstant<int> > >
6304where(const TinyVector<P_numtype1, N_length1>& d1,
6305 const Vector<P_numtype2>& d2,
6306 int d3)
6307{
6308 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6309 VectorIterConst<P_numtype2>,
6310 _bz_VecExprConstant<int> > T_expr;
6311
6312 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6313 d2.begin(),
6314 _bz_VecExprConstant<int>(d3)));
6315}
6316
6317// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, float)
6318template<class P_numtype1, int N_length1, class P_numtype2>
6319inline
6320_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6321 VectorIterConst<P_numtype2>,
6322 _bz_VecExprConstant<float> > >
6323where(const TinyVector<P_numtype1, N_length1>& d1,
6324 const Vector<P_numtype2>& d2,
6325 float d3)
6326{
6327 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6328 VectorIterConst<P_numtype2>,
6329 _bz_VecExprConstant<float> > T_expr;
6330
6331 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6332 d2.begin(),
6333 _bz_VecExprConstant<float>(d3)));
6334}
6335
6336// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, double)
6337template<class P_numtype1, int N_length1, class P_numtype2>
6338inline
6339_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6340 VectorIterConst<P_numtype2>,
6341 _bz_VecExprConstant<double> > >
6342where(const TinyVector<P_numtype1, N_length1>& d1,
6343 const Vector<P_numtype2>& d2,
6344 double d3)
6345{
6346 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6347 VectorIterConst<P_numtype2>,
6348 _bz_VecExprConstant<double> > T_expr;
6349
6350 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6351 d2.begin(),
6352 _bz_VecExprConstant<double>(d3)));
6353}
6354
6355// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, long double)
6356template<class P_numtype1, int N_length1, class P_numtype2>
6357inline
6358_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6359 VectorIterConst<P_numtype2>,
6360 _bz_VecExprConstant<long double> > >
6361where(const TinyVector<P_numtype1, N_length1>& d1,
6362 const Vector<P_numtype2>& d2,
6363 long double d3)
6364{
6365 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6366 VectorIterConst<P_numtype2>,
6367 _bz_VecExprConstant<long double> > T_expr;
6368
6369 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6370 d2.begin(),
6371 _bz_VecExprConstant<long double>(d3)));
6372}
6373
6374// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, complex<T3>)
6375#ifdef BZ_HAVE_COMPLEX
6376template<class P_numtype1, int N_length1, class P_numtype2, class T3>
6377inline
6378_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6379 VectorIterConst<P_numtype2>,
6380 _bz_VecExprConstant<complex<T3> > > >
6381where(const TinyVector<P_numtype1, N_length1>& d1,
6382 const Vector<P_numtype2>& d2,
6383 complex<T3> d3)
6384{
6385 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6386 VectorIterConst<P_numtype2>,
6387 _bz_VecExprConstant<complex<T3> > > T_expr;
6388
6389 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6390 d2.begin(),
6391 _bz_VecExprConstant<complex<T3> > (d3)));
6392}
6393#endif // BZ_HAVE_COMPLEX
6394
6395// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, Vector<P_numtype3>)
6396template<class P_numtype1, int N_length1, class P_expr2, class P_numtype3>
6397inline
6398_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6399 _bz_VecExpr<P_expr2>,
6400 VectorIterConst<P_numtype3> > >
6401where(const TinyVector<P_numtype1, N_length1>& d1,
6402 _bz_VecExpr<P_expr2> d2,
6403 const Vector<P_numtype3>& d3)
6404{
6405 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6406 _bz_VecExpr<P_expr2>,
6407 VectorIterConst<P_numtype3> > T_expr;
6408
6409 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6410 d2,
6411 d3.begin()));
6412}
6413
6414// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>)
6415template<class P_numtype1, int N_length1, class P_expr2, class P_expr3>
6416inline
6417_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6418 _bz_VecExpr<P_expr2>,
6419 _bz_VecExpr<P_expr3> > >
6420where(const TinyVector<P_numtype1, N_length1>& d1,
6421 _bz_VecExpr<P_expr2> d2,
6422 _bz_VecExpr<P_expr3> d3)
6423{
6424 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6425 _bz_VecExpr<P_expr2>,
6426 _bz_VecExpr<P_expr3> > T_expr;
6427
6428 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6429 d2,
6430 d3));
6431}
6432
6433// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, VectorPick<P_numtype3>)
6434template<class P_numtype1, int N_length1, class P_expr2, class P_numtype3>
6435inline
6436_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6437 _bz_VecExpr<P_expr2>,
6438 VectorPickIterConst<P_numtype3> > >
6439where(const TinyVector<P_numtype1, N_length1>& d1,
6440 _bz_VecExpr<P_expr2> d2,
6441 const VectorPick<P_numtype3>& d3)
6442{
6443 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6444 _bz_VecExpr<P_expr2>,
6445 VectorPickIterConst<P_numtype3> > T_expr;
6446
6447 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6448 d2,
6449 d3.begin()));
6450}
6451
6452// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, Range)
6453template<class P_numtype1, int N_length1, class P_expr2>
6454inline
6455_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6456 _bz_VecExpr<P_expr2>,
6457 Range > >
6458where(const TinyVector<P_numtype1, N_length1>& d1,
6459 _bz_VecExpr<P_expr2> d2,
6460 Range d3)
6461{
6462 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6463 _bz_VecExpr<P_expr2>,
6464 Range > T_expr;
6465
6466 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6467 d2,
6468 d3));
6469}
6470
6471// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, TinyVector<P_numtype3, N_length3>)
6472template<class P_numtype1, int N_length1, class P_expr2, class P_numtype3, int N_length3>
6473inline
6474_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6475 _bz_VecExpr<P_expr2>,
6476 TinyVectorIterConst<P_numtype3, N_length3> > >
6477where(const TinyVector<P_numtype1, N_length1>& d1,
6478 _bz_VecExpr<P_expr2> d2,
6479 const TinyVector<P_numtype3, N_length3>& d3)
6480{
6481 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6482 _bz_VecExpr<P_expr2>,
6483 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
6484
6485 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6486 d2,
6487 d3.begin()));
6488}
6489
6490// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, int)
6491template<class P_numtype1, int N_length1, class P_expr2>
6492inline
6493_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6494 _bz_VecExpr<P_expr2>,
6495 _bz_VecExprConstant<int> > >
6496where(const TinyVector<P_numtype1, N_length1>& d1,
6497 _bz_VecExpr<P_expr2> d2,
6498 int d3)
6499{
6500 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6501 _bz_VecExpr<P_expr2>,
6502 _bz_VecExprConstant<int> > T_expr;
6503
6504 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6505 d2,
6506 _bz_VecExprConstant<int>(d3)));
6507}
6508
6509// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, float)
6510template<class P_numtype1, int N_length1, class P_expr2>
6511inline
6512_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6513 _bz_VecExpr<P_expr2>,
6514 _bz_VecExprConstant<float> > >
6515where(const TinyVector<P_numtype1, N_length1>& d1,
6516 _bz_VecExpr<P_expr2> d2,
6517 float d3)
6518{
6519 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6520 _bz_VecExpr<P_expr2>,
6521 _bz_VecExprConstant<float> > T_expr;
6522
6523 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6524 d2,
6525 _bz_VecExprConstant<float>(d3)));
6526}
6527
6528// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, double)
6529template<class P_numtype1, int N_length1, class P_expr2>
6530inline
6531_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6532 _bz_VecExpr<P_expr2>,
6533 _bz_VecExprConstant<double> > >
6534where(const TinyVector<P_numtype1, N_length1>& d1,
6535 _bz_VecExpr<P_expr2> d2,
6536 double d3)
6537{
6538 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6539 _bz_VecExpr<P_expr2>,
6540 _bz_VecExprConstant<double> > T_expr;
6541
6542 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6543 d2,
6544 _bz_VecExprConstant<double>(d3)));
6545}
6546
6547// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, long double)
6548template<class P_numtype1, int N_length1, class P_expr2>
6549inline
6550_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6551 _bz_VecExpr<P_expr2>,
6552 _bz_VecExprConstant<long double> > >
6553where(const TinyVector<P_numtype1, N_length1>& d1,
6554 _bz_VecExpr<P_expr2> d2,
6555 long double d3)
6556{
6557 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6558 _bz_VecExpr<P_expr2>,
6559 _bz_VecExprConstant<long double> > T_expr;
6560
6561 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6562 d2,
6563 _bz_VecExprConstant<long double>(d3)));
6564}
6565
6566// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, complex<T3>)
6567#ifdef BZ_HAVE_COMPLEX
6568template<class P_numtype1, int N_length1, class P_expr2, class T3>
6569inline
6570_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6571 _bz_VecExpr<P_expr2>,
6572 _bz_VecExprConstant<complex<T3> > > >
6573where(const TinyVector<P_numtype1, N_length1>& d1,
6574 _bz_VecExpr<P_expr2> d2,
6575 complex<T3> d3)
6576{
6577 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6578 _bz_VecExpr<P_expr2>,
6579 _bz_VecExprConstant<complex<T3> > > T_expr;
6580
6581 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6582 d2,
6583 _bz_VecExprConstant<complex<T3> > (d3)));
6584}
6585#endif // BZ_HAVE_COMPLEX
6586
6587// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, Vector<P_numtype3>)
6588template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype3>
6589inline
6590_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6591 VectorPickIterConst<P_numtype2>,
6592 VectorIterConst<P_numtype3> > >
6593where(const TinyVector<P_numtype1, N_length1>& d1,
6594 const VectorPick<P_numtype2>& d2,
6595 const Vector<P_numtype3>& d3)
6596{
6597 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6598 VectorPickIterConst<P_numtype2>,
6599 VectorIterConst<P_numtype3> > T_expr;
6600
6601 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6602 d2.begin(),
6603 d3.begin()));
6604}
6605
6606// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3>)
6607template<class P_numtype1, int N_length1, class P_numtype2, class P_expr3>
6608inline
6609_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6610 VectorPickIterConst<P_numtype2>,
6611 _bz_VecExpr<P_expr3> > >
6612where(const TinyVector<P_numtype1, N_length1>& d1,
6613 const VectorPick<P_numtype2>& d2,
6614 _bz_VecExpr<P_expr3> d3)
6615{
6616 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6617 VectorPickIterConst<P_numtype2>,
6618 _bz_VecExpr<P_expr3> > T_expr;
6619
6620 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6621 d2.begin(),
6622 d3));
6623}
6624
6625// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, VectorPick<P_numtype3>)
6626template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype3>
6627inline
6628_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6629 VectorPickIterConst<P_numtype2>,
6630 VectorPickIterConst<P_numtype3> > >
6631where(const TinyVector<P_numtype1, N_length1>& d1,
6632 const VectorPick<P_numtype2>& d2,
6633 const VectorPick<P_numtype3>& d3)
6634{
6635 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6636 VectorPickIterConst<P_numtype2>,
6637 VectorPickIterConst<P_numtype3> > T_expr;
6638
6639 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6640 d2.begin(),
6641 d3.begin()));
6642}
6643
6644// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, Range)
6645template<class P_numtype1, int N_length1, class P_numtype2>
6646inline
6647_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6648 VectorPickIterConst<P_numtype2>,
6649 Range > >
6650where(const TinyVector<P_numtype1, N_length1>& d1,
6651 const VectorPick<P_numtype2>& d2,
6652 Range d3)
6653{
6654 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6655 VectorPickIterConst<P_numtype2>,
6656 Range > T_expr;
6657
6658 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6659 d2.begin(),
6660 d3));
6661}
6662
6663// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, TinyVector<P_numtype3, N_length3>)
6664template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype3, int N_length3>
6665inline
6666_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6667 VectorPickIterConst<P_numtype2>,
6668 TinyVectorIterConst<P_numtype3, N_length3> > >
6669where(const TinyVector<P_numtype1, N_length1>& d1,
6670 const VectorPick<P_numtype2>& d2,
6671 const TinyVector<P_numtype3, N_length3>& d3)
6672{
6673 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6674 VectorPickIterConst<P_numtype2>,
6675 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
6676
6677 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6678 d2.begin(),
6679 d3.begin()));
6680}
6681
6682// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, int)
6683template<class P_numtype1, int N_length1, class P_numtype2>
6684inline
6685_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6686 VectorPickIterConst<P_numtype2>,
6687 _bz_VecExprConstant<int> > >
6688where(const TinyVector<P_numtype1, N_length1>& d1,
6689 const VectorPick<P_numtype2>& d2,
6690 int d3)
6691{
6692 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6693 VectorPickIterConst<P_numtype2>,
6694 _bz_VecExprConstant<int> > T_expr;
6695
6696 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6697 d2.begin(),
6698 _bz_VecExprConstant<int>(d3)));
6699}
6700
6701// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, float)
6702template<class P_numtype1, int N_length1, class P_numtype2>
6703inline
6704_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6705 VectorPickIterConst<P_numtype2>,
6706 _bz_VecExprConstant<float> > >
6707where(const TinyVector<P_numtype1, N_length1>& d1,
6708 const VectorPick<P_numtype2>& d2,
6709 float d3)
6710{
6711 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6712 VectorPickIterConst<P_numtype2>,
6713 _bz_VecExprConstant<float> > T_expr;
6714
6715 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6716 d2.begin(),
6717 _bz_VecExprConstant<float>(d3)));
6718}
6719
6720// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, double)
6721template<class P_numtype1, int N_length1, class P_numtype2>
6722inline
6723_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6724 VectorPickIterConst<P_numtype2>,
6725 _bz_VecExprConstant<double> > >
6726where(const TinyVector<P_numtype1, N_length1>& d1,
6727 const VectorPick<P_numtype2>& d2,
6728 double d3)
6729{
6730 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6731 VectorPickIterConst<P_numtype2>,
6732 _bz_VecExprConstant<double> > T_expr;
6733
6734 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6735 d2.begin(),
6736 _bz_VecExprConstant<double>(d3)));
6737}
6738
6739// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, long double)
6740template<class P_numtype1, int N_length1, class P_numtype2>
6741inline
6742_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6743 VectorPickIterConst<P_numtype2>,
6744 _bz_VecExprConstant<long double> > >
6745where(const TinyVector<P_numtype1, N_length1>& d1,
6746 const VectorPick<P_numtype2>& d2,
6747 long double d3)
6748{
6749 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6750 VectorPickIterConst<P_numtype2>,
6751 _bz_VecExprConstant<long double> > T_expr;
6752
6753 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6754 d2.begin(),
6755 _bz_VecExprConstant<long double>(d3)));
6756}
6757
6758// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, complex<T3>)
6759#ifdef BZ_HAVE_COMPLEX
6760template<class P_numtype1, int N_length1, class P_numtype2, class T3>
6761inline
6762_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6763 VectorPickIterConst<P_numtype2>,
6764 _bz_VecExprConstant<complex<T3> > > >
6765where(const TinyVector<P_numtype1, N_length1>& d1,
6766 const VectorPick<P_numtype2>& d2,
6767 complex<T3> d3)
6768{
6769 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6770 VectorPickIterConst<P_numtype2>,
6771 _bz_VecExprConstant<complex<T3> > > T_expr;
6772
6773 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6774 d2.begin(),
6775 _bz_VecExprConstant<complex<T3> > (d3)));
6776}
6777#endif // BZ_HAVE_COMPLEX
6778
6779// where(TinyVector<P_numtype1, N_length1>, Range, Vector<P_numtype3>)
6780template<class P_numtype1, int N_length1, class P_numtype3>
6781inline
6782_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6783 Range,
6784 VectorIterConst<P_numtype3> > >
6785where(const TinyVector<P_numtype1, N_length1>& d1,
6786 Range d2,
6787 const Vector<P_numtype3>& d3)
6788{
6789 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6790 Range,
6791 VectorIterConst<P_numtype3> > T_expr;
6792
6793 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6794 d2,
6795 d3.begin()));
6796}
6797
6798// where(TinyVector<P_numtype1, N_length1>, Range, _bz_VecExpr<P_expr3>)
6799template<class P_numtype1, int N_length1, class P_expr3>
6800inline
6801_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6802 Range,
6803 _bz_VecExpr<P_expr3> > >
6804where(const TinyVector<P_numtype1, N_length1>& d1,
6805 Range d2,
6806 _bz_VecExpr<P_expr3> d3)
6807{
6808 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6809 Range,
6810 _bz_VecExpr<P_expr3> > T_expr;
6811
6812 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6813 d2,
6814 d3));
6815}
6816
6817// where(TinyVector<P_numtype1, N_length1>, Range, VectorPick<P_numtype3>)
6818template<class P_numtype1, int N_length1, class P_numtype3>
6819inline
6820_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6821 Range,
6822 VectorPickIterConst<P_numtype3> > >
6823where(const TinyVector<P_numtype1, N_length1>& d1,
6824 Range d2,
6825 const VectorPick<P_numtype3>& d3)
6826{
6827 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6828 Range,
6829 VectorPickIterConst<P_numtype3> > T_expr;
6830
6831 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6832 d2,
6833 d3.begin()));
6834}
6835
6836// where(TinyVector<P_numtype1, N_length1>, Range, Range)
6837template<class P_numtype1, int N_length1>
6838inline
6839_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6840 Range,
6841 Range > >
6842where(const TinyVector<P_numtype1, N_length1>& d1,
6843 Range d2,
6844 Range d3)
6845{
6846 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6847 Range,
6848 Range > T_expr;
6849
6850 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6851 d2,
6852 d3));
6853}
6854
6855// where(TinyVector<P_numtype1, N_length1>, Range, TinyVector<P_numtype3, N_length3>)
6856template<class P_numtype1, int N_length1, class P_numtype3, int N_length3>
6857inline
6858_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6859 Range,
6860 TinyVectorIterConst<P_numtype3, N_length3> > >
6861where(const TinyVector<P_numtype1, N_length1>& d1,
6862 Range d2,
6863 const TinyVector<P_numtype3, N_length3>& d3)
6864{
6865 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6866 Range,
6867 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
6868
6869 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6870 d2,
6871 d3.begin()));
6872}
6873
6874// where(TinyVector<P_numtype1, N_length1>, Range, int)
6875template<class P_numtype1, int N_length1>
6876inline
6877_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6878 Range,
6879 _bz_VecExprConstant<int> > >
6880where(const TinyVector<P_numtype1, N_length1>& d1,
6881 Range d2,
6882 int d3)
6883{
6884 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6885 Range,
6886 _bz_VecExprConstant<int> > T_expr;
6887
6888 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6889 d2,
6890 _bz_VecExprConstant<int>(d3)));
6891}
6892
6893// where(TinyVector<P_numtype1, N_length1>, Range, float)
6894template<class P_numtype1, int N_length1>
6895inline
6896_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6897 Range,
6898 _bz_VecExprConstant<float> > >
6899where(const TinyVector<P_numtype1, N_length1>& d1,
6900 Range d2,
6901 float d3)
6902{
6903 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6904 Range,
6905 _bz_VecExprConstant<float> > T_expr;
6906
6907 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6908 d2,
6909 _bz_VecExprConstant<float>(d3)));
6910}
6911
6912// where(TinyVector<P_numtype1, N_length1>, Range, double)
6913template<class P_numtype1, int N_length1>
6914inline
6915_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6916 Range,
6917 _bz_VecExprConstant<double> > >
6918where(const TinyVector<P_numtype1, N_length1>& d1,
6919 Range d2,
6920 double d3)
6921{
6922 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6923 Range,
6924 _bz_VecExprConstant<double> > T_expr;
6925
6926 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6927 d2,
6928 _bz_VecExprConstant<double>(d3)));
6929}
6930
6931// where(TinyVector<P_numtype1, N_length1>, Range, long double)
6932template<class P_numtype1, int N_length1>
6933inline
6934_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6935 Range,
6936 _bz_VecExprConstant<long double> > >
6937where(const TinyVector<P_numtype1, N_length1>& d1,
6938 Range d2,
6939 long double d3)
6940{
6941 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6942 Range,
6943 _bz_VecExprConstant<long double> > T_expr;
6944
6945 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6946 d2,
6947 _bz_VecExprConstant<long double>(d3)));
6948}
6949
6950// where(TinyVector<P_numtype1, N_length1>, Range, complex<T3>)
6951#ifdef BZ_HAVE_COMPLEX
6952template<class P_numtype1, int N_length1, class T3>
6953inline
6954_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6955 Range,
6956 _bz_VecExprConstant<complex<T3> > > >
6957where(const TinyVector<P_numtype1, N_length1>& d1,
6958 Range d2,
6959 complex<T3> d3)
6960{
6961 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6962 Range,
6963 _bz_VecExprConstant<complex<T3> > > T_expr;
6964
6965 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6966 d2,
6967 _bz_VecExprConstant<complex<T3> > (d3)));
6968}
6969#endif // BZ_HAVE_COMPLEX
6970
6971// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length2>, Vector<P_numtype3>)
6972template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_numtype3>
6973inline
6974_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6975 TinyVectorIterConst<P_numtype2, N_length2>,
6976 VectorIterConst<P_numtype3> > >
6977where(const TinyVector<P_numtype1, N_length1>& d1,
6978 const TinyVector<P_numtype2, N_length2>& d2,
6979 const Vector<P_numtype3>& d3)
6980{
6981 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6982 TinyVectorIterConst<P_numtype2, N_length2>,
6983 VectorIterConst<P_numtype3> > T_expr;
6984
6985 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
6986 d2.begin(),
6987 d3.begin()));
6988}
6989
6990// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length2>, _bz_VecExpr<P_expr3>)
6991template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_expr3>
6992inline
6993_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
6994 TinyVectorIterConst<P_numtype2, N_length2>,
6995 _bz_VecExpr<P_expr3> > >
6996where(const TinyVector<P_numtype1, N_length1>& d1,
6997 const TinyVector<P_numtype2, N_length2>& d2,
6998 _bz_VecExpr<P_expr3> d3)
6999{
7000 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7001 TinyVectorIterConst<P_numtype2, N_length2>,
7002 _bz_VecExpr<P_expr3> > T_expr;
7003
7004 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7005 d2.begin(),
7006 d3));
7007}
7008
7009// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length2>, VectorPick<P_numtype3>)
7010template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_numtype3>
7011inline
7012_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7013 TinyVectorIterConst<P_numtype2, N_length2>,
7014 VectorPickIterConst<P_numtype3> > >
7015where(const TinyVector<P_numtype1, N_length1>& d1,
7016 const TinyVector<P_numtype2, N_length2>& d2,
7017 const VectorPick<P_numtype3>& d3)
7018{
7019 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7020 TinyVectorIterConst<P_numtype2, N_length2>,
7021 VectorPickIterConst<P_numtype3> > T_expr;
7022
7023 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7024 d2.begin(),
7025 d3.begin()));
7026}
7027
7028// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length2>, Range)
7029template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
7030inline
7031_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7032 TinyVectorIterConst<P_numtype2, N_length2>,
7033 Range > >
7034where(const TinyVector<P_numtype1, N_length1>& d1,
7035 const TinyVector<P_numtype2, N_length2>& d2,
7036 Range d3)
7037{
7038 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7039 TinyVectorIterConst<P_numtype2, N_length2>,
7040 Range > T_expr;
7041
7042 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7043 d2.begin(),
7044 d3));
7045}
7046
7047// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length2>, TinyVector<P_numtype3, N_length3>)
7048template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_numtype3, int N_length3>
7049inline
7050_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7051 TinyVectorIterConst<P_numtype2, N_length2>,
7052 TinyVectorIterConst<P_numtype3, N_length3> > >
7053where(const TinyVector<P_numtype1, N_length1>& d1,
7054 const TinyVector<P_numtype2, N_length2>& d2,
7055 const TinyVector<P_numtype3, N_length3>& d3)
7056{
7057 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7058 TinyVectorIterConst<P_numtype2, N_length2>,
7059 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
7060
7061 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7062 d2.begin(),
7063 d3.begin()));
7064}
7065
7066// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length2>, int)
7067template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
7068inline
7069_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7070 TinyVectorIterConst<P_numtype2, N_length2>,
7071 _bz_VecExprConstant<int> > >
7072where(const TinyVector<P_numtype1, N_length1>& d1,
7073 const TinyVector<P_numtype2, N_length2>& d2,
7074 int d3)
7075{
7076 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7077 TinyVectorIterConst<P_numtype2, N_length2>,
7078 _bz_VecExprConstant<int> > T_expr;
7079
7080 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7081 d2.begin(),
7082 _bz_VecExprConstant<int>(d3)));
7083}
7084
7085// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length2>, float)
7086template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
7087inline
7088_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7089 TinyVectorIterConst<P_numtype2, N_length2>,
7090 _bz_VecExprConstant<float> > >
7091where(const TinyVector<P_numtype1, N_length1>& d1,
7092 const TinyVector<P_numtype2, N_length2>& d2,
7093 float d3)
7094{
7095 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7096 TinyVectorIterConst<P_numtype2, N_length2>,
7097 _bz_VecExprConstant<float> > T_expr;
7098
7099 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7100 d2.begin(),
7101 _bz_VecExprConstant<float>(d3)));
7102}
7103
7104// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length2>, double)
7105template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
7106inline
7107_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7108 TinyVectorIterConst<P_numtype2, N_length2>,
7109 _bz_VecExprConstant<double> > >
7110where(const TinyVector<P_numtype1, N_length1>& d1,
7111 const TinyVector<P_numtype2, N_length2>& d2,
7112 double d3)
7113{
7114 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7115 TinyVectorIterConst<P_numtype2, N_length2>,
7116 _bz_VecExprConstant<double> > T_expr;
7117
7118 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7119 d2.begin(),
7120 _bz_VecExprConstant<double>(d3)));
7121}
7122
7123// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length2>, long double)
7124template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
7125inline
7126_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7127 TinyVectorIterConst<P_numtype2, N_length2>,
7128 _bz_VecExprConstant<long double> > >
7129where(const TinyVector<P_numtype1, N_length1>& d1,
7130 const TinyVector<P_numtype2, N_length2>& d2,
7131 long double d3)
7132{
7133 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7134 TinyVectorIterConst<P_numtype2, N_length2>,
7135 _bz_VecExprConstant<long double> > T_expr;
7136
7137 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7138 d2.begin(),
7139 _bz_VecExprConstant<long double>(d3)));
7140}
7141
7142// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length2>, complex<T3>)
7143#ifdef BZ_HAVE_COMPLEX
7144template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class T3>
7145inline
7146_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7147 TinyVectorIterConst<P_numtype2, N_length2>,
7148 _bz_VecExprConstant<complex<T3> > > >
7149where(const TinyVector<P_numtype1, N_length1>& d1,
7150 const TinyVector<P_numtype2, N_length2>& d2,
7151 complex<T3> d3)
7152{
7153 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7154 TinyVectorIterConst<P_numtype2, N_length2>,
7155 _bz_VecExprConstant<complex<T3> > > T_expr;
7156
7157 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7158 d2.begin(),
7159 _bz_VecExprConstant<complex<T3> > (d3)));
7160}
7161#endif // BZ_HAVE_COMPLEX
7162
7163// where(TinyVector<P_numtype1, N_length1>, int, Vector<P_numtype3>)
7164template<class P_numtype1, int N_length1, class P_numtype3>
7165inline
7166_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7167 _bz_VecExprConstant<int>,
7168 VectorIterConst<P_numtype3> > >
7169where(const TinyVector<P_numtype1, N_length1>& d1,
7170 int d2,
7171 const Vector<P_numtype3>& d3)
7172{
7173 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7174 _bz_VecExprConstant<int>,
7175 VectorIterConst<P_numtype3> > T_expr;
7176
7177 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7178 _bz_VecExprConstant<int>(d2),
7179 d3.begin()));
7180}
7181
7182// where(TinyVector<P_numtype1, N_length1>, int, _bz_VecExpr<P_expr3>)
7183template<class P_numtype1, int N_length1, class P_expr3>
7184inline
7185_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7186 _bz_VecExprConstant<int>,
7187 _bz_VecExpr<P_expr3> > >
7188where(const TinyVector<P_numtype1, N_length1>& d1,
7189 int d2,
7190 _bz_VecExpr<P_expr3> d3)
7191{
7192 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7193 _bz_VecExprConstant<int>,
7194 _bz_VecExpr<P_expr3> > T_expr;
7195
7196 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7197 _bz_VecExprConstant<int>(d2),
7198 d3));
7199}
7200
7201// where(TinyVector<P_numtype1, N_length1>, int, VectorPick<P_numtype3>)
7202template<class P_numtype1, int N_length1, class P_numtype3>
7203inline
7204_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7205 _bz_VecExprConstant<int>,
7206 VectorPickIterConst<P_numtype3> > >
7207where(const TinyVector<P_numtype1, N_length1>& d1,
7208 int d2,
7209 const VectorPick<P_numtype3>& d3)
7210{
7211 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7212 _bz_VecExprConstant<int>,
7213 VectorPickIterConst<P_numtype3> > T_expr;
7214
7215 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7216 _bz_VecExprConstant<int>(d2),
7217 d3.begin()));
7218}
7219
7220// where(TinyVector<P_numtype1, N_length1>, int, Range)
7221template<class P_numtype1, int N_length1>
7222inline
7223_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7224 _bz_VecExprConstant<int>,
7225 Range > >
7226where(const TinyVector<P_numtype1, N_length1>& d1,
7227 int d2,
7228 Range d3)
7229{
7230 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7231 _bz_VecExprConstant<int>,
7232 Range > T_expr;
7233
7234 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7235 _bz_VecExprConstant<int>(d2),
7236 d3));
7237}
7238
7239// where(TinyVector<P_numtype1, N_length1>, int, TinyVector<P_numtype3, N_length3>)
7240template<class P_numtype1, int N_length1, class P_numtype3, int N_length3>
7241inline
7242_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7243 _bz_VecExprConstant<int>,
7244 TinyVectorIterConst<P_numtype3, N_length3> > >
7245where(const TinyVector<P_numtype1, N_length1>& d1,
7246 int d2,
7247 const TinyVector<P_numtype3, N_length3>& d3)
7248{
7249 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7250 _bz_VecExprConstant<int>,
7251 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
7252
7253 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7254 _bz_VecExprConstant<int>(d2),
7255 d3.begin()));
7256}
7257
7258// where(TinyVector<P_numtype1, N_length1>, int, int)
7259template<class P_numtype1, int N_length1>
7260inline
7261_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7262 _bz_VecExprConstant<int>,
7263 _bz_VecExprConstant<int> > >
7264where(const TinyVector<P_numtype1, N_length1>& d1,
7265 int d2,
7266 int d3)
7267{
7268 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7269 _bz_VecExprConstant<int>,
7270 _bz_VecExprConstant<int> > T_expr;
7271
7272 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7273 _bz_VecExprConstant<int>(d2),
7274 _bz_VecExprConstant<int>(d3)));
7275}
7276
7277// where(TinyVector<P_numtype1, N_length1>, float, Vector<P_numtype3>)
7278template<class P_numtype1, int N_length1, class P_numtype3>
7279inline
7280_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7281 _bz_VecExprConstant<float>,
7282 VectorIterConst<P_numtype3> > >
7283where(const TinyVector<P_numtype1, N_length1>& d1,
7284 float d2,
7285 const Vector<P_numtype3>& d3)
7286{
7287 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7288 _bz_VecExprConstant<float>,
7289 VectorIterConst<P_numtype3> > T_expr;
7290
7291 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7292 _bz_VecExprConstant<float>(d2),
7293 d3.begin()));
7294}
7295
7296// where(TinyVector<P_numtype1, N_length1>, float, _bz_VecExpr<P_expr3>)
7297template<class P_numtype1, int N_length1, class P_expr3>
7298inline
7299_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7300 _bz_VecExprConstant<float>,
7301 _bz_VecExpr<P_expr3> > >
7302where(const TinyVector<P_numtype1, N_length1>& d1,
7303 float d2,
7304 _bz_VecExpr<P_expr3> d3)
7305{
7306 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7307 _bz_VecExprConstant<float>,
7308 _bz_VecExpr<P_expr3> > T_expr;
7309
7310 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7311 _bz_VecExprConstant<float>(d2),
7312 d3));
7313}
7314
7315// where(TinyVector<P_numtype1, N_length1>, float, VectorPick<P_numtype3>)
7316template<class P_numtype1, int N_length1, class P_numtype3>
7317inline
7318_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7319 _bz_VecExprConstant<float>,
7320 VectorPickIterConst<P_numtype3> > >
7321where(const TinyVector<P_numtype1, N_length1>& d1,
7322 float d2,
7323 const VectorPick<P_numtype3>& d3)
7324{
7325 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7326 _bz_VecExprConstant<float>,
7327 VectorPickIterConst<P_numtype3> > T_expr;
7328
7329 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7330 _bz_VecExprConstant<float>(d2),
7331 d3.begin()));
7332}
7333
7334// where(TinyVector<P_numtype1, N_length1>, float, Range)
7335template<class P_numtype1, int N_length1>
7336inline
7337_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7338 _bz_VecExprConstant<float>,
7339 Range > >
7340where(const TinyVector<P_numtype1, N_length1>& d1,
7341 float d2,
7342 Range d3)
7343{
7344 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7345 _bz_VecExprConstant<float>,
7346 Range > T_expr;
7347
7348 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7349 _bz_VecExprConstant<float>(d2),
7350 d3));
7351}
7352
7353// where(TinyVector<P_numtype1, N_length1>, float, TinyVector<P_numtype3, N_length3>)
7354template<class P_numtype1, int N_length1, class P_numtype3, int N_length3>
7355inline
7356_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7357 _bz_VecExprConstant<float>,
7358 TinyVectorIterConst<P_numtype3, N_length3> > >
7359where(const TinyVector<P_numtype1, N_length1>& d1,
7360 float d2,
7361 const TinyVector<P_numtype3, N_length3>& d3)
7362{
7363 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7364 _bz_VecExprConstant<float>,
7365 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
7366
7367 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7368 _bz_VecExprConstant<float>(d2),
7369 d3.begin()));
7370}
7371
7372// where(TinyVector<P_numtype1, N_length1>, float, float)
7373template<class P_numtype1, int N_length1>
7374inline
7375_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7376 _bz_VecExprConstant<float>,
7377 _bz_VecExprConstant<float> > >
7378where(const TinyVector<P_numtype1, N_length1>& d1,
7379 float d2,
7380 float d3)
7381{
7382 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7383 _bz_VecExprConstant<float>,
7384 _bz_VecExprConstant<float> > T_expr;
7385
7386 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7387 _bz_VecExprConstant<float>(d2),
7388 _bz_VecExprConstant<float>(d3)));
7389}
7390
7391// where(TinyVector<P_numtype1, N_length1>, double, Vector<P_numtype3>)
7392template<class P_numtype1, int N_length1, class P_numtype3>
7393inline
7394_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7395 _bz_VecExprConstant<double>,
7396 VectorIterConst<P_numtype3> > >
7397where(const TinyVector<P_numtype1, N_length1>& d1,
7398 double d2,
7399 const Vector<P_numtype3>& d3)
7400{
7401 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7402 _bz_VecExprConstant<double>,
7403 VectorIterConst<P_numtype3> > T_expr;
7404
7405 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7406 _bz_VecExprConstant<double>(d2),
7407 d3.begin()));
7408}
7409
7410// where(TinyVector<P_numtype1, N_length1>, double, _bz_VecExpr<P_expr3>)
7411template<class P_numtype1, int N_length1, class P_expr3>
7412inline
7413_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7414 _bz_VecExprConstant<double>,
7415 _bz_VecExpr<P_expr3> > >
7416where(const TinyVector<P_numtype1, N_length1>& d1,
7417 double d2,
7418 _bz_VecExpr<P_expr3> d3)
7419{
7420 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7421 _bz_VecExprConstant<double>,
7422 _bz_VecExpr<P_expr3> > T_expr;
7423
7424 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7425 _bz_VecExprConstant<double>(d2),
7426 d3));
7427}
7428
7429// where(TinyVector<P_numtype1, N_length1>, double, VectorPick<P_numtype3>)
7430template<class P_numtype1, int N_length1, class P_numtype3>
7431inline
7432_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7433 _bz_VecExprConstant<double>,
7434 VectorPickIterConst<P_numtype3> > >
7435where(const TinyVector<P_numtype1, N_length1>& d1,
7436 double d2,
7437 const VectorPick<P_numtype3>& d3)
7438{
7439 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7440 _bz_VecExprConstant<double>,
7441 VectorPickIterConst<P_numtype3> > T_expr;
7442
7443 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7444 _bz_VecExprConstant<double>(d2),
7445 d3.begin()));
7446}
7447
7448// where(TinyVector<P_numtype1, N_length1>, double, Range)
7449template<class P_numtype1, int N_length1>
7450inline
7451_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7452 _bz_VecExprConstant<double>,
7453 Range > >
7454where(const TinyVector<P_numtype1, N_length1>& d1,
7455 double d2,
7456 Range d3)
7457{
7458 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7459 _bz_VecExprConstant<double>,
7460 Range > T_expr;
7461
7462 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7463 _bz_VecExprConstant<double>(d2),
7464 d3));
7465}
7466
7467// where(TinyVector<P_numtype1, N_length1>, double, TinyVector<P_numtype3, N_length3>)
7468template<class P_numtype1, int N_length1, class P_numtype3, int N_length3>
7469inline
7470_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7471 _bz_VecExprConstant<double>,
7472 TinyVectorIterConst<P_numtype3, N_length3> > >
7473where(const TinyVector<P_numtype1, N_length1>& d1,
7474 double d2,
7475 const TinyVector<P_numtype3, N_length3>& d3)
7476{
7477 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7478 _bz_VecExprConstant<double>,
7479 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
7480
7481 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7482 _bz_VecExprConstant<double>(d2),
7483 d3.begin()));
7484}
7485
7486// where(TinyVector<P_numtype1, N_length1>, double, double)
7487template<class P_numtype1, int N_length1>
7488inline
7489_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7490 _bz_VecExprConstant<double>,
7491 _bz_VecExprConstant<double> > >
7492where(const TinyVector<P_numtype1, N_length1>& d1,
7493 double d2,
7494 double d3)
7495{
7496 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7497 _bz_VecExprConstant<double>,
7498 _bz_VecExprConstant<double> > T_expr;
7499
7500 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7501 _bz_VecExprConstant<double>(d2),
7502 _bz_VecExprConstant<double>(d3)));
7503}
7504
7505// where(TinyVector<P_numtype1, N_length1>, long double, Vector<P_numtype3>)
7506template<class P_numtype1, int N_length1, class P_numtype3>
7507inline
7508_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7509 _bz_VecExprConstant<long double>,
7510 VectorIterConst<P_numtype3> > >
7511where(const TinyVector<P_numtype1, N_length1>& d1,
7512 long double d2,
7513 const Vector<P_numtype3>& d3)
7514{
7515 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7516 _bz_VecExprConstant<long double>,
7517 VectorIterConst<P_numtype3> > T_expr;
7518
7519 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7520 _bz_VecExprConstant<long double>(d2),
7521 d3.begin()));
7522}
7523
7524// where(TinyVector<P_numtype1, N_length1>, long double, _bz_VecExpr<P_expr3>)
7525template<class P_numtype1, int N_length1, class P_expr3>
7526inline
7527_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7528 _bz_VecExprConstant<long double>,
7529 _bz_VecExpr<P_expr3> > >
7530where(const TinyVector<P_numtype1, N_length1>& d1,
7531 long double d2,
7532 _bz_VecExpr<P_expr3> d3)
7533{
7534 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7535 _bz_VecExprConstant<long double>,
7536 _bz_VecExpr<P_expr3> > T_expr;
7537
7538 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7539 _bz_VecExprConstant<long double>(d2),
7540 d3));
7541}
7542
7543// where(TinyVector<P_numtype1, N_length1>, long double, VectorPick<P_numtype3>)
7544template<class P_numtype1, int N_length1, class P_numtype3>
7545inline
7546_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7547 _bz_VecExprConstant<long double>,
7548 VectorPickIterConst<P_numtype3> > >
7549where(const TinyVector<P_numtype1, N_length1>& d1,
7550 long double d2,
7551 const VectorPick<P_numtype3>& d3)
7552{
7553 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7554 _bz_VecExprConstant<long double>,
7555 VectorPickIterConst<P_numtype3> > T_expr;
7556
7557 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7558 _bz_VecExprConstant<long double>(d2),
7559 d3.begin()));
7560}
7561
7562// where(TinyVector<P_numtype1, N_length1>, long double, Range)
7563template<class P_numtype1, int N_length1>
7564inline
7565_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7566 _bz_VecExprConstant<long double>,
7567 Range > >
7568where(const TinyVector<P_numtype1, N_length1>& d1,
7569 long double d2,
7570 Range d3)
7571{
7572 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7573 _bz_VecExprConstant<long double>,
7574 Range > T_expr;
7575
7576 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7577 _bz_VecExprConstant<long double>(d2),
7578 d3));
7579}
7580
7581// where(TinyVector<P_numtype1, N_length1>, long double, TinyVector<P_numtype3, N_length3>)
7582template<class P_numtype1, int N_length1, class P_numtype3, int N_length3>
7583inline
7584_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7585 _bz_VecExprConstant<long double>,
7586 TinyVectorIterConst<P_numtype3, N_length3> > >
7587where(const TinyVector<P_numtype1, N_length1>& d1,
7588 long double d2,
7589 const TinyVector<P_numtype3, N_length3>& d3)
7590{
7591 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7592 _bz_VecExprConstant<long double>,
7593 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
7594
7595 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7596 _bz_VecExprConstant<long double>(d2),
7597 d3.begin()));
7598}
7599
7600// where(TinyVector<P_numtype1, N_length1>, long double, long double)
7601template<class P_numtype1, int N_length1>
7602inline
7603_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7604 _bz_VecExprConstant<long double>,
7605 _bz_VecExprConstant<long double> > >
7606where(const TinyVector<P_numtype1, N_length1>& d1,
7607 long double d2,
7608 long double d3)
7609{
7610 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7611 _bz_VecExprConstant<long double>,
7612 _bz_VecExprConstant<long double> > T_expr;
7613
7614 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7615 _bz_VecExprConstant<long double>(d2),
7616 _bz_VecExprConstant<long double>(d3)));
7617}
7618
7619// where(TinyVector<P_numtype1, N_length1>, complex<T2>, Vector<P_numtype3>)
7620#ifdef BZ_HAVE_COMPLEX
7621template<class P_numtype1, int N_length1, class T2, class P_numtype3>
7622inline
7623_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7624 _bz_VecExprConstant<complex<T2> > ,
7625 VectorIterConst<P_numtype3> > >
7626where(const TinyVector<P_numtype1, N_length1>& d1,
7627 complex<T2> d2,
7628 const Vector<P_numtype3>& d3)
7629{
7630 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7631 _bz_VecExprConstant<complex<T2> > ,
7632 VectorIterConst<P_numtype3> > T_expr;
7633
7634 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7635 _bz_VecExprConstant<complex<T2> > (d2),
7636 d3.begin()));
7637}
7638#endif // BZ_HAVE_COMPLEX
7639
7640// where(TinyVector<P_numtype1, N_length1>, complex<T2>, _bz_VecExpr<P_expr3>)
7641#ifdef BZ_HAVE_COMPLEX
7642template<class P_numtype1, int N_length1, class T2, class P_expr3>
7643inline
7644_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7645 _bz_VecExprConstant<complex<T2> > ,
7646 _bz_VecExpr<P_expr3> > >
7647where(const TinyVector<P_numtype1, N_length1>& d1,
7648 complex<T2> d2,
7649 _bz_VecExpr<P_expr3> d3)
7650{
7651 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7652 _bz_VecExprConstant<complex<T2> > ,
7653 _bz_VecExpr<P_expr3> > T_expr;
7654
7655 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7656 _bz_VecExprConstant<complex<T2> > (d2),
7657 d3));
7658}
7659#endif // BZ_HAVE_COMPLEX
7660
7661// where(TinyVector<P_numtype1, N_length1>, complex<T2>, VectorPick<P_numtype3>)
7662#ifdef BZ_HAVE_COMPLEX
7663template<class P_numtype1, int N_length1, class T2, class P_numtype3>
7664inline
7665_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7666 _bz_VecExprConstant<complex<T2> > ,
7667 VectorPickIterConst<P_numtype3> > >
7668where(const TinyVector<P_numtype1, N_length1>& d1,
7669 complex<T2> d2,
7670 const VectorPick<P_numtype3>& d3)
7671{
7672 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7673 _bz_VecExprConstant<complex<T2> > ,
7674 VectorPickIterConst<P_numtype3> > T_expr;
7675
7676 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7677 _bz_VecExprConstant<complex<T2> > (d2),
7678 d3.begin()));
7679}
7680#endif // BZ_HAVE_COMPLEX
7681
7682// where(TinyVector<P_numtype1, N_length1>, complex<T2>, Range)
7683#ifdef BZ_HAVE_COMPLEX
7684template<class P_numtype1, int N_length1, class T2>
7685inline
7686_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7687 _bz_VecExprConstant<complex<T2> > ,
7688 Range > >
7689where(const TinyVector<P_numtype1, N_length1>& d1,
7690 complex<T2> d2,
7691 Range d3)
7692{
7693 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7694 _bz_VecExprConstant<complex<T2> > ,
7695 Range > T_expr;
7696
7697 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7698 _bz_VecExprConstant<complex<T2> > (d2),
7699 d3));
7700}
7701#endif // BZ_HAVE_COMPLEX
7702
7703// where(TinyVector<P_numtype1, N_length1>, complex<T2>, TinyVector<P_numtype3, N_length3>)
7704#ifdef BZ_HAVE_COMPLEX
7705template<class P_numtype1, int N_length1, class T2, class P_numtype3, int N_length3>
7706inline
7707_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7708 _bz_VecExprConstant<complex<T2> > ,
7709 TinyVectorIterConst<P_numtype3, N_length3> > >
7710where(const TinyVector<P_numtype1, N_length1>& d1,
7711 complex<T2> d2,
7712 const TinyVector<P_numtype3, N_length3>& d3)
7713{
7714 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7715 _bz_VecExprConstant<complex<T2> > ,
7716 TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
7717
7718 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7719 _bz_VecExprConstant<complex<T2> > (d2),
7720 d3.begin()));
7721}
7722#endif // BZ_HAVE_COMPLEX
7723
7724// where(TinyVector<P_numtype1, N_length1>, complex<T2>, complex<T3>)
7725#ifdef BZ_HAVE_COMPLEX
7726template<class P_numtype1, int N_length1, class T2, class T3>
7727inline
7728_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7729 _bz_VecExprConstant<complex<T2> > ,
7730 _bz_VecExprConstant<complex<T3> > > >
7731where(const TinyVector<P_numtype1, N_length1>& d1,
7732 complex<T2> d2,
7733 complex<T3> d3)
7734{
7735 typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
7736 _bz_VecExprConstant<complex<T2> > ,
7737 _bz_VecExprConstant<complex<T3> > > T_expr;
7738
7739 return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
7740 _bz_VecExprConstant<complex<T2> > (d2),
7741 _bz_VecExprConstant<complex<T3> > (d3)));
7742}
7743#endif // BZ_HAVE_COMPLEX
7744
7745BZ_NAMESPACE_END
7746
7747#endif
Note: See TracBrowser for help on using the repository browser.