source: Sophya/trunk/SophyaExt/Blitz/blitz/vecwhere.cc@ 3668

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

Creation module DPC/Blitz (blitz 0.4) Reza 09/04/99

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