source: XMLIO_V2/external/include/blitz/tinyvec.cc @ 80

Last change on this file since 80 was 80, checked in by ymipsl, 14 years ago

ajout lib externe

File size: 20.6 KB
Line 
1/***************************************************************************
2 * blitz/tinyvec.cc  Declaration of TinyVector methods
3 *
4 * $Id: tinyvec.cc,v 1.9 2005/10/17 21:43:45 julianc Exp $
5 *
6 * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * Suggestions:          blitz-dev@oonumerics.org
19 * Bugs:                 blitz-bugs@oonumerics.org
20 *
21 * For more information, please see the Blitz++ Home Page:
22 *    http://oonumerics.org/blitz/
23 *
24 ***************************************************************************/
25
26#ifndef BZ_TINYVEC_CC
27#define BZ_TINYVEC_CC
28
29#include <blitz/tinyvec.h>
30#include <blitz/vector.h>
31#include <blitz/range.h>
32#include <blitz/meta/vecassign.h>
33
34BZ_NAMESPACE(blitz)
35
36template<typename P_numtype, int N_length>
37inline TinyVector<P_numtype, N_length>::TinyVector(const T_numtype initValue) {
38    for (int i=0; i < N_length; ++i)
39        data_[i] = initValue;
40}
41
42template<typename P_numtype, int N_length>
43inline TinyVector<P_numtype, N_length>::TinyVector(const TinyVector<T_numtype, N_length>& x) {
44    for (int i=0; i < N_length; ++i)
45        data_[i] = x.data_[i];
46}
47
48template<typename P_numtype, int N_length>
49template<typename P_numtype2>
50inline TinyVector<P_numtype, N_length>::TinyVector(const TinyVector<P_numtype2, N_length>& x) {
51    for (int i=0; i < N_length; ++i)
52        data_[i] = static_cast<P_numtype>(x[i]);
53}
54
55template<typename P_numtype, int N_length>
56template<typename P_expr, typename P_updater>
57inline void TinyVector<P_numtype, N_length>::_bz_assign(P_expr expr, P_updater up) {
58    BZPRECHECK(expr.length(N_length) == N_length,
59        "An expression with length " << expr.length(N_length)
60        << " was assigned to a TinyVector<"
61        << BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype)
62        << "," << N_length << ">");
63
64    if (expr._bz_hasFastAccess()) {
65        _bz_meta_vecAssign<N_length, 0>::fastAssign(*this, expr, up);
66    } else {
67        _bz_meta_vecAssign<N_length, 0>::assign(*this, expr, up);
68    }
69}
70
71// Constructor added by Peter Nordlund (peter.nordlund@ind.af.se)
72template<typename P_numtype, int N_length> template<typename P_expr>
73inline TinyVector<P_numtype, N_length>::TinyVector(_bz_VecExpr<P_expr> expr) 
74{
75  _bz_assign(expr, _bz_update<T_numtype, _bz_typename P_expr::T_numtype>());
76}
77
78/*****************************************************************************
79 * Assignment operators with vector expression operand
80 */
81
82template<typename P_numtype, int N_length> template<typename P_expr>
83inline TinyVector<P_numtype, N_length>& 
84TinyVector<P_numtype, N_length>::operator=(_bz_VecExpr<P_expr> expr)
85{
86    _bz_assign(expr, _bz_update<T_numtype, _bz_typename P_expr::T_numtype>());
87    return *this;
88}
89
90template<typename P_numtype, int N_length> template<typename P_expr>
91inline TinyVector<P_numtype, N_length>&
92TinyVector<P_numtype, N_length>::operator+=(_bz_VecExpr<P_expr> expr)
93{
94    _bz_assign(expr, _bz_plus_update<T_numtype, 
95        _bz_typename P_expr::T_numtype>());
96    return *this;
97}
98
99template<typename P_numtype, int N_length> template<typename P_expr>
100inline TinyVector<P_numtype, N_length>&
101TinyVector<P_numtype, N_length>::operator-=(_bz_VecExpr<P_expr> expr)
102{
103    _bz_assign(expr, _bz_minus_update<T_numtype,
104        _bz_typename P_expr::T_numtype>());
105    return *this;
106}
107
108template<typename P_numtype, int N_length> template<typename P_expr>
109inline TinyVector<P_numtype, N_length>&
110TinyVector<P_numtype, N_length>::operator*=(_bz_VecExpr<P_expr> expr)
111{
112    _bz_assign(expr, _bz_multiply_update<T_numtype,
113        _bz_typename P_expr::T_numtype>());
114    return *this;
115}
116
117template<typename P_numtype, int N_length> template<typename P_expr>
118inline TinyVector<P_numtype, N_length>&
119TinyVector<P_numtype, N_length>::operator/=(_bz_VecExpr<P_expr> expr)
120{
121    _bz_assign(expr, _bz_divide_update<T_numtype,
122        _bz_typename P_expr::T_numtype>());
123    return *this;
124}
125
126template<typename P_numtype, int N_length> template<typename P_expr>
127inline TinyVector<P_numtype, N_length>&
128TinyVector<P_numtype, N_length>::operator%=(_bz_VecExpr<P_expr> expr)
129{
130    _bz_assign(expr, _bz_mod_update<T_numtype,
131        _bz_typename P_expr::T_numtype>());
132    return *this;
133}
134
135template<typename P_numtype, int N_length> template<typename P_expr>
136inline TinyVector<P_numtype, N_length>&
137TinyVector<P_numtype, N_length>::operator^=(_bz_VecExpr<P_expr> expr)
138{
139    _bz_assign(expr, _bz_xor_update<T_numtype,
140        _bz_typename P_expr::T_numtype>());
141    return *this;
142}
143
144template<typename P_numtype, int N_length> template<typename P_expr>
145inline TinyVector<P_numtype, N_length>&
146TinyVector<P_numtype, N_length>::operator&=(_bz_VecExpr<P_expr> expr)
147{
148    _bz_assign(expr, _bz_bitand_update<T_numtype,
149        _bz_typename P_expr::T_numtype>());
150    return *this;
151}
152
153template<typename P_numtype, int N_length> template<typename P_expr>
154inline TinyVector<P_numtype, N_length>&
155TinyVector<P_numtype, N_length>::operator|=(_bz_VecExpr<P_expr> expr)
156{
157    _bz_assign(expr, _bz_bitor_update<T_numtype,
158        _bz_typename P_expr::T_numtype>());
159    return *this;
160}
161
162template<typename P_numtype, int N_length> template<typename P_expr>
163inline TinyVector<P_numtype, N_length>&
164TinyVector<P_numtype, N_length>::operator<<=(_bz_VecExpr<P_expr> expr)
165{
166    _bz_assign(expr, _bz_shiftl_update<T_numtype,
167        _bz_typename P_expr::T_numtype>());
168    return *this;
169}
170
171template<typename P_numtype, int N_length> template<typename P_expr>
172inline TinyVector<P_numtype, N_length>&
173TinyVector<P_numtype, N_length>::operator>>=(_bz_VecExpr<P_expr> expr)
174{
175    _bz_assign(expr, _bz_shiftr_update<T_numtype,
176        _bz_typename P_expr::T_numtype>());
177    return *this;
178}
179
180/*****************************************************************************
181 * Assignment operators with scalar operand
182 */
183
184template<typename P_numtype, int N_length> 
185inline TinyVector<P_numtype, N_length>&
186TinyVector<P_numtype, N_length>::initialize(const T_numtype x)
187{
188#ifndef BZ_KCC_COPY_PROPAGATION_KLUDGE
189    typedef _bz_VecExprConstant<T_numtype> T_expr;
190    (*this) = _bz_VecExpr<T_expr>(T_expr(x));
191#else
192    // Avoid using the copy propagation kludge for this simple
193    // operation.
194    for (int i=0; i < N_length; ++i)
195        data_[i] = x;
196#endif
197    return *this;
198}
199
200template<typename P_numtype, int N_length>
201inline TinyVector<P_numtype, N_length>&
202TinyVector<P_numtype, N_length>::operator+=(const T_numtype x)
203{
204    typedef _bz_VecExprConstant<T_numtype> T_expr;
205    (*this) += _bz_VecExpr<T_expr>(T_expr(x));
206    return *this;
207}
208
209template<typename P_numtype, int N_length>
210inline TinyVector<P_numtype, N_length>&
211TinyVector<P_numtype, N_length>::operator-=(const T_numtype x)
212{
213    typedef _bz_VecExprConstant<T_numtype> T_expr;
214    (*this) -= _bz_VecExpr<T_expr>(T_expr(x));
215    return *this;
216}
217
218template<typename P_numtype, int N_length>
219inline TinyVector<P_numtype, N_length>&
220TinyVector<P_numtype, N_length>::operator*=(const T_numtype x)
221{
222    typedef _bz_VecExprConstant<T_numtype> T_expr;
223    (*this) *= _bz_VecExpr<T_expr>(T_expr(x));
224    return *this;
225}
226
227template<typename P_numtype, int N_length>
228inline TinyVector<P_numtype, N_length>&
229TinyVector<P_numtype, N_length>::operator/=(const T_numtype x)
230{
231    typedef _bz_VecExprConstant<T_numtype> T_expr;
232    (*this) /= _bz_VecExpr<T_expr>(T_expr(x));
233    return *this;
234}
235
236template<typename P_numtype, int N_length>
237inline TinyVector<P_numtype, N_length>&
238TinyVector<P_numtype, N_length>::operator%=(const T_numtype x)
239{
240    typedef _bz_VecExprConstant<T_numtype> T_expr;
241    (*this) %= _bz_VecExpr<T_expr>(T_expr(x));
242    return *this;
243}
244
245template<typename P_numtype, int N_length>
246inline TinyVector<P_numtype, N_length>&
247TinyVector<P_numtype, N_length>::operator^=(const T_numtype x)
248{
249    typedef _bz_VecExprConstant<T_numtype> T_expr;
250    (*this) ^= _bz_VecExpr<T_expr>(T_expr(x));
251    return *this;
252}
253
254template<typename P_numtype, int N_length>
255inline TinyVector<P_numtype, N_length>&
256TinyVector<P_numtype, N_length>::operator&=(const T_numtype x)
257{
258    typedef _bz_VecExprConstant<T_numtype> T_expr;
259    (*this) &= _bz_VecExpr<T_expr>(T_expr(x));
260    return *this;
261}
262
263template<typename P_numtype, int N_length>
264inline TinyVector<P_numtype, N_length>&
265TinyVector<P_numtype, N_length>::operator|=(const T_numtype x)
266{
267    typedef _bz_VecExprConstant<T_numtype> T_expr;
268    (*this) |= _bz_VecExpr<T_expr>(T_expr(x));
269    return *this;
270}
271
272template<typename P_numtype, int N_length>
273inline TinyVector<P_numtype, N_length>&
274TinyVector<P_numtype, N_length>::operator<<=(const int x)
275{
276    typedef _bz_VecExprConstant<int> T_expr;
277    (*this) <<= _bz_VecExpr<T_expr>(T_expr(x));
278    return *this;
279}
280
281template<typename P_numtype, int N_length>
282inline TinyVector<P_numtype, N_length>&
283TinyVector<P_numtype, N_length>::operator>>=(const int x)
284{
285    typedef _bz_VecExprConstant<int> T_expr;
286    (*this) >>= _bz_VecExpr<T_expr>(T_expr(x));
287    return *this;
288}
289
290/*****************************************************************************
291 * Assignment operators with TinyVector operand
292 */
293
294template<typename P_numtype, int N_length> template<typename P_numtype2>
295inline TinyVector<P_numtype, N_length>&
296TinyVector<P_numtype, N_length>::operator=(const TinyVector<P_numtype2, N_length>& x) {
297    (*this) = _bz_VecExpr<_bz_typename
298        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
299    return *this;
300}
301
302template<typename P_numtype, int N_length> template<typename P_numtype2>
303inline TinyVector<P_numtype, N_length>&
304TinyVector<P_numtype, N_length>::operator+=(const TinyVector<P_numtype2, N_length>& x) {
305    (*this) += _bz_VecExpr<_bz_typename
306        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
307    return *this;
308}
309
310template<typename P_numtype, int N_length> template<typename P_numtype2>
311inline TinyVector<P_numtype, N_length>&
312TinyVector<P_numtype, N_length>::operator-=(const TinyVector<P_numtype2, N_length>& x) {
313    (*this) -= _bz_VecExpr<_bz_typename
314        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
315    return *this;
316}
317
318template<typename P_numtype, int N_length> template<typename P_numtype2>
319inline TinyVector<P_numtype, N_length>&
320TinyVector<P_numtype, N_length>::operator*=(const TinyVector<P_numtype2, N_length>& x) {
321    (*this) *= _bz_VecExpr<_bz_typename
322        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
323    return *this;
324}
325
326template<typename P_numtype, int N_length> template<typename P_numtype2>
327inline TinyVector<P_numtype, N_length>&
328TinyVector<P_numtype, N_length>::operator/=(const TinyVector<P_numtype2, N_length>& x) {
329    (*this) /= _bz_VecExpr<_bz_typename
330        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
331    return *this;
332}
333
334template<typename P_numtype, int N_length> template<typename P_numtype2>
335inline TinyVector<P_numtype, N_length>&
336TinyVector<P_numtype, N_length>::operator%=(const TinyVector<P_numtype2, N_length>& x) {
337    (*this) %= _bz_VecExpr<_bz_typename
338        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
339    return *this;
340}
341
342template<typename P_numtype, int N_length> template<typename P_numtype2>
343inline TinyVector<P_numtype, N_length>&
344TinyVector<P_numtype, N_length>::operator^=(const TinyVector<P_numtype2, N_length>& x) {
345    (*this) ^= _bz_VecExpr<_bz_typename
346        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
347    return *this;
348}
349
350template<typename P_numtype, int N_length> template<typename P_numtype2>
351inline TinyVector<P_numtype, N_length>&
352TinyVector<P_numtype, N_length>::operator&=(const TinyVector<P_numtype2, N_length>& x) {
353    (*this) &= _bz_VecExpr<_bz_typename
354        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
355    return *this;
356}
357
358template<typename P_numtype, int N_length> template<typename P_numtype2>
359inline TinyVector<P_numtype, N_length>&
360TinyVector<P_numtype, N_length>::operator|=(const TinyVector<P_numtype2, N_length>& x) {
361    (*this) |= _bz_VecExpr<_bz_typename
362        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
363    return *this;
364}
365
366template<typename P_numtype, int N_length> template<typename P_numtype2>
367inline TinyVector<P_numtype, N_length>&
368TinyVector<P_numtype, N_length>::operator<<=(const TinyVector<P_numtype2, N_length>& x) {
369    (*this) <<= _bz_VecExpr<_bz_typename
370        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
371    return *this;
372}
373
374template<typename P_numtype, int N_length> template<typename P_numtype2>
375inline TinyVector<P_numtype, N_length>&
376TinyVector<P_numtype, N_length>::operator>>=(const TinyVector<P_numtype2, N_length>& x) {
377    (*this) >>= _bz_VecExpr<_bz_typename
378        TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
379    return *this;
380}
381
382/*****************************************************************************
383 * Assignment operators with Vector operand
384 */
385
386template<typename P_numtype, int N_length> template<typename P_numtype2>
387inline TinyVector<P_numtype, N_length>&
388TinyVector<P_numtype, N_length>::operator=(const Vector<P_numtype2>& x) {
389    (*this) = x._bz_asVecExpr();
390    return *this;
391}
392
393template<typename P_numtype, int N_length> template<typename P_numtype2>
394inline TinyVector<P_numtype, N_length>&
395TinyVector<P_numtype, N_length>::operator+=(const Vector<P_numtype2>& x) {
396    (*this) += x._bz_asVecExpr();
397    return *this;
398}
399
400template<typename P_numtype, int N_length> template<typename P_numtype2>
401inline TinyVector<P_numtype, N_length>&
402TinyVector<P_numtype, N_length>::operator-=(const Vector<P_numtype2>& x) {
403    (*this) -= x._bz_asVecExpr();
404    return *this;
405}
406
407template<typename P_numtype, int N_length> template<typename P_numtype2>
408inline TinyVector<P_numtype, N_length>&
409TinyVector<P_numtype, N_length>::operator*=(const Vector<P_numtype2>& x) {
410    (*this) *= x._bz_asVecExpr();
411    return *this;
412}
413
414template<typename P_numtype, int N_length> template<typename P_numtype2>
415inline TinyVector<P_numtype, N_length>&
416TinyVector<P_numtype, N_length>::operator/=(const Vector<P_numtype2>& x) {
417    (*this) /= x._bz_asVecExpr();
418    return *this;
419}
420
421template<typename P_numtype, int N_length> template<typename P_numtype2>
422inline TinyVector<P_numtype, N_length>&
423TinyVector<P_numtype, N_length>::operator%=(const Vector<P_numtype2>& x) {
424    (*this) %= x._bz_asVecExpr();
425    return *this;
426}
427
428template<typename P_numtype, int N_length> template<typename P_numtype2>
429inline TinyVector<P_numtype, N_length>&
430TinyVector<P_numtype, N_length>::operator^=(const Vector<P_numtype2>& x) {
431    (*this) ^= x._bz_asVecExpr();
432    return *this;
433}
434
435template<typename P_numtype, int N_length> template<typename P_numtype2>
436inline TinyVector<P_numtype, N_length>&
437TinyVector<P_numtype, N_length>::operator&=(const Vector<P_numtype2>& x) {
438    (*this) &= x._bz_asVecExpr();
439    return *this;
440}
441
442template<typename P_numtype, int N_length> template<typename P_numtype2>
443inline TinyVector<P_numtype, N_length>&
444TinyVector<P_numtype, N_length>::operator|=(const Vector<P_numtype2>& x) {
445    (*this) |= x._bz_asVecExpr();
446    return *this;
447}
448
449template<typename P_numtype, int N_length> template<typename P_numtype2>
450inline TinyVector<P_numtype, N_length>&
451TinyVector<P_numtype, N_length>::operator<<=(const Vector<P_numtype2>& x) {
452    (*this) <<= x._bz_asVecExpr();
453    return *this;
454}
455
456template<typename P_numtype, int N_length> template<typename P_numtype2>
457inline TinyVector<P_numtype, N_length>&
458TinyVector<P_numtype, N_length>::operator>>=(const Vector<P_numtype2>& x) {
459    (*this) >>= x._bz_asVecExpr();
460    return *this;
461}
462
463/*****************************************************************************
464 * Assignment operators with Range operand
465 */
466
467template<typename P_numtype, int N_length> 
468inline TinyVector<P_numtype, N_length>&
469TinyVector<P_numtype, N_length>::operator=(const Range& r) {
470    (*this) = r._bz_asVecExpr();
471    return *this;
472}
473
474template<typename P_numtype, int N_length>
475inline TinyVector<P_numtype, N_length>&
476TinyVector<P_numtype, N_length>::operator+=(const Range& r) {
477    (*this) += r._bz_asVecExpr();
478    return *this;
479}
480
481template<typename P_numtype, int N_length>
482inline TinyVector<P_numtype, N_length>&
483TinyVector<P_numtype, N_length>::operator-=(const Range& r) {
484    (*this) -= r._bz_asVecExpr();
485    return *this;
486}
487
488template<typename P_numtype, int N_length>
489inline TinyVector<P_numtype, N_length>&
490TinyVector<P_numtype, N_length>::operator*=(const Range& r) {
491    (*this) *= r._bz_asVecExpr();
492    return *this;
493}
494
495template<typename P_numtype, int N_length>
496inline TinyVector<P_numtype, N_length>&
497TinyVector<P_numtype, N_length>::operator/=(const Range& r) {
498    (*this) /= r._bz_asVecExpr();
499    return *this;
500}
501
502template<typename P_numtype, int N_length>
503inline TinyVector<P_numtype, N_length>&
504TinyVector<P_numtype, N_length>::operator%=(const Range& r) {
505    (*this) %= r._bz_asVecExpr();
506    return *this;
507}
508
509template<typename P_numtype, int N_length>
510inline TinyVector<P_numtype, N_length>&
511TinyVector<P_numtype, N_length>::operator^=(const Range& r) {
512    (*this) ^= r._bz_asVecExpr();
513    return *this;
514}
515
516template<typename P_numtype, int N_length>
517inline TinyVector<P_numtype, N_length>&
518TinyVector<P_numtype, N_length>::operator&=(const Range& r) {
519    (*this) &= r._bz_asVecExpr();
520    return *this;
521}
522
523template<typename P_numtype, int N_length>
524inline TinyVector<P_numtype, N_length>&
525TinyVector<P_numtype, N_length>::operator|=(const Range& r) {
526    (*this) |= r._bz_asVecExpr();
527    return *this;
528}
529
530template<typename P_numtype, int N_length>
531inline TinyVector<P_numtype, N_length>&
532TinyVector<P_numtype, N_length>::operator<<=(const Range& r) {
533    (*this) <<= r._bz_asVecExpr();
534    return *this;
535}
536
537template<typename P_numtype, int N_length>
538inline TinyVector<P_numtype, N_length>&
539TinyVector<P_numtype, N_length>::operator>>=(const Range& r) {
540    (*this) >>= r._bz_asVecExpr();
541    return *this;
542}
543
544/*****************************************************************************
545 * Assignment operators with VectorPick operand
546 */
547
548template<typename P_numtype, int N_length> template<typename P_numtype2>
549inline TinyVector<P_numtype, N_length>&
550TinyVector<P_numtype, N_length>::operator=(const VectorPick<P_numtype2>& x)
551{
552    (*this) = x._bz_asVecExpr();
553    return *this;
554}
555
556template<typename P_numtype, int N_length> template<typename P_numtype2>
557inline TinyVector<P_numtype, N_length>&
558TinyVector<P_numtype, N_length>::operator+=(const VectorPick<P_numtype2>& x)
559{
560    (*this) += x._bz_asVecExpr();
561    return *this;
562}
563
564template<typename P_numtype, int N_length> template<typename P_numtype2>
565inline TinyVector<P_numtype, N_length>&
566TinyVector<P_numtype, N_length>::operator-=(const VectorPick<P_numtype2>& x)
567{
568    (*this) -= x._bz_asVecExpr();
569    return *this;
570}
571
572template<typename P_numtype, int N_length> template<typename P_numtype2>
573inline TinyVector<P_numtype, N_length>&
574TinyVector<P_numtype, N_length>::operator*=(const VectorPick<P_numtype2>& x)
575{
576    (*this) *= x._bz_asVecExpr();
577    return *this;
578}
579
580template<typename P_numtype, int N_length> template<typename P_numtype2>
581inline TinyVector<P_numtype, N_length>&
582TinyVector<P_numtype, N_length>::operator/=(const VectorPick<P_numtype2>& x)
583{
584    (*this) /= x._bz_asVecExpr();
585    return *this;
586}
587
588template<typename P_numtype, int N_length> template<typename P_numtype2>
589inline TinyVector<P_numtype, N_length>&
590TinyVector<P_numtype, N_length>::operator%=(const VectorPick<P_numtype2>& x)
591{
592    (*this) %= x._bz_asVecExpr();
593    return *this;
594}
595
596template<typename P_numtype, int N_length> template<typename P_numtype2>
597inline TinyVector<P_numtype, N_length>&
598TinyVector<P_numtype, N_length>::operator^=(const VectorPick<P_numtype2>& x)
599{
600    (*this) ^= x._bz_asVecExpr();
601    return *this;
602}
603
604template<typename P_numtype, int N_length> template<typename P_numtype2>
605inline TinyVector<P_numtype, N_length>&
606TinyVector<P_numtype, N_length>::operator&=(const VectorPick<P_numtype2>& x)
607{
608    (*this) &= x._bz_asVecExpr();
609    return *this;
610}
611
612template<typename P_numtype, int N_length> template<typename P_numtype2>
613inline TinyVector<P_numtype, N_length>&
614TinyVector<P_numtype, N_length>::operator|=(const VectorPick<P_numtype2>& x)
615{
616    (*this) |= x._bz_asVecExpr();
617    return *this;
618}
619
620template<typename P_numtype, int N_length> template<typename P_numtype2>
621inline TinyVector<P_numtype, N_length>&
622TinyVector<P_numtype, N_length>::operator>>=(const VectorPick<P_numtype2>& x)
623{
624    (*this) <<= x._bz_asVecExpr();
625    return *this;
626}
627
628BZ_NAMESPACE_END
629
630#endif // BZ_TINYVEC_CC
Note: See TracBrowser for help on using the repository browser.