applics.h   applics.h 
/************************************************************************** * /************************************************************************** *
* blitz/applics.h Applicative template classes * blitz/applics.h Applicative template classes
* *
* $Id: applics.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: applics.h,v 1.5 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: applics.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.5 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.4 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.3 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_APPLICS_H #ifndef BZ_APPLICS_H
#define BZ_APPLICS_H #define BZ_APPLICS_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
#ifndef BZ_PROMOTE_H #ifndef BZ_PROMOTE_H
#include <blitz/promote.h> #include <blitz/promote.h>
skipping to change at line 71 skipping to change at line 50
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// These base classes are included for no other reason than to keep // These base classes are included for no other reason than to keep
// the applicative templates clustered together in a graphical // the applicative templates clustered together in a graphical
// class browser. // class browser.
class ApplicativeTemplatesBase { }; class ApplicativeTemplatesBase { };
class TwoOperandApplicativeTemplatesBase : public ApplicativeTemplatesBase { }; class TwoOperandApplicativeTemplatesBase : public ApplicativeTemplatesBase { };
class OneOperandApplicativeTemplatesBase : public ApplicativeTemplatesBase { }; class OneOperandApplicativeTemplatesBase : public ApplicativeTemplatesBase { };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_Add : public TwoOperandApplicativeTemplatesBase { class _bz_Add : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote; typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x + y; } { return x + y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_Subtract : public TwoOperandApplicativeTemplatesBase { class _bz_Subtract : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote; typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x - y; } { return x - y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_Multiply : public TwoOperandApplicativeTemplatesBase { class _bz_Multiply : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote; typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x * y; } { return x * y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_Divide : public TwoOperandApplicativeTemplatesBase { class _bz_Divide : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote; typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x / y; } { return x / y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_Mod : public TwoOperandApplicativeTemplatesBase { class _bz_Mod : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote; typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x % y; } { return x % y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_BitwiseXOR : public TwoOperandApplicativeTemplatesBase { class _bz_BitwiseXOR : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote; typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x ^ y; } { return x ^ y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_BitwiseAnd : public TwoOperandApplicativeTemplatesBase { class _bz_BitwiseAnd : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote; typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x & y; } { return x & y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_BitwiseOr : public TwoOperandApplicativeTemplatesBase { class _bz_BitwiseOr : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote; typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x | y; } { return x | y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_ShiftRight : public TwoOperandApplicativeTemplatesBase { class _bz_ShiftRight : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote; typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x >> y; } { return x >> y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_ShiftLeft : public TwoOperandApplicativeTemplatesBase { class _bz_ShiftLeft : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote; typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x << y; } { return x << y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_Min : public TwoOperandApplicativeTemplatesBase {
public:
typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return (x < y ? x : y); }
};
template<typename P_numtype1, typename P_numtype2>
class _bz_Max : public TwoOperandApplicativeTemplatesBase {
public:
typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2;
typedef BZ_PROMOTE(T_numtype1,T_numtype2) T_promote;
typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return (x > y ? x : y); }
};
template<typename P_numtype1, typename P_numtype2>
class _bz_Greater : public TwoOperandApplicativeTemplatesBase { class _bz_Greater : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef _bz_bool T_promote; typedef bool T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x > y; } { return x > y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_Less : public TwoOperandApplicativeTemplatesBase { class _bz_Less : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef _bz_bool T_promote; typedef bool T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x < y; } { return x < y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_GreaterOrEqual : public TwoOperandApplicativeTemplatesBase { class _bz_GreaterOrEqual : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef _bz_bool T_promote; typedef bool T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x >= y; } { return x >= y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_LessOrEqual : public TwoOperandApplicativeTemplatesBase { class _bz_LessOrEqual : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef _bz_bool T_promote; typedef bool T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x <= y; } { return x <= y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_Equal : public TwoOperandApplicativeTemplatesBase { class _bz_Equal : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef _bz_bool T_promote; typedef bool T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x == y; } { return x == y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_NotEqual : public TwoOperandApplicativeTemplatesBase { class _bz_NotEqual : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef _bz_bool T_promote; typedef bool T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x != y; } { return x != y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_LogicalAnd : public TwoOperandApplicativeTemplatesBase { class _bz_LogicalAnd : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef _bz_bool T_promote; typedef bool T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x && y; } { return x && y; }
}; };
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_LogicalOr : public TwoOperandApplicativeTemplatesBase { class _bz_LogicalOr : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef _bz_bool T_promote; typedef bool T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline T_promote apply(P_numtype1 x, P_numtype2 y) static inline T_promote apply(P_numtype1 x, P_numtype2 y)
{ return x || y; } { return x || y; }
}; };
template<class P_numtype_in, class P_numtype_out> template<typename P_numtype_in, typename P_numtype_out>
class _bz_Cast : public OneOperandApplicativeTemplatesBase { class _bz_Cast : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype_in T_numtype1; typedef P_numtype_in T_numtype1;
typedef P_numtype_out T_promote; typedef P_numtype_out T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline P_numtype_out apply(P_numtype_in x) static inline P_numtype_out apply(P_numtype_in x)
{ return P_numtype_out(x); } { return P_numtype_out(x); }
}; };
template<class P_numtype> template<typename P_numtype>
class _bz_LogicalNot : public OneOperandApplicativeTemplatesBase { class _bz_LogicalNot : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype T_numtype1; typedef P_numtype T_numtype1;
typedef _bz_bool T_promote; typedef bool T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline P_numtype apply(P_numtype x) static inline P_numtype apply(P_numtype x)
{ return !x; } { return !x; }
}; };
template<class P_numtype> template<typename P_numtype>
class _bz_BitwiseNot : public OneOperandApplicativeTemplatesBase { class _bz_BitwiseNot : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype T_numtype1; typedef P_numtype T_numtype1;
typedef T_numtype1 T_promote; typedef T_numtype1 T_promote;
typedef T_promote T_numtype; typedef T_promote T_numtype;
static inline P_numtype apply(P_numtype x) static inline P_numtype apply(P_numtype x)
{ return ~x; } { return ~x; }
}; };
 End of changes. 32 change blocks. 
56 lines changed or deleted 59 lines changed or added


 array-impl.h   array-impl.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array-impl.h Definition of the Array<P_numtype, N_rank> class * blitz/array-impl.h Definition of the Array<P_numtype, N_rank> class
* *
* $Id: array-impl.h,v 1.10 2002/08/30 22:12:49 jcumming Exp $ * $Id: array-impl.h,v 1.25 2005/10/13 23:46:43 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: array-impl.h,v $
* Revision 1.10 2002/08/30 22:12:49 jcumming
* Added declaration of setStorage() method, which lets user set Array stor
age
* format after construction.
*
* Revision 1.9 2002/06/28 01:33:03 jcumming
* Modified the isInRange() methods to check that each index value is
* greater than or equal to the base index value, rather than just
* casting (index-base) to an unsigned int. The latter gives unpredictable
* results if index<base and produces compiler warnings about comparisons
* between unsigned and signed quantities.
*
* Revision 1.8 2002/06/27 00:28:50 jcumming
* Changed template parameter name T_numtype2 to P_numtype2 in member funct
ion
* template declarataions for consistency with definitions and to avoid any
* confusion with typedef T_numtype.
*
* Revision 1.7 2002/06/26 23:55:45 jcumming
* Explicitly specify second template argument for ListInitializationSwitch
,
* rather than relying on the default value. This eliminates a compilation
* problem using the xlC compiler. Also removed #include of misc.cc, which
* is now handled in blitz/array/et.h.
*
* Revision 1.6 2002/05/27 19:29:29 jcumming
* Removed use of this-> as means of accessing members of templated base cl
ass.
* Instead provided using declarations for these members within the derived
* class definitions to bring them into the scope of the derived class.
*
* Revision 1.5 2002/03/06 15:47:49 patricg
*
* data_ replaced by this->data_ everywhere
* changeToNullBlock() replaced by this->changeToNullBlock()
* class _bz_endTag replaced by struct _bz_endTag {}
*
* Revision 1.4 2001/02/15 13:14:39 tveldhui
* Fixed typo
*
* Revision 1.3 2001/02/11 22:10:55 tveldhui
* Fixed prototype typos
*
* Revision 1.2 2001/02/11 15:43:39 tveldhui
* Additions from Julian Cummings:
* - StridedDomain class
* - more versions of resizeAndPreserve
*
* Revision 1.1 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.3 2001/01/24 22:51:50 tveldhui
* Reorganized #include orders to avoid including the huge Vector e.t.
* implementation when using Array.
*
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
/* /*
* Wish list for array classes. * Wish list for array classes.
* - Arrays whose dimensions are unknown at compile time. * - Arrays whose dimensions are unknown at compile time.
* - where()/elsewhere()/elsewhere() as in Dan Quinlan's implementation * - where()/elsewhere()/elsewhere() as in Dan Quinlan's implementation
* - block reduction operations * - block reduction operations
* - conversion to/from matrix & vector * - conversion to/from matrix & vector
* - apply(T func(T)) * - apply(T func(T))
* - apply(T func(const T&)) * - apply(T func(const T&))
* - apply<T func(T)> * - apply<T func(T)>
*/ */
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#define BZ_ARRAY_H #define BZ_ARRAY_H
#ifndef BZ_BLITZ_H #include <blitz/blitz.h>
#include <blitz/blitz.h> #include <blitz/memblock.h>
#endif #include <blitz/range.h>
#include <blitz/tinyvec.h>
#ifndef BZ_MEMBLOCK_H
#include <blitz/memblock.h>
#endif
#ifndef BZ_RANGE_H
#include <blitz/range.h>
#endif
#ifndef BZ_TINYVEC_H
#include <blitz/tinyvec.h>
#endif
#ifdef BZ_ARRAY_SPACE_FILLING_TRAVERSAL #ifdef BZ_ARRAY_SPACE_FILLING_TRAVERSAL
#ifndef BZ_TRAVERSAL_H #include <blitz/traversal.h>
#include <blitz/traversal.h>
#endif
#endif
#ifndef BZ_INDEXEXPR_H
#include <blitz/indexexpr.h>
#endif #endif
#ifndef BZ_PRETTYPRINT_H #include <blitz/indexexpr.h>
#include <blitz/prettyprint.h> #include <blitz/prettyprint.h>
#endif
#include <blitz/array/slice.h> // Subarrays and slicing #include <blitz/array/slice.h> // Subarrays and slicing
#include <blitz/array/map.h> // Tensor index notation #include <blitz/array/map.h> // Tensor index notation
#include <blitz/array/multi.h> // Multicomponent arrays #include <blitz/array/multi.h> // Multicomponent arrays
#include <blitz/array/domain.h> // RectDomain class #include <blitz/array/domain.h> // RectDomain class
#include <blitz/array/storage.h> // GeneralArrayStorage #include <blitz/array/storage.h> // GeneralArrayStorage
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* Forward declarations * Forward declarations
*/ */
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
class ArrayIterator; class ArrayIterator;
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
class ConstArrayIterator; class ConstArrayIterator;
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
class FastArrayIterator; class FastArrayIterator;
template<class P_expr> template<typename P_expr>
class _bz_ArrayExpr; class _bz_ArrayExpr;
template<class T_array, class T_index> template<typename T_array, typename T_index>
class IndirectArray; class IndirectArray;
struct _bz_endTag {}; template <typename P_numtype,int N_rank>
void swap(Array<P_numtype,N_rank>&,Array<P_numtype,N_rank>&);
template <typename P_numtype, int N_rank>
void find(Array<TinyVector<int,N_rank>,1>&,const Array<P_numtype,N_rank>&);
/* /*
* Declaration of class Array * Declaration of class Array
*/ */
// NEEDS_WORK: Array should inherit protected from MemoryBlockReference. // NEEDS_WORK: Array should inherit protected from MemoryBlockReference.
// To make this work, need to expose MemoryBlockReference::numReferences() // To make this work, need to expose MemoryBlockReference::numReferences()
// and make Array<P,N2> a friend of Array<P,N> for slicing. // and make Array<P,N2> a friend of Array<P,N> for slicing.
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
class Array : public MemoryBlockReference<P_numtype> class Array : public MemoryBlockReference<P_numtype>
#ifdef BZ_NEW_EXPRESSION_TEMPLATES #ifdef BZ_NEW_EXPRESSION_TEMPLATES
, public ETBase<Array<P_numtype,N_rank> > , public ETBase<Array<P_numtype,N_rank> >
#endif #endif
{ {
private: private:
typedef MemoryBlockReference<P_numtype> T_base; typedef MemoryBlockReference<P_numtype> T_base;
using T_base::data_; using T_base::data_;
using T_base::changeToNullBlock; using T_base::changeToNullBlock;
skipping to change at line 209 skipping to change at line 131
*/ */
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
typedef TinyVector<int, N_rank> T_index; typedef TinyVector<int, N_rank> T_index;
typedef Array<T_numtype, N_rank> T_array; typedef Array<T_numtype, N_rank> T_array;
typedef FastArrayIterator<T_numtype, N_rank> T_iterator; typedef FastArrayIterator<T_numtype, N_rank> T_iterator;
typedef ArrayIterator<T_numtype,N_rank> iterator; typedef ArrayIterator<T_numtype,N_rank> iterator;
typedef ConstArrayIterator<T_numtype,N_rank> const_iterator; typedef ConstArrayIterator<T_numtype,N_rank> const_iterator;
enum { _bz_rank = N_rank }; static const int _bz_rank = N_rank;
////////////////////////////////////////////// //////////////////////////////////////////////
// Constructors // // Constructors //
////////////////////////////////////////////// //////////////////////////////////////////////
/* /*
* Construct an array from an array expression. * Construct an array from an array expression.
*/ */
template<class T_expr> template<typename T_expr>
_bz_explicit Array(_bz_ArrayExpr<T_expr> expr); explicit Array(_bz_ArrayExpr<T_expr> expr);
/* /*
* Any missing length arguments will have their value taken from the * Any missing length arguments will have their value taken from the
* last argument. For example, * last argument. For example,
* Array<int,3> A(32,64); * Array<int,3> A(32,64);
* will create a 32x64x64 array. This is handled by setupStorage(). * will create a 32x64x64 array. This is handled by setupStorage().
*/ */
Array(GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank> ()) Array(GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank> ())
: storage_(storage) : storage_(storage)
{ {
length_ = 0; length_ = 0;
stride_ = 0; stride_ = 0;
zeroOffset_ = 0; zeroOffset_ = 0;
} }
_bz_explicit Array(int length0, explicit Array(int length0,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() ) GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() )
: storage_(storage) : storage_(storage)
{ {
length_[0] = length0; length_[0] = length0;
setupStorage(0); setupStorage(0);
} }
Array(int length0, int length1, Array(int length0, int length1,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() ) GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() )
: storage_(storage) : storage_(storage)
skipping to change at line 405 skipping to change at line 327
length_[8] = length8; length_[8] = length8;
length_[9] = length9; length_[9] = length9;
length_[10] = length10; length_[10] = length10;
setupStorage(10); setupStorage(10);
} }
/* /*
* Construct an array from an existing block of memory. Ownership * Construct an array from an existing block of memory. Ownership
* is not acquired (this is provided for backwards compatibility). * is not acquired (this is provided for backwards compatibility).
*/ */
Array(T_numtype* _bz_restrict dataFirst, TinyVector<int, N_rank> shape, Array(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() ) GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() )
: MemoryBlockReference<T_numtype>(product(shape), dataFirst, : MemoryBlockReference<T_numtype>(product(shape), dataFirst,
neverDeleteData), neverDeleteData),
storage_(storage) storage_(storage)
{ {
BZPRECONDITION(dataFirst != 0); BZPRECONDITION(dataFirst != 0);
length_ = shape; length_ = shape;
computeStrides(); computeStrides();
data_ += zeroOffset_; data_ += zeroOffset_;
} }
/* /*
* Construct an array from an existing block of memory, with a * Construct an array from an existing block of memory, with a
* given set of strides. Ownership is not acquired (i.e. the memory * given set of strides. Ownership is not acquired (i.e. the memory
* block will not be freed by Blitz++). * block will not be freed by Blitz++).
*/ */
Array(T_numtype* _bz_restrict dataFirst, TinyVector<int, N_rank> shape, Array(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape,
TinyVector<int, N_rank> stride, TinyVector<int, N_rank> stride,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() ) GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() )
: MemoryBlockReference<T_numtype>(product(shape), dataFirst, : MemoryBlockReference<T_numtype>(product(shape), dataFirst,
neverDeleteData), neverDeleteData),
storage_(storage) storage_(storage)
{ {
BZPRECONDITION(dataFirst != 0); BZPRECONDITION(dataFirst != 0);
length_ = shape; length_ = shape;
stride_ = stride; stride_ = stride;
calculateZeroOffset(); calculateZeroOffset();
data_ += zeroOffset_; data_ += zeroOffset_;
} }
/* /*
* Construct an array from an existing block of memory. * Construct an array from an existing block of memory.
*/ */
Array(T_numtype* _bz_restrict dataFirst, TinyVector<int, N_rank> shape, Array(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape,
preexistingMemoryPolicy deletionPolicy, preexistingMemoryPolicy deletionPolicy,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() ) GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() )
: MemoryBlockReference<T_numtype>(product(shape), dataFirst, : MemoryBlockReference<T_numtype>(product(shape), dataFirst,
deletionPolicy), deletionPolicy),
storage_(storage) storage_(storage)
{ {
BZPRECONDITION(dataFirst != 0); BZPRECONDITION(dataFirst != 0);
length_ = shape; length_ = shape;
computeStrides(); computeStrides();
data_ += zeroOffset_; data_ += zeroOffset_;
if (deletionPolicy == duplicateData) if (deletionPolicy == duplicateData)
reference(copy()); reference(copy());
} }
/* /*
* Construct an array from an existing block of memory, with a * Construct an array from an existing block of memory, with a
* given set of strides. * given set of strides.
*/ */
Array(T_numtype* _bz_restrict dataFirst, TinyVector<int, N_rank> shape, Array(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape,
TinyVector<int, N_rank> stride, TinyVector<int, N_rank> stride,
preexistingMemoryPolicy deletionPolicy, preexistingMemoryPolicy deletionPolicy,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() ) GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>() )
: MemoryBlockReference<T_numtype>(product(shape), dataFirst, : MemoryBlockReference<T_numtype>(product(shape), dataFirst,
deletionPolicy), deletionPolicy),
storage_(storage) storage_(storage)
{ {
BZPRECONDITION(dataFirst != 0); BZPRECONDITION(dataFirst != 0);
length_ = shape; length_ = shape;
skipping to change at line 788 skipping to change at line 710
length_[10] = r10.length(); length_[10] = r10.length();
storage_.setBase(10, r10.first()); storage_.setBase(10, r10.first());
setupStorage(10); setupStorage(10);
} }
/* /*
* Create a reference of another array * Create a reference of another array
*/ */
Array(const Array<T_numtype, N_rank>& array) Array(const Array<T_numtype, N_rank>& array)
#ifdef BZ_NEW_EXPRESSION_TEMPLATES
: MemoryBlockReference<T_numtype>(),
ETBase< Array<T_numtype, N_rank> >(array)
#else
: MemoryBlockReference<T_numtype>()
#endif
{ {
// NEEDS_WORK: this const_cast is a tad ugly. // NEEDS_WORK: this const_cast is a tad ugly.
reference(const_cast<T_array&>(array)); reference(const_cast<T_array&>(array));
} }
/* /*
* These constructors are used for creating interlaced arrays (see * These constructors are used for creating interlaced arrays (see
* <blitz/arrayshape.h> * <blitz/arrayshape.h>
*/ */
Array(const TinyVector<int,N_rank-1>& shape, Array(const TinyVector<int,N_rank-1>& shape,
skipping to change at line 893 skipping to change at line 821
const StridedDomain<N_rank>& subdomain) const StridedDomain<N_rank>& subdomain)
{ {
constructSubarray(array, subdomain); constructSubarray(array, subdomain);
} }
/* /*
* This constructor is invoked by the operator()'s which take * This constructor is invoked by the operator()'s which take
* a combination of integer and Range arguments. It's not intended * a combination of integer and Range arguments. It's not intended
* for end-user use. * for end-user use.
*/ */
template<int N_rank2, class R0, class R1, class R2, class R3, class R4, template<int N_rank2, typename R0, typename R1, typename R2, typename R
class R5, class R6, class R7, class R8, class R9, class R10> 3, typename R4,
typename R5, typename R6, typename R7, typename R8, typename R9, ty
pename R10>
Array(Array<T_numtype,N_rank2>& array, R0 r0, R1 r1, R2 r2, Array(Array<T_numtype,N_rank2>& array, R0 r0, R1 r1, R2 r2,
R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10) R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10)
{ {
constructSlice(array, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10); constructSlice(array, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10);
} }
////////////////////////////////////////////// //////////////////////////////////////////////
// Member functions // Member functions
////////////////////////////////////////////// //////////////////////////////////////////////
skipping to change at line 921 skipping to change at line 849
iterator begin() iterator begin()
{ return iterator(*this); } { return iterator(*this); }
const_iterator begin() const const_iterator begin() const
{ return const_iterator(*this); } { return const_iterator(*this); }
T_iterator beginFast() const T_iterator beginFast() const
{ return T_iterator(*this); } { return T_iterator(*this); }
// Deprecated: now extractComponent(...) // Deprecated: now extractComponent(...)
template<class P_numtype2> template<typename P_numtype2>
Array<P_numtype2,N_rank> chopComponent(P_numtype2 a, int compN um, Array<P_numtype2,N_rank> chopComponent(P_numtype2 a, int compN um,
int numComponents) const int numComponents) const
{ return extractComponent(a, compNum, numComponents); } { return extractComponent(a, compNum, numComponents); }
int cols() const int cols() const
{ return length_[1]; } { return length_[1]; }
int columns() const int columns() const
{ return length_[1]; } { return length_[1]; }
skipping to change at line 945 skipping to change at line 873
// not be in the array if the base is not zero in each rank. // not be in the array if the base is not zero in each rank.
// These data() routines return a pointer to the first // These data() routines return a pointer to the first
// element in the array (but note that it may not be // element in the array (but note that it may not be
// stored first in memory if some ranks are stored descending). // stored first in memory if some ranks are stored descending).
int dataOffset() const int dataOffset() const
{ {
return dot(storage_.base(), stride_); return dot(storage_.base(), stride_);
} }
const T_numtype* _bz_restrict data() const const T_numtype* restrict data() const
{ return data_ + dataOffset(); } { return data_ + dataOffset(); }
T_numtype* _bz_restrict data() T_numtype* restrict data()
{ return data_ + dataOffset(); } { return data_ + dataOffset(); }
// These dataZero() routines refer to the point (0,0,...,0) // These dataZero() routines refer to the point (0,0,...,0)
// which may not be in the array if the bases are nonzero. // which may not be in the array if the bases are nonzero.
const T_numtype* _bz_restrict dataZero() const const T_numtype* restrict dataZero() const
{ return data_; } { return data_; }
T_numtype* _bz_restrict dataZero() T_numtype* restrict dataZero()
{ return data_; } { return data_; }
// These dataFirst() routines refer to the element in the // These dataFirst() routines refer to the element in the
// array which falls first in memory. // array which falls first in memory.
int dataFirstOffset() const int dataFirstOffset() const
{ {
int pos = 0; int pos = 0;
// Used to use tinyvector expressions: // Used to use tinyvector expressions:
// return data_ + dot(storage_.base() // return data_ + dot(storage_.base()
// + (1 - storage_.ascendingFlag()) * (length_ - 1), stride_); // + (1 - storage_.ascendingFlag()) * (length_ - 1), stride_);
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
pos += (storage_.base(i) + (1-storage_.isRankStoredAscending(i)) * pos += (storage_.base(i) + (1-storage_.isRankStoredAscending(i)) *
(length_(i)-1)) * stride_(i); (length_(i)-1)) * stride_(i);
return pos; return pos;
} }
const T_numtype* _bz_restrict dataFirst() const const T_numtype* restrict dataFirst() const
{ {
return data_ + dataFirstOffset(); return data_ + dataFirstOffset();
} }
T_numtype* _bz_restrict dataFirst() T_numtype* restrict dataFirst()
{ {
return data_ + dataFirstOffset(); return data_ + dataFirstOffset();
} }
int depth() const int depth() const
{ return length_[2]; } { return length_[2]; }
int dimensions() const int dimensions() const
{ return N_rank; } { return N_rank; }
RectDomain<N_rank> domain() const RectDomain<N_rank> domain() const
{ {
return RectDomain<N_rank>(lbound(), ubound()); return RectDomain<N_rank>(lbound(), ubound());
} }
void dumpStructureInformation(ostream& os = cout) const; void dumpStructureInformation(ostream& os = cout) const;
iterator end() iterator end()
{ {
return iterator(*this, _bz_endTag()); return iterator();
} }
const_iterator end() const const_iterator end() const
{ {
return const_iterator(*this, _bz_endTag()); return const_iterator();
} }
int extent(int rank) const int extent(int rank) const
{ return length_[rank]; } { return length_[rank]; }
const TinyVector<int,N_rank>& extent() const const TinyVector<int,N_rank>& extent() const
{ return length_; } { return length_; }
template<class P_numtype2> template<typename P_numtype2>
Array<P_numtype2,N_rank> extractComponent(P_numtype2, int comp Num, Array<P_numtype2,N_rank> extractComponent(P_numtype2, int comp Num,
int numComponents) const; int numComponents) const;
void free() void free()
{ {
changeToNullBlock(); changeToNullBlock();
length_ = 0; length_ = 0;
} }
_bz_bool isMajorRank(int rank) const bool isMajorRank(int rank) const { return storage_.ordering(rank) == 0;
{ return storage_.ordering(rank) == 0; } }
bool isMinorRank(int rank) const { return storage_.ordering(rank) != 0;
_bz_bool isMinorRank(int rank) const }
{ return storage_.ordering(rank) != 0; } bool isRankStoredAscending(int rank) const {
return storage_.isRankStoredAscending(rank);
_bz_bool isRankStoredAscending(int rank) const
{ return storage_.isRankStoredAscending(rank); }
_bz_bool isStorageContiguous() const;
int lbound(int rank) const
{ return base(rank); }
TinyVector<int,N_rank> lbound() const
{
return base();
} }
int length(int rank) const bool isStorageContiguous() const;
{ return length_[rank]; }
const TinyVector<int, N_rank>& length() const int lbound(int rank) const { return base(rank); }
{ return length_; } TinyVector<int,N_rank> lbound() const { return base(); }
void makeUnique(); int length(int rank) const { return length_[
rank]; }
const TinyVector<int, N_rank>& length() const { return length_;
}
int numElements() const void makeUnique();
{ return product(length_); }
int numElements() const { return product(length_); }
// NEEDS_WORK -- Expose the numReferences() method // NEEDS_WORK -- Expose the numReferences() method
// MemoryBlockReference<T_numtype>::numReferences; // MemoryBlockReference<T_numtype>::numReferences;
// The storage_.ordering_ array is a list of dimensions from // The storage_.ordering_ array is a list of dimensions from
// the most minor (stride 1) to major dimension. Generally, // the most minor (stride 1) to major dimension. Generally,
// ordering(0) will return the dimension which has the smallest // ordering(0) will return the dimension which has the smallest
// stride, and ordering(N_rank-1) will return the dimension with // stride, and ordering(N_rank-1) will return the dimension with
// the largest stride. // the largest stride.
int ordering(int storageRankIndex) const int ordering(int storageRankIndex) const
skipping to change at line 1229 skipping to change at line 1145
return ub; return ub;
} }
int zeroOffset() const int zeroOffset() const
{ return zeroOffset_; } { return zeroOffset_; }
////////////////////////////////////////////// //////////////////////////////////////////////
// Debugging routines // Debugging routines
////////////////////////////////////////////// //////////////////////////////////////////////
_bz_bool isInRangeForDim(int i, int d) const bool isInRangeForDim(int i, int d) const {
{
return i >= base(d) && (i - base(d)) < length_[d]; return i >= base(d) && (i - base(d)) < length_[d];
} }
_bz_bool isInRange(int i0) const bool isInRange(int i0) const {
{
return i0 >= base(0) && (i0 - base(0)) < length_[0]; return i0 >= base(0) && (i0 - base(0)) < length_[0];
} }
_bz_bool isInRange(int i0, int i1) const bool isInRange(int i0, int i1) const {
{
return i0 >= base(0) && (i0 - base(0)) < length_[0] return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1]; && i1 >= base(1) && (i1 - base(1)) < length_[1];
} }
_bz_bool isInRange(int i0, int i1, int i2) const bool isInRange(int i0, int i1, int i2) const {
{
return i0 >= base(0) && (i0 - base(0)) < length_[0] return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1] && i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2]; && i2 >= base(2) && (i2 - base(2)) < length_[2];
} }
_bz_bool isInRange(int i0, int i1, int i2, int i3) const bool isInRange(int i0, int i1, int i2, int i3) const {
{
return i0 >= base(0) && (i0 - base(0)) < length_[0] return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1] && i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2] && i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3]; && i3 >= base(3) && (i3 - base(3)) < length_[3];
} }
_bz_bool isInRange(int i0, int i1, int i2, int i3, int i4) const bool isInRange(int i0, int i1, int i2, int i3, int i4) const {
{
return i0 >= base(0) && (i0 - base(0)) < length_[0] return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1] && i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2] && i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3] && i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4]; && i4 >= base(4) && (i4 - base(4)) < length_[4];
} }
_bz_bool isInRange(int i0, int i1, int i2, int i3, int i4, bool isInRange(int i0, int i1, int i2, int i3, int i4, int i5) const {
int i5) const
{
return i0 >= base(0) && (i0 - base(0)) < length_[0] return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1] && i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2] && i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3] && i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4] && i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5]; && i5 >= base(5) && (i5 - base(5)) < length_[5];
} }
_bz_bool isInRange(int i0, int i1, int i2, int i3, int i4, bool isInRange(int i0, int i1, int i2, int i3, int i4, int i5, int i6)
int i5, int i6) const const {
{
return i0 >= base(0) && (i0 - base(0)) < length_[0] return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1] && i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2] && i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3] && i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4] && i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5] && i5 >= base(5) && (i5 - base(5)) < length_[5]
&& i6 >= base(6) && (i6 - base(6)) < length_[6]; && i6 >= base(6) && (i6 - base(6)) < length_[6];
} }
_bz_bool isInRange(int i0, int i1, int i2, int i3, int i4, bool isInRange(int i0, int i1, int i2, int i3, int i4,
int i5, int i6, int i7) const int i5, int i6, int i7) const {
{
return i0 >= base(0) && (i0 - base(0)) < length_[0] return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1] && i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2] && i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3] && i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4] && i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5] && i5 >= base(5) && (i5 - base(5)) < length_[5]
&& i6 >= base(6) && (i6 - base(6)) < length_[6] && i6 >= base(6) && (i6 - base(6)) < length_[6]
&& i7 >= base(7) && (i7 - base(7)) < length_[7]; && i7 >= base(7) && (i7 - base(7)) < length_[7];
} }
_bz_bool isInRange(int i0, int i1, int i2, int i3, int i4, bool isInRange(int i0, int i1, int i2, int i3, int i4,
int i5, int i6, int i7, int i8) const int i5, int i6, int i7, int i8) const {
{
return i0 >= base(0) && (i0 - base(0)) < length_[0] return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1] && i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2] && i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3] && i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4] && i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5] && i5 >= base(5) && (i5 - base(5)) < length_[5]
&& i6 >= base(6) && (i6 - base(6)) < length_[6] && i6 >= base(6) && (i6 - base(6)) < length_[6]
&& i7 >= base(7) && (i7 - base(7)) < length_[7] && i7 >= base(7) && (i7 - base(7)) < length_[7]
&& i8 >= base(8) && (i8 - base(8)) < length_[8]; && i8 >= base(8) && (i8 - base(8)) < length_[8];
} }
_bz_bool isInRange(int i0, int i1, int i2, int i3, int i4, bool isInRange(int i0, int i1, int i2, int i3, int i4,
int i5, int i6, int i7, int i8, int i9) const int i5, int i6, int i7, int i8, int i9) const {
{
return i0 >= base(0) && (i0 - base(0)) < length_[0] return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1] && i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2] && i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3] && i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4] && i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5] && i5 >= base(5) && (i5 - base(5)) < length_[5]
&& i6 >= base(6) && (i6 - base(6)) < length_[6] && i6 >= base(6) && (i6 - base(6)) < length_[6]
&& i7 >= base(7) && (i7 - base(7)) < length_[7] && i7 >= base(7) && (i7 - base(7)) < length_[7]
&& i8 >= base(8) && (i8 - base(8)) < length_[8] && i8 >= base(8) && (i8 - base(8)) < length_[8]
&& i9 >= base(9) && (i9 - base(9)) < length_[9]; && i9 >= base(9) && (i9 - base(9)) < length_[9];
} }
_bz_bool isInRange(int i0, int i1, int i2, int i3, int i4, bool isInRange(int i0, int i1, int i2, int i3, int i4,
int i5, int i6, int i7, int i8, int i9, int i10) const int i5, int i6, int i7, int i8, int i9, int i10) const {
{
return i0 >= base(0) && (i0 - base(0)) < length_[0] return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1] && i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2] && i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3] && i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4] && i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5] && i5 >= base(5) && (i5 - base(5)) < length_[5]
&& i6 >= base(6) && (i6 - base(6)) < length_[6] && i6 >= base(6) && (i6 - base(6)) < length_[6]
&& i7 >= base(7) && (i7 - base(7)) < length_[7] && i7 >= base(7) && (i7 - base(7)) < length_[7]
&& i8 >= base(8) && (i8 - base(8)) < length_[8] && i8 >= base(8) && (i8 - base(8)) < length_[8]
&& i9 >= base(9) && (i9 - base(9)) < length_[9] && i9 >= base(9) && (i9 - base(9)) < length_[9]
&& i10 >= base(10) && (i10 - base(10)) < length_[10]; && i10 >= base(10) && (i10 - base(10)) < length_[10];
} }
_bz_bool isInRange(const T_index& index) const bool isInRange(const T_index& index) const {
{
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
if (index[i] < base(i) || (index[i] - base(i)) >= length_[i]) if (index[i] < base(i) || (index[i] - base(i)) >= length_[i])
return _bz_false; return false;
return _bz_true; return true;
} }
_bz_bool assertInRange(const T_index& index) const bool assertInRange(const T_index& BZ_DEBUG_PARAM(index)) const {
{
BZPRECHECK(isInRange(index), "Array index out of range: " << index BZPRECHECK(isInRange(index), "Array index out of range: " << index
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0) const bool assertInRange(int BZ_DEBUG_PARAM(i0)) const {
{
BZPRECHECK(isInRange(i0), "Array index out of range: " << i0 BZPRECHECK(isInRange(i0), "Array index out of range: " << i0
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0, int i1) const bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1)) cons
{ t {
BZPRECHECK(isInRange(i0,i1), "Array index out of range: (" BZPRECHECK(isInRange(i0,i1), "Array index out of range: ("
<< i0 << ", " << i1 << ")" << i0 << ", " << i1 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0, int i1, int i2) const bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2)) const
{ {
BZPRECHECK(isInRange(i0,i1,i2), "Array index out of range: (" BZPRECHECK(isInRange(i0,i1,i2), "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ")" << i0 << ", " << i1 << ", " << i2 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0, int i1, int i2, int i3) const bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3)) const
{ {
BZPRECHECK(isInRange(i0,i1,i2,i3), "Array index out of range: (" BZPRECHECK(isInRange(i0,i1,i2,i3), "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3 << ")" << i0 << ", " << i1 << ", " << i2 << ", " << i3 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0, int i1, int i2, int i3, int i4) const bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3),
int BZ_DEBUG_PARAM(i4)) const
{ {
BZPRECHECK(isInRange(i0,i1,i2,i3,i4), "Array index out of range: (" BZPRECHECK(isInRange(i0,i1,i2,i3,i4), "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3 << i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ")" << ", " << i4 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0, int i1, int i2, int i3, int i4, bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int i5) const int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(
i4),
int BZ_DEBUG_PARAM(i5)) const
{ {
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5), "Array index out of range: (" BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5), "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3 << i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ")" << ", " << i4 << ", " << i5 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0, int i1, int i2, int i3, int i4, bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int i5, int i6) const int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(
i4),
int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6)) const
{ {
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6), BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6),
"Array index out of range: (" "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3 << i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ", " << i6 << ")" << ", " << i4 << ", " << i5 << ", " << i6 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0, int i1, int i2, int i3, int i4, bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int i5, int i6, int i7) const int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(
i4),
int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6),
int BZ_DEBUG_PARAM(i7)) const
{ {
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7), BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7),
"Array index out of range: (" "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3 << i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7 << ")" << ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0, int i1, int i2, int i3, int i4, bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int i5, int i6, int i7, int i8) const int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(
i4),
int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6), int BZ_DEBUG_PARAM(
i7),
int BZ_DEBUG_PARAM(i8)) const
{ {
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8), BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8),
"Array index out of range: (" "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3 << i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7 << ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7
<< ", " << i8 << ")" << ", " << i8 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0, int i1, int i2, int i3, int i4, bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int i5, int i6, int i7, int i8, int i9) const int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(
i4),
int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6), int BZ_DEBUG_PARAM(
i7),
int BZ_DEBUG_PARAM(i8), int BZ_DEBUG_PARAM(i9)) const
{ {
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9), BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9),
"Array index out of range: (" "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3 << i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7 << ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7
<< ", " << i8 << ", " << i9 << ")" << ", " << i8 << ", " << i9 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
_bz_bool assertInRange(int i0, int i1, int i2, int i3, int i4, bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int i5, int i6, int i7, int i8, int i9, int i10) const int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(
i4),
int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6), int BZ_DEBUG_PARAM(
i7),
int BZ_DEBUG_PARAM(i8), int BZ_DEBUG_PARAM(i9),
int BZ_DEBUG_PARAM(i10)) const
{ {
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10), BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10),
"Array index out of range: (" "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3 << i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7 << ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7
<< ", " << i8 << ", " << i9 << ", " << i10 << ")" << ", " << i8 << ", " << i9 << ", " << i10 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl << endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl); << "Length: " << length_ << endl);
return _bz_true; return true;
} }
////////////////////////////////////////////// //////////////////////////////////////////////
// Subscripting operators // Subscripting operators
////////////////////////////////////////////// //////////////////////////////////////////////
template<int N_rank2> template<int N_rank2>
T_numtype operator()(const TinyVector<int,N_rank2>& index) const const T_numtype& restrict operator()(const TinyVector<int,N_rank2>& ind ex) const
{ {
assertInRange(index); assertInRange(index);
return data_[dot(index, stride_)]; return data_[dot(index, stride_)];
} }
template<int N_rank2> template<int N_rank2>
T_numtype& _bz_restrict operator()(const TinyVector<int,N_rank2>& index ) T_numtype& restrict operator()(const TinyVector<int,N_rank2>& index)
{ {
assertInRange(index); assertInRange(index);
return data_[dot(index, stride_)]; return data_[dot(index, stride_)];
} }
T_numtype operator()(TinyVector<int,1> index) const const T_numtype& restrict operator()(TinyVector<int,1> index) const
{ {
assertInRange(index[0]); assertInRange(index[0]);
return data_[index[0] * stride_[0]]; return data_[index[0] * stride_[0]];
} }
T_numtype& operator()(TinyVector<int,1> index) T_numtype& operator()(TinyVector<int,1> index)
{ {
assertInRange(index[0]); assertInRange(index[0]);
return data_[index[0] * stride_[0]]; return data_[index[0] * stride_[0]];
} }
T_numtype operator()(TinyVector<int,2> index) const const T_numtype& restrict operator()(TinyVector<int,2> index) const
{ {
assertInRange(index[0], index[1]); assertInRange(index[0], index[1]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]]; return data_[index[0] * stride_[0] + index[1] * stride_[1]];
} }
T_numtype& operator()(TinyVector<int,2> index) T_numtype& operator()(TinyVector<int,2> index)
{ {
assertInRange(index[0], index[1]); assertInRange(index[0], index[1]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]]; return data_[index[0] * stride_[0] + index[1] * stride_[1]];
} }
T_numtype operator()(TinyVector<int,3> index) const const T_numtype& restrict operator()(TinyVector<int,3> index) const
{ {
assertInRange(index[0], index[1], index[2]); assertInRange(index[0], index[1], index[2]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2]]; + index[2] * stride_[2]];
} }
T_numtype& operator()(TinyVector<int,3> index) T_numtype& operator()(TinyVector<int,3> index)
{ {
assertInRange(index[0], index[1], index[2]); assertInRange(index[0], index[1], index[2]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2]]; + index[2] * stride_[2]];
} }
T_numtype operator()(const TinyVector<int,4>& index) const const T_numtype& restrict operator()(const TinyVector<int,4>& index) co nst
{ {
assertInRange(index[0], index[1], index[2], index[3]); assertInRange(index[0], index[1], index[2], index[3]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]]; + index[2] * stride_[2] + index[3] * stride_[3]];
} }
T_numtype& operator()(const TinyVector<int,4>& index) T_numtype& operator()(const TinyVector<int,4>& index)
{ {
assertInRange(index[0], index[1], index[2], index[3]); assertInRange(index[0], index[1], index[2], index[3]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]]; + index[2] * stride_[2] + index[3] * stride_[3]];
} }
T_numtype operator()(const TinyVector<int,5>& index) const const T_numtype& restrict operator()(const TinyVector<int,5>& index) co nst
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4]); index[4]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4]]; + index[4] * stride_[4]];
} }
T_numtype& operator()(const TinyVector<int,5>& index) T_numtype& operator()(const TinyVector<int,5>& index)
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4]); index[4]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4]]; + index[4] * stride_[4]];
} }
T_numtype operator()(const TinyVector<int,6>& index) const const T_numtype& restrict operator()(const TinyVector<int,6>& index) co nst
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5]); index[4], index[5]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]]; + index[4] * stride_[4] + index[5] * stride_[5]];
} }
T_numtype& operator()(const TinyVector<int,6>& index) T_numtype& operator()(const TinyVector<int,6>& index)
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5]); index[4], index[5]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]]; + index[4] * stride_[4] + index[5] * stride_[5]];
} }
T_numtype operator()(const TinyVector<int,7>& index) const const T_numtype& restrict operator()(const TinyVector<int,7>& index) co nst
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6]); index[4], index[5], index[6]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5] + index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6]]; + index[6] * stride_[6]];
} }
T_numtype& operator()(const TinyVector<int,7>& index) T_numtype& operator()(const TinyVector<int,7>& index)
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6]); index[4], index[5], index[6]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5] + index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6]]; + index[6] * stride_[6]];
} }
T_numtype operator()(const TinyVector<int,8>& index) const const T_numtype& restrict operator()(const TinyVector<int,8>& index) co nst
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7]); index[4], index[5], index[6], index[7]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5] + index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7]]; + index[6] * stride_[6] + index[7] * stride_[7]];
} }
T_numtype& operator()(const TinyVector<int,8>& index) T_numtype& operator()(const TinyVector<int,8>& index)
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7]); index[4], index[5], index[6], index[7]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5] + index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7]]; + index[6] * stride_[6] + index[7] * stride_[7]];
} }
T_numtype operator()(const TinyVector<int,9>& index) const const T_numtype& restrict operator()(const TinyVector<int,9>& index) co nst
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8]); index[4], index[5], index[6], index[7], index[8]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5] + index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7] + index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8]]; + index[8] * stride_[8]];
} }
skipping to change at line 1654 skipping to change at line 1567
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8]); index[4], index[5], index[6], index[7], index[8]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5] + index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7] + index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8]]; + index[8] * stride_[8]];
} }
T_numtype operator()(const TinyVector<int,10>& index) const const T_numtype& restrict operator()(const TinyVector<int,10>& index) c onst
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8], index[9]); index[4], index[5], index[6], index[7], index[8], index[9]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5] + index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7] + index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8] + index[9] * stride_[9]]; + index[8] * stride_[8] + index[9] * stride_[9]];
} }
skipping to change at line 1676 skipping to change at line 1589
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8], index[9]); index[4], index[5], index[6], index[7], index[8], index[9]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5] + index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7] + index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8] + index[9] * stride_[9]]; + index[8] * stride_[8] + index[9] * stride_[9]];
} }
T_numtype operator()(const TinyVector<int,11>& index) const const T_numtype& restrict operator()(const TinyVector<int,11>& index) c onst
{ {
assertInRange(index[0], index[1], index[2], index[3], assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8], index[9], index[4], index[5], index[6], index[7], index[8], index[9],
index[10]); index[10]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5] + index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7] + index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8] + index[9] * stride_[9] + index[8] * stride_[8] + index[9] * stride_[9]
+ index[10] * stride_[10]]; + index[10] * stride_[10]];
skipping to change at line 1702 skipping to change at line 1615
index[4], index[5], index[6], index[7], index[8], index[9], index[4], index[5], index[6], index[7], index[8], index[9],
index[10]); index[10]);
return data_[index[0] * stride_[0] + index[1] * stride_[1] return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3] + index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5] + index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7] + index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8] + index[9] * stride_[9] + index[8] * stride_[8] + index[9] * stride_[9]
+ index[10] * stride_[10]]; + index[10] * stride_[10]];
} }
T_numtype operator()(int i0) const const T_numtype& restrict operator()(int i0) const
{ {
assertInRange(i0); assertInRange(i0);
return data_[i0 * stride_[0]]; return data_[i0 * stride_[0]];
} }
T_numtype& _bz_restrict operator()(int i0) T_numtype& restrict operator()(int i0)
{ {
assertInRange(i0); assertInRange(i0);
return data_[i0 * stride_[0]]; return data_[i0 * stride_[0]];
} }
T_numtype operator()(int i0, int i1) const const T_numtype& restrict operator()(int i0, int i1) const
{ {
assertInRange(i0, i1); assertInRange(i0, i1);
return data_[i0 * stride_[0] + i1 * stride_[1]]; return data_[i0 * stride_[0] + i1 * stride_[1]];
} }
T_numtype& _bz_restrict operator()(int i0, int i1) T_numtype& restrict operator()(int i0, int i1)
{ {
assertInRange(i0, i1); assertInRange(i0, i1);
return data_[i0 * stride_[0] + i1 * stride_[1]]; return data_[i0 * stride_[0] + i1 * stride_[1]];
} }
T_numtype operator()(int i0, int i1, int i2) const const T_numtype& restrict operator()(int i0, int i1, int i2) const
{ {
assertInRange(i0, i1, i2); assertInRange(i0, i1, i2);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2]]; + i2 * stride_[2]];
} }
T_numtype& _bz_restrict operator()(int i0, int i1, int i2) T_numtype& restrict operator()(int i0, int i1, int i2)
{ {
assertInRange(i0, i1, i2); assertInRange(i0, i1, i2);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2]]; + i2 * stride_[2]];
} }
T_numtype operator()(int i0, int i1, int i2, int i3) const const T_numtype& restrict operator()(int i0, int i1, int i2, int i3) co nst
{ {
assertInRange(i0, i1, i2, i3); assertInRange(i0, i1, i2, i3);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3]]; + i2 * stride_[2] + i3 * stride_[3]];
} }
T_numtype& _bz_restrict operator()(int i0, int i1, int i2, int i3) T_numtype& restrict operator()(int i0, int i1, int i2, int i3)
{ {
assertInRange(i0, i1, i2, i3); assertInRange(i0, i1, i2, i3);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3]]; + i2 * stride_[2] + i3 * stride_[3]];
} }
T_numtype operator()(int i0, int i1, int i2, int i3, const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4) const int i4) const
{ {
assertInRange(i0, i1, i2, i3, i4); assertInRange(i0, i1, i2, i3, i4);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]]; + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]];
} }
T_numtype& _bz_restrict operator()(int i0, int i1, int i2, int i3, T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4) int i4)
{ {
assertInRange(i0, i1, i2, i3, i4); assertInRange(i0, i1, i2, i3, i4);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]]; + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]];
} }
T_numtype operator()(int i0, int i1, int i2, int i3, const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5) const int i4, int i5) const
{ {
assertInRange(i0, i1, i2, i3, i4, i5); assertInRange(i0, i1, i2, i3, i4, i5);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5]]; + i5 * stride_[5]];
} }
T_numtype& _bz_restrict operator()(int i0, int i1, int i2, int i3, T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5) int i4, int i5)
{ {
assertInRange(i0, i1, i2, i3, i4, i5); assertInRange(i0, i1, i2, i3, i4, i5);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5]]; + i5 * stride_[5]];
} }
T_numtype operator()(int i0, int i1, int i2, int i3, const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6) const int i4, int i5, int i6) const
{ {
assertInRange(i0, i1, i2, i3, i4, i5, i6); assertInRange(i0, i1, i2, i3, i4, i5, i6);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6]]; + i5 * stride_[5] + i6 * stride_[6]];
} }
T_numtype& _bz_restrict operator()(int i0, int i1, int i2, int i3, T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6) int i4, int i5, int i6)
{ {
assertInRange(i0, i1, i2, i3, i4, i5, i6); assertInRange(i0, i1, i2, i3, i4, i5, i6);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6]]; + i5 * stride_[5] + i6 * stride_[6]];
} }
T_numtype operator()(int i0, int i1, int i2, int i3, const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7) const int i4, int i5, int i6, int i7) const
{ {
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7); assertInRange(i0, i1, i2, i3, i4, i5, i6, i7);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]]; + i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]];
} }
T_numtype& _bz_restrict operator()(int i0, int i1, int i2, int i3, T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7) int i4, int i5, int i6, int i7)
{ {
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7); assertInRange(i0, i1, i2, i3, i4, i5, i6, i7);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]]; + i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]];
} }
T_numtype operator()(int i0, int i1, int i2, int i3, const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8) const int i4, int i5, int i6, int i7, int i8) const
{ {
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8); assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7] + i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8]]; + i8 * stride_[8]];
} }
T_numtype& _bz_restrict operator()(int i0, int i1, int i2, int i3, T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8) int i4, int i5, int i6, int i7, int i8)
{ {
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8); assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7] + i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8]]; + i8 * stride_[8]];
} }
T_numtype operator()(int i0, int i1, int i2, int i3, const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8, int i9) const int i4, int i5, int i6, int i7, int i8, int i9) const
{ {
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9); assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7] + i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8] + i9 * stride_[9]]; + i8 * stride_[8] + i9 * stride_[9]];
} }
T_numtype& _bz_restrict operator()(int i0, int i1, int i2, int i3, T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8, int i9) int i4, int i5, int i6, int i7, int i8, int i9)
{ {
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9); assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7] + i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8] + i9 * stride_[9]]; + i8 * stride_[8] + i9 * stride_[9]];
} }
T_numtype operator()(int i0, int i1, int i2, int i3, const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8, int i9, int i10) const int i4, int i5, int i6, int i7, int i8, int i9, int i10) const
{ {
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8, assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8,
i9, i10); i9, i10);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7] + i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8] + i9 * stride_[9] + i10 * stride_[10]]; + i8 * stride_[8] + i9 * stride_[9] + i10 * stride_[10]];
} }
T_numtype& _bz_restrict operator()(int i0, int i1, int i2, int i3, T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8, int i9, int i10) int i4, int i5, int i6, int i7, int i8, int i9, int i10)
{ {
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8, assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8,
i9, i10); i9, i10);
return data_[i0 * stride_[0] + i1 * stride_[1] return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4] + i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7] + i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8] + i9 * stride_[9] + i10 * stride_[10]]; + i8 * stride_[8] + i9 * stride_[9] + i10 * stride_[10]];
} }
skipping to change at line 1989 skipping to change at line 1902
* other helpful things. * other helpful things.
* *
* Once partial specialization becomes widely implemented, these * Once partial specialization becomes widely implemented, these
* operators may be expanded to accept Vector<int> arguments * operators may be expanded to accept Vector<int> arguments
* and produce ArrayPick<T,N> objects. * and produce ArrayPick<T,N> objects.
* *
* This operator() is not provided with a single argument because * This operator() is not provided with a single argument because
* the appropriate cases exist above. * the appropriate cases exist above.
*/ */
#ifdef BZ_PARTIAL_ORDERING #ifdef BZ_HAVE_PARTIAL_ORDERING
template<class T1, class T2> template<typename T1, typename T2>
_bz_typename SliceInfo<T_numtype,T1,T2>::T_slice typename SliceInfo<T_numtype,T1,T2>::T_slice
operator()(T1 r1, T2 r2) const operator()(T1 r1, T2 r2) const
{ {
return SliceInfo<T_numtype,T1,T2>::T_slice(noConst(), r1, r2, typedef typename SliceInfo<T_numtype,T1,T2>::T_slice slice;
nilArraySection(), nilArraySection(), nilArraySection(), return slice(noConst(), r1, r2, nilArraySection(), nilArraySection(
), nilArraySection(),
nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection(), nilArraySection()); nilArraySection(), nilArraySection(), nilArraySection());
} }
template<class T1, class T2, class T3> template<typename T1, typename T2, typename T3>
_bz_typename SliceInfo<T_numtype,T1,T2,T3>::T_slice typename SliceInfo<T_numtype,T1,T2,T3>::T_slice
operator()(T1 r1, T2 r2, T3 r3) const operator()(T1 r1, T2 r2, T3 r3) const
{ {
return SliceInfo<T_numtype,T1,T2,T3>::T_slice(noConst(), r1, r2, r3 typedef typename SliceInfo<T_numtype,T1,T2,T3>::T_slice slice;
, return slice(noConst(), r1, r2, r3, nilArraySection(), nilArraySect
nilArraySection(), nilArraySection(), nilArraySection(), ion(), nilArraySection(),
nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection()); nilArraySection(), nilArraySection());
} }
template<class T1, class T2, class T3, class T4> template<typename T1, typename T2, typename T3, typename T4>
_bz_typename SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice typename SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4) const operator()(T1 r1, T2 r2, T3 r3, T4 r4) const
{ {
return SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice(noConst(), r1, r2, typedef typename SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice slice;
r3, return slice(noConst(), r1, r2, r3, r4, nilArraySection(), nilArray
r4, nilArraySection(), nilArraySection(), Section(),
nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection()); nilArraySection(), nilArraySection());
} }
template<class T1, class T2, class T3, class T4, class T5> template<typename T1, typename T2, typename T3, typename T4, typename T
_bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice 5>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5) const operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5) const
{ {
return SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice(noConst(), r1, typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice slice
r2, ;
r3, r4, r5, nilArraySection(), return slice(noConst(), r1, r2, r3, r4, r5, nilArraySection(),
nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection()); nilArraySection(), nilArraySection());
} }
template<class T1, class T2, class T3, class T4, class T5, class T6> template<typename T1, typename T2, typename T3, typename T4, typename T
_bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice 5, typename T6>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6) const operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6) const
{ {
return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice(noConst(), r typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice sl
1, ice;
r2, r3, r4, r5, r6, return slice(noConst(), r1, r2, r3, r4, r5, r6, nilArraySection(),
nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection()); nilArraySection(), nilArraySection());
} }
template<class T1, class T2, class T3, class T4, class T5, class T6, template<typename T1, typename T2, typename T3, typename T4, typename T
class T7> 5, typename T6,
_bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice typename T7>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7) const operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7) const
{ {
return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice(noConst() typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice
, slice;
r1, r2, r3, r4, r5, r6, r7, return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, nilArraySection
nilArraySection(), nilArraySection(), (), nilArraySection(),
nilArraySection(), nilArraySection()); nilArraySection(), nilArraySection());
} }
template<class T1, class T2, class T3, class T4, class T5, class T6, template<typename T1, typename T2, typename T3, typename T4, typename T
class T7, class T8> 5, typename T6,
_bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_slice typename T7, typename T8>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8) cons t operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8) cons t
{ {
return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_slice(noCons typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_sl
t(), ice slice;
r1, r2, r3, r4, r5, r6, r7, r8, return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8,
nilArraySection(), nilArraySection(), nilArraySection()); nilArraySection(), nilArraySection(), nilArraySection());
} }
template<class T1, class T2, class T3, class T4, class T5, class T6, template<typename T1, typename T2, typename T3, typename T4, typename T
class T7, class T8, class T9> 5, typename T6,
_bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9>::T_slice typename T7, typename T8, typename T9>
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9>::T_slice
T9 r9) const operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r
9) const
{ {
return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9> typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9>::T
::T_slice(noConst(), _slice slice;
r1, r2, r3, r4, r5, r6, r7, r8, r9, return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, nilArra
nilArraySection(), nilArraySection()); ySection(), nilArraySection());
} }
template<class T1, class T2, class T3, class T4, class T5, class T6, template<typename T1, typename T2, typename T3, typename T4, typename T
class T7, class T8, class T9, class T10> 5, typename T6,
_bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::T_sli typename T7, typename T8, typename T9, typename T10>
ce typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r
T9 r9, T10 r10) const 9, T10 r10) const
{ {
return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9, typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10
T10>::T_slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, >::T_slice slice;
r9, r10, nilArraySection()); return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, ni
lArraySection());
} }
template<class T1, class T2, class T3, class T4, class T5, class T6, template<typename T1, typename T2, typename T3, typename T4, typename T
class T7, class T8, class T9, class T10, class T11> 5, typename T6,
_bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10, typename T7, typename T8, typename T9, typename T10, typename T11>
T11>::T_slice typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::T_sli
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, ce
T9 r9, T10 r10, T11 r11) const operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r
9, T10 r10, T11 r11) const
{ {
return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10, typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10
T11>::T_slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, ,T11>::T_slice slice;
r10, r11); return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r1
1);
} }
#endif // BZ_PARTIAL_ORDERING #endif // BZ_HAVE_PARTIAL_ORDERING
/* /*
* These versions of operator() are provided to support tensor-style * These versions of operator() are provided to support tensor-style
* array notation, e.g. * array notation, e.g.
* *
* Array<float, 2> A, B; * Array<float, 2> A, B;
* firstIndex i; * firstIndex i;
* secondIndex j; * secondIndex j;
* thirdIndex k; * thirdIndex k;
* Array<float, 3> C = A(i,j) * B(j,k); * Array<float, 3> C = A(i,j) * B(j,k);
skipping to change at line 2238 skipping to change at line 2141
////////////////////////////////////////////// //////////////////////////////////////////////
// Support for multicomponent arrays // Support for multicomponent arrays
////////////////////////////////////////////// //////////////////////////////////////////////
/* /*
* See <blitz/array/multi.h> for an explanation of the traits class * See <blitz/array/multi.h> for an explanation of the traits class
* multicomponent_traits. * multicomponent_traits.
*/ */
// NEEDS_WORK: const version Array<typename multicomponent_traits<T_numtype>::T_element,N_rank>
Array<_bz_typename multicomponent_traits<T_numtype>::T_element,N_rank> operator[](const unsigned component) {
operator[](int component) typedef typename multicomponent_traits<T_numtype>::T_element T_comp
{ Type;
typedef _bz_typename multicomponent_traits<T_numtype>::T_element
T_compType;
return extractComponent(T_compType(), return extractComponent(T_compType(),component,
component, multicomponent_traits<T_numtype>::numComponents); multicomponent_traits<T_numtype>::numCompon
ents);
}
const Array<typename multicomponent_traits<T_numtype>::T_element,N_rank
>
operator[](const unsigned component) const {
typedef typename multicomponent_traits<T_numtype>::T_element T_comp
Type;
return extractComponent(T_compType(),component,
multicomponent_traits<T_numtype>::numCompon
ents);
}
Array<typename multicomponent_traits<T_numtype>::T_element,N_rank>
operator[](const int component) {
return operator[](static_cast<unsigned>(component));
}
const Array<typename multicomponent_traits<T_numtype>::T_element,N_rank
>
operator[](const int component) const {
return operator[](static_cast<unsigned>(component));
} }
////////////////////////////////////////////// //////////////////////////////////////////////
// Indirection // Indirection
////////////////////////////////////////////// //////////////////////////////////////////////
template<class T_indexContainer> template<typename T_indexContainer>
IndirectArray<T_array, T_indexContainer> IndirectArray<T_array, T_indexContainer>
operator[](const T_indexContainer& index) operator[](const T_indexContainer& index)
{ {
return IndirectArray<T_array, T_indexContainer>(*this, return IndirectArray<T_array, T_indexContainer>(*this,
const_cast<T_indexContainer&>(index)); const_cast<T_indexContainer&>(index));
} }
////////////////////////////////////////////// //////////////////////////////////////////////
// Assignment Operators // Assignment Operators
////////////////////////////////////////////// //////////////////////////////////////////////
skipping to change at line 2279 skipping to change at line 2197
{ {
return ListInitializationSwitch<T_array,T_numtype*>(*this, x); return ListInitializationSwitch<T_array,T_numtype*>(*this, x);
} }
T_array& initialize(T_numtype); T_array& initialize(T_numtype);
// Was: // Was:
// T_array& operator=(T_numtype); // T_array& operator=(T_numtype);
#ifdef BZ_NEW_EXPRESSION_TEMPLATES #ifdef BZ_NEW_EXPRESSION_TEMPLATES
template<class T_expr> template<typename T_expr>
T_array& operator=(const ETBase<T_expr>&); T_array& operator=(const ETBase<T_expr>&);
T_array& operator=(const Array<T_numtype,N_rank>&); T_array& operator=(const Array<T_numtype,N_rank>&);
template<class T> T_array& operator+=(const T&); template<typename T> T_array& operator+=(const T&);
template<class T> T_array& operator-=(const T&); template<typename T> T_array& operator-=(const T&);
template<class T> T_array& operator*=(const T&); template<typename T> T_array& operator*=(const T&);
template<class T> T_array& operator/=(const T&); template<typename T> T_array& operator/=(const T&);
template<class T> T_array& operator%=(const T&); template<typename T> T_array& operator%=(const T&);
template<class T> T_array& operator^=(const T&); template<typename T> T_array& operator^=(const T&);
template<class T> T_array& operator&=(const T&); template<typename T> T_array& operator&=(const T&);
template<class T> T_array& operator|=(const T&); template<typename T> T_array& operator|=(const T&);
template<class T> T_array& operator>>=(const T&); template<typename T> T_array& operator>>=(const T&);
template<class T> T_array& operator<<=(const T&); template<typename T> T_array& operator<<=(const T&);
#else #else
T_array& operator+=(T_numtype); T_array& operator+=(T_numtype);
T_array& operator-=(T_numtype); T_array& operator-=(T_numtype);
T_array& operator*=(T_numtype); T_array& operator*=(T_numtype);
T_array& operator/=(T_numtype); T_array& operator/=(T_numtype);
T_array& operator%=(T_numtype); T_array& operator%=(T_numtype);
T_array& operator^=(T_numtype); T_array& operator^=(T_numtype);
T_array& operator&=(T_numtype); T_array& operator&=(T_numtype);
T_array& operator|=(T_numtype); T_array& operator|=(T_numtype);
T_array& operator>>=(T_numtype); T_array& operator>>=(T_numtype);
T_array& operator<<=(T_numtype); T_array& operator<<=(T_numtype);
// Array operands // Array operands
T_array& operator=(const Array<T_numtype,N_rank>&); T_array& operator=(const Array<T_numtype,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator=(const Array<P_numtype2,N_rank>&); T_array& operator=(const Array<P_numtype2,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator+=(const Array<P_numtype2,N_rank>&); T_array& operator+=(const Array<P_numtype2,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator-=(const Array<P_numtype2,N_rank>&); T_array& operator-=(const Array<P_numtype2,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator*=(const Array<P_numtype2,N_rank>&); T_array& operator*=(const Array<P_numtype2,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator/=(const Array<P_numtype2,N_rank>&); T_array& operator/=(const Array<P_numtype2,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator%=(const Array<P_numtype2,N_rank>&); T_array& operator%=(const Array<P_numtype2,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator^=(const Array<P_numtype2,N_rank>&); T_array& operator^=(const Array<P_numtype2,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator&=(const Array<P_numtype2,N_rank>&); T_array& operator&=(const Array<P_numtype2,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator|=(const Array<P_numtype2,N_rank>&); T_array& operator|=(const Array<P_numtype2,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator>>=(const Array<P_numtype2,N_rank>&); T_array& operator>>=(const Array<P_numtype2,N_rank>&);
template<class P_numtype2> template<typename P_numtype2>
T_array& operator<<=(const Array<P_numtype2,N_rank>&); T_array& operator<<=(const Array<P_numtype2,N_rank>&);
// Array expression operands // Array expression operands
template<class T_expr> template<typename T_expr>
inline T_array& operator=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<class T_expr> template<typename T_expr>
inline T_array& operator+=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator+=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<class T_expr> template<typename T_expr>
inline T_array& operator-=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator-=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<class T_expr> template<typename T_expr>
inline T_array& operator*=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator*=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<class T_expr> template<typename T_expr>
inline T_array& operator/=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator/=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<class T_expr> template<typename T_expr>
inline T_array& operator%=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator%=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<class T_expr> template<typename T_expr>
inline T_array& operator^=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator^=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<class T_expr> template<typename T_expr>
inline T_array& operator&=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator&=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<class T_expr> template<typename T_expr>
inline T_array& operator|=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator|=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<class T_expr> template<typename T_expr>
inline T_array& operator>>=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator>>=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<class T_expr> template<typename T_expr>
inline T_array& operator<<=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr); inline T_array& operator<<=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
// NEEDS_WORK -- Index placeholder operand // NEEDS_WORK -- Index placeholder operand
// NEEDS_WORK -- Random operand // NEEDS_WORK -- Random operand
#endif #endif
public: public:
// Undocumented implementation routines // Undocumented implementation routines
template<class T_expr, class T_update> template<typename T_expr, typename T_update>
inline T_array& evaluate(T_expr expr, T_update); inline T_array& evaluate(T_expr expr, T_update);
#ifdef BZ_HAVE_STD #ifdef BZ_HAVE_STD
#ifdef BZ_ARRAY_SPACE_FILLING_TRAVERSAL #ifdef BZ_ARRAY_SPACE_FILLING_TRAVERSAL
template<class T_expr, class T_update> template<typename T_expr, typename T_update>
inline T_array& evaluateWithFastTraversal( inline T_array& evaluateWithFastTraversal(
const TraversalOrder<N_rank - 1>& order, const TraversalOrder<N_rank - 1>& order,
T_expr expr, T_update); T_expr expr, T_update);
#endif // BZ_ARRAY_SPACE_FILLING_TRAVERSAL #endif // BZ_ARRAY_SPACE_FILLING_TRAVERSAL
#endif #endif
#ifdef BZ_ARRAY_2D_STENCIL_TILING #ifdef BZ_ARRAY_2D_STENCIL_TILING
template<class T_expr, class T_update> template<typename T_expr, typename T_update>
inline T_array& evaluateWithTiled2DTraversal( inline T_array& evaluateWithTiled2DTraversal(
T_expr expr, T_update); T_expr expr, T_update);
#endif #endif
template<class T_expr, class T_update> template<typename T_expr, typename T_update>
inline T_array& evaluateWithIndexTraversal1( inline T_array& evaluateWithIndexTraversal1(
T_expr expr, T_update); T_expr expr, T_update);
template<class T_expr, class T_update> template<typename T_expr, typename T_update>
inline T_array& evaluateWithIndexTraversalN( inline T_array& evaluateWithIndexTraversalN(
T_expr expr, T_update); T_expr expr, T_update);
template<class T_expr, class T_update> template<typename T_expr, typename T_update>
inline T_array& evaluateWithStackTraversal1( inline T_array& evaluateWithStackTraversal1(
T_expr expr, T_update); T_expr expr, T_update);
template<class T_expr, class T_update> template<typename T_expr, typename T_update>
inline T_array& evaluateWithStackTraversalN( inline T_array& evaluateWithStackTraversalN(
T_expr expr, T_update); T_expr expr, T_update);
T_numtype* _bz_restrict getInitializationIterator() T_numtype* restrict getInitializationIterator() { return dataFirst(); }
{ return dataFirst(); }
_bz_bool canCollapse(int outerRank, int innerRank) const bool canCollapse(int outerRank, int innerRank) const {
{
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
BZ_DEBUG_MESSAGE("stride(" << innerRank << ")=" << stride(innerRank ) BZ_DEBUG_MESSAGE("stride(" << innerRank << ")=" << stride(innerRank )
<< ", extent()=" << extent(innerRank) << ", stride(outerRank)=" << ", extent()=" << extent(innerRank) << ", stride(outerRank)="
<< stride(outerRank)); << stride(outerRank));
#endif #endif
return (stride(innerRank) * extent(innerRank) == stride(outerRank)) ; return (stride(innerRank) * extent(innerRank) == stride(outerRank)) ;
} }
protected: protected:
////////////////////////////////////////////// //////////////////////////////////////////////
skipping to change at line 2449 skipping to change at line 2365
Range r7, Range r8); Range r7, Range r8);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0, void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6,
Range r7, Range r8, Range r9); Range r7, Range r8, Range r9);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0, void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6,
Range r7, Range r8, Range r9, Range r10); Range r7, Range r8, Range r9, Range r10);
void calculateZeroOffset(); void calculateZeroOffset();
template<int N_rank2, class R0, class R1, class R2, class R3, class R4, template<int N_rank2, typename R0, typename R1, typename R2, typename R
class R5, class R6, class R7, class R8, class R9, class R10> 3, typename R4,
typename R5, typename R6, typename R7, typename R8, typename R9, ty
pename R10>
void constructSlice(Array<T_numtype, N_rank2>& array, R0 r0, R1 r1, R2 r2, void constructSlice(Array<T_numtype, N_rank2>& array, R0 r0, R1 r1, R2 r2,
R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10); R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10);
template<int N_rank2> template<int N_rank2>
void slice(int& setRank, Range r, Array<T_numtype,N_rank2>& array, void slice(int& setRank, Range r, Array<T_numtype,N_rank2>& array,
TinyVector<int,N_rank2>& rankMap, int sourceRank); TinyVector<int,N_rank2>& rankMap, int sourceRank);
template<int N_rank2> template<int N_rank2>
void slice(int& setRank, int i, Array<T_numtype,N_rank2>& array, void slice(int& setRank, int i, Array<T_numtype,N_rank2>& array,
TinyVector<int,N_rank2>& rankMap, int sourceRank); TinyVector<int,N_rank2>& rankMap, int sourceRank);
template<int N_rank2> template<int N_rank2>
void slice(int& setRank, nilArraySection, Array<T_numtype,N_rank2>& arr void slice(int&, nilArraySection, Array<T_numtype,N_rank2>&,
ay, TinyVector<int,N_rank2>&, int)
TinyVector<int,N_rank2>& rankMap, int sourceRank)
{ } { }
void doTranspose(int destRank, int sourceRank, T_array& array); void doTranspose(int destRank, int sourceRank, T_array& array);
protected: protected:
////////////////////////////////////////////// //////////////////////////////////////////////
// Data members // Data members
////////////////////////////////////////////// //////////////////////////////////////////////
// NB: adding new data members may require changes to ctors, reference( ) // NB: adding new data members may require changes to ctors, reference( )
skipping to change at line 2537 skipping to change at line 2453
const int seventhDim = 6; const int seventhDim = 6;
const int eighthDim = 7; const int eighthDim = 7;
const int ninthDim = 8; const int ninthDim = 8;
const int tenthDim = 9; const int tenthDim = 9;
const int eleventhDim = 10; const int eleventhDim = 10;
/* /*
* Global Functions * Global Functions
*/ */
template<class T_numtype> template<typename T_numtype>
ostream& operator<<(ostream&, const Array<T_numtype,1>&); ostream& operator<<(ostream&, const Array<T_numtype,1>&);
template<class T_numtype> template<typename T_numtype>
ostream& operator<<(ostream&, const Array<T_numtype,2>&); ostream& operator<<(ostream&, const Array<T_numtype,2>&);
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
ostream& operator<<(ostream&, const Array<T_numtype,N_rank>&); ostream& operator<<(ostream&, const Array<T_numtype,N_rank>&);
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
istream& operator>>(istream& is, Array<T_numtype,N_rank>& x); istream& operator>>(istream& is, Array<T_numtype,N_rank>& x);
template <typename P_numtype,int N_rank>
void swap(Array<P_numtype,N_rank>& a,Array<P_numtype,N_rank>& b) {
Array<P_numtype,N_rank> c(a);
a.reference(b);
b.reference(c);
}
template <typename P_expr>
void find(Array<TinyVector<int,P_expr::rank>,1>& indices,
const _bz_ArrayExpr<P_expr>& expr) {
find(indices,
static_cast< Array<typename P_expr::T_numtype,P_expr::rank> >(expr
));
}
template <typename P_numtype, int N_rank>
void find(Array<TinyVector<int,N_rank>,1>& indices,
const Array<P_numtype,N_rank>& exprVals) {
indices.resize(exprVals.size());
typename Array<P_numtype,N_rank>::const_iterator it, end = exprVals.end
();
int j=0;
for (it = exprVals.begin(); it != end; ++it)
if (*it)
indices(j++) = it.position();
if (j)
indices.resizeAndPreserve(j);
else
indices.free();
return;
}
BZ_NAMESPACE_END BZ_NAMESPACE_END
/* /*
* Include implementations of the member functions and some additional * Include implementations of the member functions and some additional
* global functions. * global functions.
*/ */
#include <blitz/array/iter.h> // Array iterators #include <blitz/array/iter.h> // Array iterators
#include <blitz/array/fastiter.h> // Fast Array iterators (for et) #include <blitz/array/fastiter.h> // Fast Array iterators (for et)
#include <blitz/array/expr.h> // Array expression objects #include <blitz/array/expr.h> // Array expression objects
 End of changes. 176 change blocks. 
379 lines changed or deleted 366 lines changed or added


 array-old.h   array-old.h 
/************************************************************************** * /************************************************************************** *
* blitz/array-old.h Maximal include version of Array<P_numtype, N_rank> * blitz/array-old.h Maximal include version of Array<P_numtype, N_rank>
* Note: see <blitz/array-impl.h> for the class def. * Note: see <blitz/array-impl.h> for the class def.
* *
* $Id: array-old.h,v 1.1 2002/07/02 19:23:59 jcumming Exp $ * $Id: array-old.h,v 1.2 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: array-old.h,v $
* Revision 1.1 2002/07/02 19:23:59 jcumming
* This is the new name for the old array.h header file that included all o
f the Array, TinyVector and Vector stuff along with Vector ET support. It
is now deprecated.
*
* Revision 1.4 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
*/
#ifndef BZ_ARRAY_OLD_H #ifndef BZ_ARRAY_OLD_H
#define BZ_ARRAY_OLD_H #define BZ_ARRAY_OLD_H
/* /*
* <blitz/array.h> used to include most of the Blitz++ library * <blitz/array.h> used to include most of the Blitz++ library
* functionality, totally ~ 120000 lines of source code. This * functionality, totally ~ 120000 lines of source code. This
* made for extremely slow compile times; processing #include <blitz/array. h> * made for extremely slow compile times; processing #include <blitz/array. h>
* took gcc about 25 seconds on a 500 MHz pentium box. * took gcc about 25 seconds on a 500 MHz pentium box.
* *
 End of changes. 2 change blocks. 
13 lines changed or deleted 3 lines changed or added


 array.h   array.h 
/************************************************************************** * /************************************************************************** *
* blitz/array.h Minimal include version of Array<T,N> * blitz/array.h Minimal include version of Array<T,N>
* *
* $Id: array.h,v 1.5 2002/07/02 19:22:00 jcumming Exp $ * $Id: array.h,v 1.6 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2000 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2000 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: array.h,v $
* Revision 1.5 2002/07/02 19:22:00 jcumming
* This file used to be called Array.h but has been renamed to avoid name
* clashes on Windows-based systems. This file includes only the Array
* class implementation files.
*
* Revision 1.1 2001/01/26 18:30:49 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.1 2001/01/24 22:51:50 tveldhui
* Reorganized #include orders to avoid including the huge Vector e.t.
* implementation when using Array.
*
*/
#ifndef BZ_ARRAY_ONLY_H #ifndef BZ_ARRAY_ONLY_H
#define BZ_ARRAY_ONLY_H #define BZ_ARRAY_ONLY_H
// See comments in <blitz/array-old.h> for an explanation of the new // See comments in <blitz/array-old.h> for an explanation of the new
// headers arrangement. // headers arrangement.
#include <blitz/array-impl.h> #include <blitz/array-impl.h>
#endif // BZ_ARRAY_ONLY_H #endif // BZ_ARRAY_ONLY_H
 End of changes. 2 change blocks. 
17 lines changed or deleted 3 lines changed or added


 asexpr.h   asexpr.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/asexpr.h Declaration of the asExpr helper functions * blitz/array/asexpr.h Declaration of the asExpr helper functions
* *
* $Id: asexpr.h,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: asexpr.h,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYASEXPR_H #ifndef BZ_ARRAYASEXPR_H
#define BZ_ARRAYASEXPR_H #define BZ_ARRAYASEXPR_H
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/asexpr.h> must be included via <blitz/array.h> #error <blitz/array/asexpr.h> must be included via <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// The traits class asExpr converts arbitrary things to // The traits class asExpr converts arbitrary things to
// expression templatable operands. // expression templatable operands.
// Default to scalar. // Default to scalar.
template<class T>
template <typename T>
struct asExpr { struct asExpr {
typedef _bz_ArrayExprConstant<T> T_expr; typedef _bz_ArrayExprConstant<T> T_expr;
static T_expr getExpr(const T& x) { return T_expr(x); }
}; };
// Already an expression template term // Already an expression template term
template<class T>
template <typename T>
struct asExpr<_bz_ArrayExpr<T> > { struct asExpr<_bz_ArrayExpr<T> > {
typedef _bz_ArrayExpr<T> T_expr; typedef _bz_ArrayExpr<T> T_expr;
static const T_expr& getExpr(const T_expr& x) { return x; }
}; };
// An array operand // An array operand
template<class T, int N>
template <typename T,int N>
struct asExpr<Array<T,N> > { struct asExpr<Array<T,N> > {
typedef FastArrayIterator<T,N> T_expr; typedef FastArrayIterator<T,N> T_expr;
static T_expr getExpr(const Array<T,N>& x) { return x.beginFast(); }
}; };
// Index placeholder // Index placeholder
template<int N>
template <int N>
struct asExpr<IndexPlaceholder<N> > { struct asExpr<IndexPlaceholder<N> > {
typedef IndexPlaceholder<N> T_expr; typedef IndexPlaceholder<N> T_expr;
static T_expr getExpr(T_expr x) { return x; }
}; };
#ifdef BZ_HAVE_TEMPLATES_AS_TEMPLATE_ARGUMENTS
// A traits class that provides the return type of a binary operation.
template <template <typename T1> class OP, typename O1>
struct BzUnaryExprResult {
typedef _bz_ArrayExpr<_bz_ArrayExprUnaryOp<
typename asExpr<O1>::T_expr,
OP<typename asExpr<O1>::T_expr::T_numtype> > > T_result;
};
template <template <typename T1, typename T2> class OP,
typename O1, typename O2>
struct BzBinaryExprResult {
typedef _bz_ArrayExpr<_bz_ArrayExprBinaryOp<
typename asExpr<O1>::T_expr,
typename asExpr<O2>::T_expr,
OP<typename asExpr<O1>::T_expr::T_numtype,
typename asExpr<O2>::T_expr::T_numtype> > > T_result;
};
template <template <typename T1, typename T2, typename T3> class OP,
typename O1, typename O2, typename O3>
struct BzTernaryExprResult {
typedef _bz_ArrayExpr<_bz_ArrayExprTernaryOp<
typename asExpr<O1>::T_expr,
typename asExpr<O2>::T_expr,
typename asExpr<O3>::T_expr,
OP<typename asExpr<O1>::T_expr::T_numtype,
typename asExpr<O2>::T_expr::T_numtype,
typename asExpr<O3>::T_expr::T_numtype> > > T_result;
};
#endif /* BZ_HAVE_TEMPLATES_AS_TEMPLATE_ARGUMENTS */
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif #endif
 End of changes. 12 change blocks. 
18 lines changed or deleted 54 lines changed or added


 bench.cc   bench.cc 
/* /*
* $Id: bench.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $
*
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: bench.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.5 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.4 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.3 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_BENCH_CC #ifndef BZ_BENCH_CC
#define BZ_BENCH_CC #define BZ_BENCH_CC
#ifndef BZ_BENCH_H #ifndef BZ_BENCH_H
#error <blitz/bench.cc> must be included via <blitz/bench.h> #error <blitz/bench.cc> must be included via <blitz/bench.h>
#endif #endif
#ifdef BZ_HAVE_STD #ifdef BZ_HAVE_STD
#include <fstream> #include <fstream>
#else #else
#include <fstream.h> #include <fstream.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_parameter> template<typename P_parameter>
Benchmark<P_parameter>::Benchmark(unsigned numImplementations) Benchmark<P_parameter>::Benchmark(unsigned numImplementations)
{ {
state_ = uninitialized; state_ = uninitialized;
numImplementations_ = numImplementations; numImplementations_ = numImplementations;
numStoredImplementations_ = 0; numStoredImplementations_ = 0;
implementations_ = new BenchmarkImplementation<P_parameter>* [numImplem entations_]; implementations_ = new BenchmarkImplementation<P_parameter>* [numImplem entations_];
rates_.resize(numImplementations, numParameterSettings()); rates_.resize(numImplementations, numParameterSettings());
Mflops_.resize(numImplementations, numParameterSettings()); Mflops_.resize(numImplementations, numParameterSettings());
} }
template<class P_parameter> template<typename P_parameter>
Benchmark<P_parameter>::~Benchmark() Benchmark<P_parameter>::~Benchmark()
{ {
delete [] implementations_; delete [] implementations_;
} }
template<class P_parameter> template<typename P_parameter>
void Benchmark<P_parameter>::addImplementation( void Benchmark<P_parameter>::addImplementation(
BenchmarkImplementation<P_parameter> * implementation) BenchmarkImplementation<P_parameter> * implementation)
{ {
BZPRECONDITION(state_ == uninitialized); BZPRECONDITION(state_ == uninitialized);
BZPRECONDITION(numStoredImplementations_ < numImplementations_); BZPRECONDITION(numStoredImplementations_ < numImplementations_);
implementations_[numStoredImplementations_++] = implementation; implementations_[numStoredImplementations_++] = implementation;
if (numStoredImplementations_ == numImplementations_) if (numStoredImplementations_ == numImplementations_)
state_ = initialized; state_ = initialized;
} }
template<class P_parameter> template<typename P_parameter>
void Benchmark<P_parameter>::run(ostream& log) void Benchmark<P_parameter>::run(ostream& log)
{ {
BZPRECONDITION(state_ == initialized); BZPRECONDITION(state_ == initialized);
state_ = running; state_ = running;
Timer t; Timer t;
for (unsigned j=0; j < numImplementations_; ++j) for (unsigned j=0; j < numImplementations_; ++j)
{ {
for (unsigned i=0; i < numParameterSettings(); ++i) for (unsigned i=0; i < numParameterSettings(); ++i)
skipping to change at line 120 skipping to change at line 105
log << endl; log << endl;
log.flush(); log.flush();
implementations_[j]->done(); implementations_[j]->done();
} }
} }
state_ = done; state_ = done;
} }
template<class P_parameter> template<typename P_parameter>
double Benchmark<P_parameter>::getMflops(unsigned implementation, double Benchmark<P_parameter>::getMflops(unsigned implementation,
unsigned setting) const unsigned setting) const
{ {
BZPRECONDITION(state_ == done); BZPRECONDITION(state_ == done);
BZPRECONDITION(implementation < numImplementations_); BZPRECONDITION(implementation < numImplementations_);
BZPRECONDITION(setting < numParameterSettings()); BZPRECONDITION(setting < numParameterSettings());
return Mflops_(implementation, setting); return Mflops_(implementation, setting);
} }
template<class P_parameter> template<typename P_parameter>
double Benchmark<P_parameter>::getRate(unsigned implementation, double Benchmark<P_parameter>::getRate(unsigned implementation,
unsigned setting) const unsigned setting) const
{ {
BZPRECONDITION(state_ == done); BZPRECONDITION(state_ == done);
BZPRECONDITION(implementation < numImplementations_); BZPRECONDITION(implementation < numImplementations_);
BZPRECONDITION(setting < numParameterSettings()); BZPRECONDITION(setting < numParameterSettings());
return rates_(implementation, setting); return rates_(implementation, setting);
} }
template<class P_parameter> template<typename P_parameter>
void Benchmark<P_parameter>::saveMatlabGraph(const char* filename) const void Benchmark<P_parameter>::saveMatlabGraph(const char* filename) const
{ {
BZPRECONDITION(state_ == done); BZPRECONDITION(state_ == done);
ofstream ofs(filename); ofstream ofs(filename);
assert(ofs.good()); assert(ofs.good());
ofs << "% This matlab file generated automatically by class Benchmark" ofs << "% This matlab file generated automatically by class Benchmark"
<< endl << "% of the Blitz++ class library." << endl << endl; << endl << "% of the Blitz++ class library." << endl << endl;
 End of changes. 9 change blocks. 
22 lines changed or deleted 7 lines changed or added


 bench.h   bench.h 
skipping to change at line 22 skipping to change at line 22
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Id: bench.h,v 1.3 2001/01/25 00:25:54 tveldhui Exp $
*
* $Log: bench.h,v $
* Revision 1.3 2001/01/25 00:25:54 tveldhui
* Ensured that source files have cvs logs.
*
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:30:34 tveldhui
* Prior to rewrite of Bench class; in this version, Bench contains
* each benchmark implementation.
*
*/
#ifndef BZ_BENCH_H #ifndef BZ_BENCH_H
#define BZ_BENCH_H #define BZ_BENCH_H
#ifndef BZ_MATRIX_H #ifndef BZ_MATRIX_H
#include <blitz/matrix.h> #include <blitz/matrix.h>
#endif #endif
#ifndef BZ_TIMER_H #ifndef BZ_TIMER_H
#include <blitz/timer.h> #include <blitz/timer.h>
#endif #endif
#include <math.h> #include <math.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Forward declaration // Forward declaration
template<class P_parameter = unsigned> template<typename P_parameter = unsigned>
class BenchmarkImplementation; class BenchmarkImplementation;
// Declaration of class Benchmark<T> // Declaration of class Benchmark<T>
// The template parameter T is the parameter type which is varied in // The template parameter T is the parameter type which is varied in
// the benchmark. Typically T will be an unsigned, and will represent // the benchmark. Typically T will be an unsigned, and will represent
// the length of a vector, size of an array, etc. // the length of a vector, size of an array, etc.
template<class P_parameter = unsigned> template<typename P_parameter = unsigned>
class Benchmark { class Benchmark {
public: public:
typedef P_parameter T_parameter; typedef P_parameter T_parameter;
Benchmark(unsigned numImplementations); Benchmark(unsigned numImplementations);
~Benchmark(); ~Benchmark();
void addImplementation(BenchmarkImplementation<T_parameter>* void addImplementation(BenchmarkImplementation<T_parameter>*
skipping to change at line 125 skipping to change at line 102
unsigned numImplementations_; unsigned numImplementations_;
unsigned numStoredImplementations_; unsigned numStoredImplementations_;
BenchmarkImplementation<T_parameter>** implementations_; BenchmarkImplementation<T_parameter>** implementations_;
Matrix<double,RowMajor> rates_; // Iterations per second array Matrix<double,RowMajor> rates_; // Iterations per second array
Matrix<double,RowMajor> Mflops_; Matrix<double,RowMajor> Mflops_;
}; };
template<class P_parameter> template<typename P_parameter>
class BenchmarkImplementation { class BenchmarkImplementation {
public: public:
typedef P_parameter T_parameter; typedef P_parameter T_parameter;
virtual void initialize(P_parameter parameter) { } virtual void initialize(P_parameter parameter) { }
virtual void done() { } virtual void done() { }
virtual const char* implementationName() const virtual const char* implementationName() const
 End of changes. 4 change blocks. 
28 lines changed or deleted 5 lines changed or added


 benchext.cc   benchext.cc 
/* /*
* $Id: benchext.cc,v 1.3 2002/06/28 05:05:58 jcumming Exp $
*
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: benchext.cc,v $
* Revision 1.3 2002/06/28 05:05:58 jcumming
* Changed loop variable j to unsigned to eliminate signed/unsigned compari
sons.
*
* Revision 1.2 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/ */
#ifndef BZ_BENCHEXT_CC #ifndef BZ_BENCHEXT_CC
#define BZ_BENCHEXT_CC #define BZ_BENCHEXT_CC
#ifndef BZ_BENCHEXT_H #ifndef BZ_BENCHEXT_H
#error <blitz/benchext.cc> must be included via <blitz/benchext.h> #error <blitz/benchext.cc> must be included via <blitz/benchext.h>
#endif #endif
#include <blitz/vector-et.h> #include <blitz/vector-et.h>
#ifdef BZ_HAVE_STD #ifdef BZ_HAVE_STD
#include <fstream> #include <fstream>
#else #else
#include <fstream.h> #include <fstream.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_parameter> template<typename P_parameter>
BenchmarkExt<P_parameter>::BenchmarkExt(const char* name, BenchmarkExt<P_parameter>::BenchmarkExt(const char* name,
int numImplementations) int numImplementations)
{ {
BZPRECONDITION(numImplementations > 0); BZPRECONDITION(numImplementations > 0);
description_ = name; description_ = name;
numImplementations_ = numImplementations; numImplementations_ = numImplementations;
implementationDescriptions_.resize(numImplementations); implementationDescriptions_.resize(numImplementations);
parameterDescription_ = "Vector length"; parameterDescription_ = "Vector length";
rateDescription_ = "Mflops/s"; rateDescription_ = "Mflops/s";
// Set up default parameters and iterations // Set up default parameters and iterations
setNumParameters(19); setNumParameters(19);
// NEEDS_WORK: once pow(X,Y) is supported, can just say // NEEDS_WORK: once pow(X,Y) is supported, can just say
// parameters_ = pow(10.0, Range(1,20)/4.0); // parameters_ = pow(10.0, Range(1,20)/4.0);
for (int i=0; i < numParameters_; ++i) for (unsigned i=0; i < numParameters_; ++i)
parameters_[i] = (P_parameter)::pow(10.0, (i+1)/4.0); parameters_[i] = (P_parameter)::pow(10.0, (i+1)/4.0);
iterations_ = 5.0e+5 / parameters_; iterations_ = 5.0e+5 / parameters_;
flopsPerIteration_ = parameters_; flopsPerIteration_ = parameters_;
// Set up initial state // Set up initial state
state_ = initializing; state_ = initializing;
implementationNumber_ = 0; implementationNumber_ = 0;
} }
template<class P_parameter> template<typename P_parameter>
BenchmarkExt<P_parameter>::~BenchmarkExt() BenchmarkExt<P_parameter>::~BenchmarkExt()
{ {
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::setNumParameters(int numParameters) void BenchmarkExt<P_parameter>::setNumParameters(int numParameters)
{ {
BZPRECONDITION(state_ == initializing); //BZPRECONDITION(state_ == initializing);
numParameters_ = numParameters; numParameters_ = numParameters;
parameters_.resize(numParameters_); parameters_.resize(numParameters_);
iterations_.resize(numParameters_); iterations_.resize(numParameters_);
flopsPerIteration_.resize(numParameters_); flopsPerIteration_.resize(numParameters_);
// Set up timer and Mflops array // Set up timer and Mflops array
times_.resize(numImplementations_, numParameters_); times_.resize(numImplementations_, numParameters_);
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::setParameterVector(Vector<P_parameter> parm s) void BenchmarkExt<P_parameter>::setParameterVector(Vector<P_parameter> parm s)
{ {
BZPRECONDITION(state_ == initializing); BZPRECONDITION(state_ == initializing);
BZPRECONDITION(parms.length() == parameters_.length()); BZPRECONDITION(parms.length() == parameters_.length());
// NEEDS_WORK: should use operator=(), once that problem // NEEDS_WORK: should use operator=(), once that problem
// gets sorted out. // gets sorted out.
// parameters_ = parms; // parameters_ = parms;
for (int i=0; i < parameters_.length(); ++i) for (int i=0; i < parameters_.length(); ++i)
parameters_[i] = parms(i); parameters_[i] = parms(i);
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::setParameterDescription(const char* string) void BenchmarkExt<P_parameter>::setParameterDescription(const char* string)
{ {
parameterDescription_ = string; parameterDescription_ = string;
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::setIterations(Vector<long> iters) void BenchmarkExt<P_parameter>::setIterations(Vector<long> iters)
{ {
BZPRECONDITION(state_ == initializing); BZPRECONDITION(state_ == initializing);
// NEEDS_WORK: should use operator=(), once that problem // NEEDS_WORK: should use operator=(), once that problem
// gets sorted out. // gets sorted out.
// iterations_ = iters; // iterations_ = iters;
for (int i=0; i < iterations_.length(); ++i) for (int i=0; i < iterations_.length(); ++i)
iterations_[i] = iters(i); iterations_[i] = iters(i);
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::setFlopsPerIteration(Vector<double> void BenchmarkExt<P_parameter>::setFlopsPerIteration(Vector<double>
flopsPerIteration) flopsPerIteration)
{ {
BZPRECONDITION(flopsPerIteration_.length() == flopsPerIteration.length( )); BZPRECONDITION(flopsPerIteration_.length() == flopsPerIteration.length( ));
// NEEDS_WORK: should use operator=(), once that problem // NEEDS_WORK: should use operator=(), once that problem
// gets sorted out. // gets sorted out.
// flopsPerIteration_ = flopsPerIteration; // flopsPerIteration_ = flopsPerIteration;
for (int i=0; i < flopsPerIteration_.length(); ++i) for (int i=0; i < flopsPerIteration_.length(); ++i)
flopsPerIteration_[i] = flopsPerIteration[i]; flopsPerIteration_[i] = flopsPerIteration[i];
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::setRateDescription(const char* string) void BenchmarkExt<P_parameter>::setRateDescription(const char* string)
{ {
rateDescription_ = string; rateDescription_ = string;
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::beginBenchmarking() void BenchmarkExt<P_parameter>::beginBenchmarking()
{ {
BZPRECONDITION(state_ == initializing); BZPRECONDITION(state_ == initializing);
state_ = benchmarking; state_ = benchmarking;
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::beginImplementation(const char* description ) void BenchmarkExt<P_parameter>::beginImplementation(const char* description )
{ {
BZPRECONDITION(implementationNumber_ < numImplementations_); BZPRECONDITION(implementationNumber_ < numImplementations_);
BZPRECONDITION(state_ == benchmarking); BZPRECONDITION(state_ == benchmarking);
implementationDescriptions_[implementationNumber_] = description; implementationDescriptions_[implementationNumber_] = description;
state_ = benchmarkingImplementation; state_ = benchmarkingImplementation;
parameterNumber_ = 0; parameterNumber_ = 0;
} }
template<class P_parameter> template<typename P_parameter>
_bz_bool BenchmarkExt<P_parameter>::doneImplementationBenchmark() const bool BenchmarkExt<P_parameter>::doneImplementationBenchmark() const
{ {
BZPRECONDITION(state_ == benchmarkingImplementation); BZPRECONDITION(state_ == benchmarkingImplementation);
return parameterNumber_ == numParameters_; return parameterNumber_ == numParameters_;
} }
template<class P_parameter> template<typename P_parameter>
P_parameter BenchmarkExt<P_parameter>::getParameter() const P_parameter BenchmarkExt<P_parameter>::getParameter() const
{ {
BZPRECONDITION(state_ == benchmarkingImplementation); BZPRECONDITION(state_ == benchmarkingImplementation);
BZPRECONDITION(parameterNumber_ >= 0);
BZPRECONDITION(parameterNumber_ < numParameters_); BZPRECONDITION(parameterNumber_ < numParameters_);
return parameters_[parameterNumber_]; return parameters_[parameterNumber_];
} }
template<class P_parameter> template<typename P_parameter>
long BenchmarkExt<P_parameter>::getIterations() const long BenchmarkExt<P_parameter>::getIterations() const
{ {
BZPRECONDITION(state_ == benchmarkingImplementation); BZPRECONDITION(state_ == benchmarkingImplementation);
BZPRECONDITION(parameterNumber_ >= 0);
BZPRECONDITION(parameterNumber_ < numParameters_); BZPRECONDITION(parameterNumber_ < numParameters_);
return iterations_[parameterNumber_]; return iterations_[parameterNumber_];
} }
template<class P_parameter> template<typename P_parameter>
inline void BenchmarkExt<P_parameter>::start() inline void BenchmarkExt<P_parameter>::start()
{ {
BZPRECONDITION(state_ == benchmarkingImplementation); BZPRECONDITION(state_ == benchmarkingImplementation);
BZPRECONDITION(parameterNumber_ < numParameters_); BZPRECONDITION(parameterNumber_ < numParameters_);
state_ = running; state_ = running;
timer_.start(); timer_.start();
} }
template<class P_parameter> template<typename P_parameter>
inline void BenchmarkExt<P_parameter>::stop() inline void BenchmarkExt<P_parameter>::stop()
{ {
timer_.stop(); timer_.stop();
BZPRECONDITION(state_ == running); BZPRECONDITION(state_ == running);
state_ = benchmarkingImplementation; state_ = benchmarkingImplementation;
times_(implementationNumber_, parameterNumber_) = timer_.elapsedSeconds (); times_(implementationNumber_, parameterNumber_) = timer_.elapsedSeconds ();
++parameterNumber_; ++parameterNumber_;
} }
template<class P_parameter> template<typename P_parameter>
inline void BenchmarkExt<P_parameter>::startOverhead() inline void BenchmarkExt<P_parameter>::startOverhead()
{ {
BZPRECONDITION(state_ == benchmarkingImplementation); BZPRECONDITION(state_ == benchmarkingImplementation);
BZPRECONDITION(parameterNumber_ > 0); BZPRECONDITION(parameterNumber_ > 0);
BZPRECONDITION(parameterNumber_ <= numParameters_); BZPRECONDITION(parameterNumber_ <= numParameters_);
state_ = runningOverhead; state_ = runningOverhead;
overheadTimer_.start(); overheadTimer_.start();
} }
template<class P_parameter> template<typename P_parameter>
inline void BenchmarkExt<P_parameter>::stopOverhead() inline void BenchmarkExt<P_parameter>::stopOverhead()
{ {
BZPRECONDITION(state_ == runningOverhead); BZPRECONDITION(state_ == runningOverhead);
overheadTimer_.stop(); overheadTimer_.stop();
times_(implementationNumber_, parameterNumber_-1) -= times_(implementationNumber_, parameterNumber_-1) -=
overheadTimer_.elapsedSeconds(); overheadTimer_.elapsedSeconds();
state_ = benchmarkingImplementation; state_ = benchmarkingImplementation;
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::endImplementation() void BenchmarkExt<P_parameter>::endImplementation()
{ {
BZPRECONDITION(state_ == benchmarkingImplementation); BZPRECONDITION(state_ == benchmarkingImplementation);
BZPRECONDITION(parameterNumber_ == numParameters_); BZPRECONDITION(parameterNumber_ == numParameters_);
++implementationNumber_; ++implementationNumber_;
state_ = benchmarking; state_ = benchmarking;
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::endBenchmarking() void BenchmarkExt<P_parameter>::endBenchmarking()
{ {
BZPRECONDITION(state_ == benchmarking); BZPRECONDITION(state_ == benchmarking);
BZPRECONDITION(implementationNumber_ == numImplementations_); BZPRECONDITION(implementationNumber_ == numImplementations_);
state_ = done; state_ = done;
} }
template<class P_parameter> template<typename P_parameter>
double BenchmarkExt<P_parameter>::getMflops(unsigned implementation, double BenchmarkExt<P_parameter>::getMflops(unsigned implementation,
unsigned parameterNum) const unsigned parameterNum) const
{ {
BZPRECONDITION(state_ == done); BZPRECONDITION(state_ == done);
BZPRECONDITION(implementation < numImplementations_); BZPRECONDITION(implementation < numImplementations_);
BZPRECONDITION(parameterNum < numParameters_); BZPRECONDITION(parameterNum < numParameters_);
return iterations_(parameterNum) * flopsPerIteration_(parameterNum) return iterations_(parameterNum) * flopsPerIteration_(parameterNum)
/ times_(implementation, parameterNum) / 1.0e+6; / times_(implementation, parameterNum) / 1.0e+6;
} }
template<class P_parameter> template<typename P_parameter>
void BenchmarkExt<P_parameter>::saveMatlabGraph(const char* filename) const void BenchmarkExt<P_parameter>::saveMatlabGraph(const char* filename, const
char* graphType) const
{ {
BZPRECONDITION(state_ == done); BZPRECONDITION(state_ == done);
ofstream ofs(filename); ofstream ofs(filename);
assert(ofs.good()); assert(ofs.good());
ofs << "% This matlab file generated automatically by class Benchmark" ofs << "% This matlab file generated automatically by class Benchmark"
<< endl << "% of the Blitz++ class library." << endl << endl; << endl << "% of the Blitz++ class library." << endl << endl;
ofs.setf(ios::scientific); ofs.setf(ios::scientific);
// This will be a lot simpler once Matlab-style output formatting // This will be a lot simpler once Matlab-style output formatting
// of vectors & matrices is finished. // of vectors & matrices is finished.
// ofs << "parm = " << parameters_ << ";" << endl << endl; // ofs << "parm = " << parameters_ << ";" << endl << endl;
ofs << "parm = [ "; ofs << "parm = [ ";
int i; unsigned i;
for (i=0; i < numParameters_; ++i) for (i=0; i < numParameters_; ++i)
ofs << setprecision(12) << double(parameters_[i]) << " "; ofs << setprecision(12) << double(parameters_[i]) << " ";
ofs << "]; " << endl << endl; ofs << "]; " << endl << endl;
ofs << "Mf = [ "; ofs << "Mf = [ ";
for (i=0; i < numParameters_; ++i) for (i=0; i < numParameters_; ++i)
{ {
for (unsigned j=0; j < numImplementations_; ++j) for (unsigned j=0; j < numImplementations_; ++j)
{ {
ofs << setprecision(12) << getMflops(j,i) << " "; ofs << setprecision(12) << getMflops(j,i) << " ";
} }
if (i != numParameters_ - 1) if (i != numParameters_ - 1)
ofs << ";" << endl; ofs << ";" << endl;
} }
ofs << "] ;" << endl << endl; ofs << "] ;" << endl << endl;
ofs << "semilogx(parm,Mf), title('" << description_ << "'), " << endl ofs << graphType << "(parm,Mf), title('" << description_ << "'), " << e ndl
<< " xlabel('" << parameterDescription_ << "'), " << " xlabel('" << parameterDescription_ << "'), "
<< "ylabel('" << rateDescription_ << "')" << endl << "ylabel('" << rateDescription_ << "')" << endl
<< "legend("; << "legend(";
for (unsigned j=0; j < numImplementations_; ++j) for (unsigned j=0; j < numImplementations_; ++j)
{ {
ofs << "'" << implementationDescriptions_(j) << "'"; ofs << "'" << implementationDescriptions_(j) << "'";
if (j != numImplementations_ - 1) if (j != numImplementations_ - 1)
ofs << ", "; ofs << ", ";
} }
 End of changes. 29 change blocks. 
48 lines changed or deleted 28 lines changed or added


 benchext.h   benchext.h 
skipping to change at line 23 skipping to change at line 23
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Id: benchext.h,v 1.3 2001/01/25 00:25:54 tveldhui Exp $
*
* $Log: benchext.h,v $
* Revision 1.3 2001/01/25 00:25:54 tveldhui
* Ensured that source files have cvs logs.
*
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_BENCHEXT_H #ifndef BZ_BENCHEXT_H
#define BZ_BENCHEXT_H #define BZ_BENCHEXT_H
#ifndef BZ_MATRIX_H #ifndef BZ_MATRIX_H
#include <blitz/matrix.h> #include <blitz/matrix.h>
#endif #endif
#ifndef BZ_TIMER_H #ifndef BZ_TIMER_H
#include <blitz/timer.h> #include <blitz/timer.h>
skipping to change at line 67 skipping to change at line 48
// NEEDS_WORK: replace use of const char* with <string>, once standard // NEEDS_WORK: replace use of const char* with <string>, once standard
// library is widely supported. // library is widely supported.
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Declaration of class BenchmarkExt<T> // Declaration of class BenchmarkExt<T>
// The template parameter T is the parameter type which is varied in // The template parameter T is the parameter type which is varied in
// the benchmark. Typically T will be an unsigned, and will represent // the benchmark. Typically T will be an unsigned, and will represent
// the length of a vector, size of an array, etc. // the length of a vector, size of an array, etc.
template<class P_parameter = unsigned> template<typename P_parameter = unsigned>
class BenchmarkExt { class BenchmarkExt {
public: public:
typedef P_parameter T_parameter; typedef P_parameter T_parameter;
BenchmarkExt(const char* description, int numImplementations); BenchmarkExt(const char* description, int numImplementations);
~BenchmarkExt(); ~BenchmarkExt();
void setNumParameters(int numParameters); void setNumParameters(int numParameters);
void setParameterVector(Vector<T_parameter> parms); void setParameterVector(Vector<T_parameter> parms);
void setParameterDescription(const char* string); void setParameterDescription(const char* string);
void setIterations(Vector<long> iters); void setIterations(Vector<long> iters);
void setFlopsPerIteration(Vector<double> flopsPerIteration); void setFlopsPerIteration(Vector<double> flopsPerIteration);
void setRateDescription(const char* string); void setRateDescription(const char* string);
void beginBenchmarking(); void beginBenchmarking();
void beginImplementation(const char* description); void beginImplementation(const char* description);
_bz_bool doneImplementationBenchmark() const; bool doneImplementationBenchmark() const;
T_parameter getParameter() const; T_parameter getParameter() const;
long getIterations() const; long getIterations() const;
inline void start(); inline void start();
inline void stop(); inline void stop();
void startOverhead(); void startOverhead();
void stopOverhead(); void stopOverhead();
void endImplementation(); void endImplementation();
void endBenchmarking(); void endBenchmarking();
double getMflops(unsigned implementation, unsigned parameterNum) const; double getMflops(unsigned implementation, unsigned parameterNum) const;
void saveMatlabGraph(const char* filename) const; void saveMatlabGraph(const char* filename, const char* graphType="semil ogx") const;
protected: protected:
BenchmarkExt(const BenchmarkExt<P_parameter>&) { } BenchmarkExt(const BenchmarkExt<P_parameter>&) { }
void operator=(const BenchmarkExt<P_parameter>&) { } void operator=(const BenchmarkExt<P_parameter>&) { }
enum { initializing, benchmarking, benchmarkingImplementation, enum { initializing, benchmarking, benchmarkingImplementation,
running, runningOverhead, done } state_; running, runningOverhead, done } state_;
unsigned numImplementations_; unsigned numImplementations_;
unsigned implementationNumber_; unsigned implementationNumber_;
skipping to change at line 132 skipping to change at line 113
Vector<T_parameter> parameters_; Vector<T_parameter> parameters_;
Vector<long> iterations_; Vector<long> iterations_;
Vector<double> flopsPerIteration_; Vector<double> flopsPerIteration_;
Timer timer_; Timer timer_;
Timer overheadTimer_; Timer overheadTimer_;
const char* parameterDescription_; const char* parameterDescription_;
const char* rateDescription_; const char* rateDescription_;
int numParameters_; unsigned numParameters_;
int parameterNumber_; unsigned parameterNumber_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#include <blitz/benchext.cc> #include <blitz/benchext.cc>
#endif // BZ_BENCHEXT_H #endif // BZ_BENCHEXT_H
 End of changes. 5 change blocks. 
26 lines changed or deleted 7 lines changed or added


 blitz.h   blitz.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/blitz.h Includes all the important header files * blitz/blitz.h Includes all the important header files
* *
* $Id: blitz.h,v 1.9 2002/07/19 20:40:32 jcumming Exp $ * $Id: blitz.h,v 1.14 2005/05/18 23:35:55 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: blitz.h,v $
* Revision 1.9 2002/07/19 20:40:32 jcumming
* Put ending semicolon into definition of BZ_MUTEX_* macros so that you
* don't need to add a semicolon after invoking the macro.
*
* Revision 1.8 2001/02/15 13:13:30 tveldhui
* Fixed problem with BZ_THREADSAFE macros
*
* Revision 1.7 2001/02/11 22:03:44 tveldhui
* Fixed minor typo in blitz.h
*
* Revision 1.6 2001/02/04 22:36:41 tveldhui
* Oops, was including <pthread.h> inside the blitz namespace.
*
* Revision 1.5 2001/02/04 16:32:28 tveldhui
* Made memory block reference counting (optionally) threadsafe when
* BZ_THREADSAFE is defined. Currently uses pthread mutex.
* When compiling with gcc -pthread, _REENTRANT automatically causes
* BZ_THREADSAFE to be enabled.
*
* Revision 1.4 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.3 2001/01/24 22:51:50 tveldhui
* Reorganized #include orders to avoid including the huge Vector e.t.
* implementation when using Array.
*
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.7 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.6 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.5 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.4 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.3 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
* Revision 1.2 1996/11/11 17:29:13 tveldhui
* Periodic RCS update
*
* Revision 1.1 1996/04/14 21:13:00 todd
* Initial revision
*
*/
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#define BZ_BLITZ_H #define BZ_BLITZ_H
/* /*
* These symbols allow use of the IEEE and System V math libraries * These symbols allow use of the IEEE and System V math libraries
* (libm.a and libmsaa.a) on some platforms. * (libm.a and libmsaa.a) on some platforms.
*/ */
#ifdef BZ_ENABLE_XOPEN_SOURCE #ifdef BZ_ENABLE_XOPEN_SOURCE
skipping to change at line 118 skipping to change at line 64
#ifdef BZ_HAVE_STD #ifdef BZ_HAVE_STD
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#else #else
#include <iostream.h> #include <iostream.h>
#include <iomanip.h> #include <iomanip.h>
#endif #endif
#ifdef BZ_MATH_FN_IN_NAMESPACE_STD #ifdef BZ_MATH_FN_IN_NAMESPACE_STD
#include <cmath> #include <cmath>
#else
#include <math.h>
#endif #endif
#include <math.h>
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
#include <complex> #include <complex>
#endif #endif
#define BZ_THROW // Needed in <blitz/numinquire.h> #define BZ_THROW // Needed in <blitz/numinquire.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
#ifdef BZ_HAVE_STD #ifdef BZ_HAVE_STD
BZ_USING_NAMESPACE(std) BZ_USING_NAMESPACE(std)
skipping to change at line 166 skipping to change at line 112
* Which mutex implementation should be used for synchronizing * Which mutex implementation should be used for synchronizing
* reference counts. Currently only one option -- pthreads. * reference counts. Currently only one option -- pthreads.
*/ */
#ifdef BZ_THREADSAFE #ifdef BZ_THREADSAFE
#define BZ_THREADSAFE_USE_PTHREADS #define BZ_THREADSAFE_USE_PTHREADS
#endif #endif
#ifdef BZ_THREADSAFE_USE_PTHREADS #ifdef BZ_THREADSAFE_USE_PTHREADS
#include <pthread.h> #include <pthread.h>
#define BZ_MUTEX_DECLARE(name) pthread_mutex_t name; #define BZ_MUTEX_DECLARE(name) mutable pthread_mutex_t name;
#define BZ_MUTEX_INIT(name) pthread_mutex_init(&name,NULL); #define BZ_MUTEX_INIT(name) pthread_mutex_init(&name,NULL);
#define BZ_MUTEX_LOCK(name) pthread_mutex_lock(&name); #define BZ_MUTEX_LOCK(name) pthread_mutex_lock(&name);
#define BZ_MUTEX_UNLOCK(name) pthread_mutex_unlock(&name); #define BZ_MUTEX_UNLOCK(name) pthread_mutex_unlock(&name);
#define BZ_MUTEX_DESTROY(name) pthread_mutex_destroy(&name); #define BZ_MUTEX_DESTROY(name) pthread_mutex_destroy(&name);
#else #else
#define BZ_MUTEX_DECLARE(name) #define BZ_MUTEX_DECLARE(name)
#define BZ_MUTEX_INIT(name) #define BZ_MUTEX_INIT(name)
#define BZ_MUTEX_LOCK(name) #define BZ_MUTEX_LOCK(name)
#define BZ_MUTEX_UNLOCK(name) #define BZ_MUTEX_UNLOCK(name)
#define BZ_MUTEX_DESTROY(name) #define BZ_MUTEX_DESTROY(name)
 End of changes. 6 change blocks. 
61 lines changed or deleted 7 lines changed or added


 bops.cc   bops.cc 
/************************************************************************** * /************************************************************************** *
* blitz/arraybops.cc Array expression templates (2 operands) * blitz/../array/bops.cc Array expression templates (2 operands)
* *
* $Id: bops.cc,v 1.1.1.1 2000/06/19 12:26:14 tveldhui Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * This program is distributed in the hope that it will be useful,
* All rights reserved. Please see <blitz/blitz.h> for terms and * but WITHOUT ANY WARRANTY; without even the implied warranty of
* conditions of use. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-suggest@cybervision.com
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@cybervision.com
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://seurat.uwaterloo.ca/blitz/
* *
************************************************************************** * ************************************************************************** *
* $Log: bops.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:14 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
* *
*/ */
// Generated source file. Do not edit. // Generated source file. Do not edit.
// genarrbops.cpp Aug 7 1997 15:04:14 // genarrbops.cpp Dec 30 2003 16:48:46
#ifndef BZ_ARRAYBOPS_CC #ifndef BZ_ARRAYBOPS_CC
#define BZ_ARRAYBOPS_CC #define BZ_ARRAYBOPS_CC
#ifndef BZ_ARRAYEXPR_H #ifndef BZ_ARRAYEXPR_H
#error <blitz/arraybops.cc> must be included after <blitz/arrayexpr.h> #error <blitz/array/bops.cc> must be included after <blitz/arrayexpr.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/************************************************************************** ** /************************************************************************** **
* Addition Operators * Addition Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> + Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> + Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<T_numtype1, T_numtype2 > > > Add<T_numtype1, T_numtype2 > > >
operator+(const Array<T_numtype1, N_rank1>& d1, operator+(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<T_numtype1, T_numtype2> > Add<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> + _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> + _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<T_numtype1, _bz_typename P_expr2::T_numtype > > > Add<T_numtype1, typename P_expr2::T_numtype > > >
operator+(const Array<T_numtype1, N_rank1>& d1, operator+(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<T_numtype1, _bz_typename P_expr2::T_numtype> > Add<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> + IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> + IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<T_numtype1, int > > > Add<T_numtype1, int > > >
operator+(const Array<T_numtype1, N_rank1>& d1, operator+(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<T_numtype1, int> > Add<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> + int // Array<T_numtype1, N_rank1> + int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Add<T_numtype1, int > > > Add<T_numtype1, int > > >
operator+(const Array<T_numtype1, N_rank1>& d1, operator+(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Add<T_numtype1, int> > Add<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// Array<T_numtype1, N_rank1> + float // Array<T_numtype1, N_rank1> + float
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Add<T_numtype1, float > > > Add<T_numtype1, float > > >
operator+(const Array<T_numtype1, N_rank1>& d1, operator+(const Array<T_numtype1, N_rank1>& d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Add<T_numtype1, float> > Add<T_numtype1, float> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// Array<T_numtype1, N_rank1> + double // Array<T_numtype1, N_rank1> + double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Add<T_numtype1, double > > > Add<T_numtype1, double > > >
operator+(const Array<T_numtype1, N_rank1>& d1, operator+(const Array<T_numtype1, N_rank1>& d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Add<T_numtype1, double> > Add<T_numtype1, double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// Array<T_numtype1, N_rank1> + long double // Array<T_numtype1, N_rank1> + long double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Add<T_numtype1, long double > > > Add<T_numtype1, long double > > >
operator+(const Array<T_numtype1, N_rank1>& d1, operator+(const Array<T_numtype1, N_rank1>& d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Add<T_numtype1, long double> > Add<T_numtype1, long double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Array<T_numtype1, N_rank1> + complex<T2> // Array<T_numtype1, N_rank1> + complex<T2>
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Add<T_numtype1, complex<T2> > > > Add<T_numtype1, complex<T2> > > >
operator+(const Array<T_numtype1, N_rank1>& d1, operator+(const Array<T_numtype1, N_rank1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Add<T_numtype1, complex<T2> > > Add<T_numtype1, complex<T2> > >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> + Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> + Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<_bz_typename P_expr1::T_numtype, T_numtype2 > > > Add<typename P_expr1::T_numtype, T_numtype2 > > >
operator+(_bz_ArrayExpr<P_expr1> d1, operator+(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<_bz_typename P_expr1::T_numtype, T_numtype2> > Add<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> + _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> + _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numtype > > > Add<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator+(_bz_ArrayExpr<P_expr1> d1, operator+(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numtype> > Add<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> + IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> + IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<_bz_typename P_expr1::T_numtype, int > > > Add<typename P_expr1::T_numtype, int > > >
operator+(_bz_ArrayExpr<P_expr1> d1, operator+(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<_bz_typename P_expr1::T_numtype, int> > Add<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> + int // _bz_ArrayExpr<P_expr1> + int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Add<_bz_typename P_expr1::T_numtype, int > > > Add<typename P_expr1::T_numtype, int > > >
operator+(_bz_ArrayExpr<P_expr1> d1, operator+(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Add<_bz_typename P_expr1::T_numtype, int> > Add<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> + float // _bz_ArrayExpr<P_expr1> + float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Add<_bz_typename P_expr1::T_numtype, float > > > Add<typename P_expr1::T_numtype, float > > >
operator+(_bz_ArrayExpr<P_expr1> d1, operator+(_bz_ArrayExpr<P_expr1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Add<_bz_typename P_expr1::T_numtype, float> > Add<typename P_expr1::T_numtype, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// _bz_ArrayExpr<P_expr1> + double // _bz_ArrayExpr<P_expr1> + double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Add<_bz_typename P_expr1::T_numtype, double > > > Add<typename P_expr1::T_numtype, double > > >
operator+(_bz_ArrayExpr<P_expr1> d1, operator+(_bz_ArrayExpr<P_expr1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Add<_bz_typename P_expr1::T_numtype, double> > Add<typename P_expr1::T_numtype, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// _bz_ArrayExpr<P_expr1> + long double // _bz_ArrayExpr<P_expr1> + long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Add<_bz_typename P_expr1::T_numtype, long double > > > Add<typename P_expr1::T_numtype, long double > > >
operator+(_bz_ArrayExpr<P_expr1> d1, operator+(_bz_ArrayExpr<P_expr1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Add<_bz_typename P_expr1::T_numtype, long double> > Add<typename P_expr1::T_numtype, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> + complex<T2> // _bz_ArrayExpr<P_expr1> + complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Add<_bz_typename P_expr1::T_numtype, complex<T2> > > > Add<typename P_expr1::T_numtype, complex<T2> > > >
operator+(_bz_ArrayExpr<P_expr1> d1, operator+(_bz_ArrayExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Add<_bz_typename P_expr1::T_numtype, complex<T2> > > Add<typename P_expr1::T_numtype, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> + Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> + Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<int, T_numtype2 > > > Add<int, T_numtype2 > > >
operator+(IndexPlaceholder<N_index1> d1, operator+(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<int, T_numtype2> > Add<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> + _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> + _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<int, _bz_typename P_expr2::T_numtype > > > Add<int, typename P_expr2::T_numtype > > >
operator+(IndexPlaceholder<N_index1> d1, operator+(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<int, _bz_typename P_expr2::T_numtype> > Add<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> + IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> + IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<int, int > > > Add<int, int > > >
operator+(IndexPlaceholder<N_index1> d1, operator+(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<int, int> > Add<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> + int // IndexPlaceholder<N_index1> + int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Add<int, int > > > Add<int, int > > >
operator+(IndexPlaceholder<N_index1> d1, operator+(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Add<int, int> > Add<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> + float // IndexPlaceholder<N_index1> + float
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Add<int, float > > > Add<int, float > > >
operator+(IndexPlaceholder<N_index1> d1, operator+(IndexPlaceholder<N_index1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Add<int, float> > Add<int, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// IndexPlaceholder<N_index1> + double // IndexPlaceholder<N_index1> + double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Add<int, double > > > Add<int, double > > >
operator+(IndexPlaceholder<N_index1> d1, operator+(IndexPlaceholder<N_index1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Add<int, double> > Add<int, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// IndexPlaceholder<N_index1> + long double // IndexPlaceholder<N_index1> + long double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Add<int, long double > > > Add<int, long double > > >
operator+(IndexPlaceholder<N_index1> d1, operator+(IndexPlaceholder<N_index1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Add<int, long double> > Add<int, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> + complex<T2> // IndexPlaceholder<N_index1> + complex<T2>
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Add<int, complex<T2> > > > Add<int, complex<T2> > > >
operator+(IndexPlaceholder<N_index1> d1, operator+(IndexPlaceholder<N_index1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Add<int, complex<T2> > > Add<int, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int + Array<T_numtype2, N_rank2> // int + Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<int, T_numtype2 > > > Add<int, T_numtype2 > > >
operator+(int d1, operator+(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<int, T_numtype2> > Add<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int + _bz_ArrayExpr<P_expr2> // int + _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<int, _bz_typename P_expr2::T_numtype > > > Add<int, typename P_expr2::T_numtype > > >
operator+(int d1, operator+(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<int, _bz_typename P_expr2::T_numtype> > Add<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int + IndexPlaceholder<N_index2> // int + IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<int, int > > > Add<int, int > > >
operator+(int d1, operator+(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<int, int> > Add<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// float + Array<T_numtype2, N_rank2> // float + Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<float, T_numtype2 > > > Add<float, T_numtype2 > > >
operator+(float d1, operator+(float d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<float, T_numtype2> > Add<float, T_numtype2> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2.begin()); d2.begin());
} }
// float + _bz_ArrayExpr<P_expr2> // float + _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<float, _bz_typename P_expr2::T_numtype > > > Add<float, typename P_expr2::T_numtype > > >
operator+(float d1, operator+(float d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<float, _bz_typename P_expr2::T_numtype> > Add<float, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// float + IndexPlaceholder<N_index2> // float + IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<float, int > > > Add<float, int > > >
operator+(float d1, operator+(float d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<float, int> > Add<float, int> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// double + Array<T_numtype2, N_rank2> // double + Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<double, T_numtype2 > > > Add<double, T_numtype2 > > >
operator+(double d1, operator+(double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<double, T_numtype2> > Add<double, T_numtype2> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2.begin()); d2.begin());
} }
// double + _bz_ArrayExpr<P_expr2> // double + _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<double, _bz_typename P_expr2::T_numtype > > > Add<double, typename P_expr2::T_numtype > > >
operator+(double d1, operator+(double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<double, _bz_typename P_expr2::T_numtype> > Add<double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// double + IndexPlaceholder<N_index2> // double + IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<double, int > > > Add<double, int > > >
operator+(double d1, operator+(double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<double, int> > Add<double, int> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// long double + Array<T_numtype2, N_rank2> // long double + Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<long double, T_numtype2 > > > Add<long double, T_numtype2 > > >
operator+(long double d1, operator+(long double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<long double, T_numtype2> > Add<long double, T_numtype2> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2.begin()); d2.begin());
} }
// long double + _bz_ArrayExpr<P_expr2> // long double + _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<long double, _bz_typename P_expr2::T_numtype > > > Add<long double, typename P_expr2::T_numtype > > >
operator+(long double d1, operator+(long double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<long double, _bz_typename P_expr2::T_numtype> > Add<long double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
// long double + IndexPlaceholder<N_index2> // long double + IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<long double, int > > > Add<long double, int > > >
operator+(long double d1, operator+(long double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<long double, int> > Add<long double, int> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> + Array<T_numtype2, N_rank2> // complex<T1> + Array<T_numtype2, N_rank2>
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<complex<T1> , T_numtype2 > > > Add<complex<T1> , T_numtype2 > > >
operator+(complex<T1> d1, operator+(complex<T1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Add<complex<T1> , T_numtype2> > Add<complex<T1> , T_numtype2> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2.begin()); d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> + _bz_ArrayExpr<P_expr2> // complex<T1> + _bz_ArrayExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<complex<T1> , _bz_typename P_expr2::T_numtype > > > Add<complex<T1> , typename P_expr2::T_numtype > > >
operator+(complex<T1> d1, operator+(complex<T1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Add<complex<T1> , _bz_typename P_expr2::T_numtype> > Add<complex<T1> , typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> + IndexPlaceholder<N_index2> // complex<T1> + IndexPlaceholder<N_index2>
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<complex<T1> , int > > > Add<complex<T1> , int > > >
operator+(complex<T1> d1, operator+(complex<T1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Add<complex<T1> , int> > Add<complex<T1> , int> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Subtraction Operators * Subtraction Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> - Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> - Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<T_numtype1, T_numtype2 > > > Subtract<T_numtype1, T_numtype2 > > >
operator-(const Array<T_numtype1, N_rank1>& d1, operator-(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<T_numtype1, T_numtype2> > Subtract<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> - _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> - _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<T_numtype1, _bz_typename P_expr2::T_numtype > > > Subtract<T_numtype1, typename P_expr2::T_numtype > > >
operator-(const Array<T_numtype1, N_rank1>& d1, operator-(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<T_numtype1, _bz_typename P_expr2::T_numtype> > Subtract<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> - IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> - IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<T_numtype1, int > > > Subtract<T_numtype1, int > > >
operator-(const Array<T_numtype1, N_rank1>& d1, operator-(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<T_numtype1, int> > Subtract<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> - int // Array<T_numtype1, N_rank1> - int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Subtract<T_numtype1, int > > > Subtract<T_numtype1, int > > >
operator-(const Array<T_numtype1, N_rank1>& d1, operator-(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Subtract<T_numtype1, int> > Subtract<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// Array<T_numtype1, N_rank1> - float // Array<T_numtype1, N_rank1> - float
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Subtract<T_numtype1, float > > > Subtract<T_numtype1, float > > >
operator-(const Array<T_numtype1, N_rank1>& d1, operator-(const Array<T_numtype1, N_rank1>& d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Subtract<T_numtype1, float> > Subtract<T_numtype1, float> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// Array<T_numtype1, N_rank1> - double // Array<T_numtype1, N_rank1> - double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Subtract<T_numtype1, double > > > Subtract<T_numtype1, double > > >
operator-(const Array<T_numtype1, N_rank1>& d1, operator-(const Array<T_numtype1, N_rank1>& d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Subtract<T_numtype1, double> > Subtract<T_numtype1, double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// Array<T_numtype1, N_rank1> - long double // Array<T_numtype1, N_rank1> - long double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Subtract<T_numtype1, long double > > > Subtract<T_numtype1, long double > > >
operator-(const Array<T_numtype1, N_rank1>& d1, operator-(const Array<T_numtype1, N_rank1>& d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Subtract<T_numtype1, long double> > Subtract<T_numtype1, long double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Array<T_numtype1, N_rank1> - complex<T2> // Array<T_numtype1, N_rank1> - complex<T2>
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Subtract<T_numtype1, complex<T2> > > > Subtract<T_numtype1, complex<T2> > > >
operator-(const Array<T_numtype1, N_rank1>& d1, operator-(const Array<T_numtype1, N_rank1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Subtract<T_numtype1, complex<T2> > > Subtract<T_numtype1, complex<T2> > >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> - Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> - Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<_bz_typename P_expr1::T_numtype, T_numtype2 > > > Subtract<typename P_expr1::T_numtype, T_numtype2 > > >
operator-(_bz_ArrayExpr<P_expr1> d1, operator-(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<_bz_typename P_expr1::T_numtype, T_numtype2> > Subtract<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> - _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> - _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_num type > > > Subtract<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator-(_bz_ArrayExpr<P_expr1> d1, operator-(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_num type> > Subtract<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> - IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> - IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<_bz_typename P_expr1::T_numtype, int > > > Subtract<typename P_expr1::T_numtype, int > > >
operator-(_bz_ArrayExpr<P_expr1> d1, operator-(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<_bz_typename P_expr1::T_numtype, int> > Subtract<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> - int // _bz_ArrayExpr<P_expr1> - int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Subtract<_bz_typename P_expr1::T_numtype, int > > > Subtract<typename P_expr1::T_numtype, int > > >
operator-(_bz_ArrayExpr<P_expr1> d1, operator-(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Subtract<_bz_typename P_expr1::T_numtype, int> > Subtract<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> - float // _bz_ArrayExpr<P_expr1> - float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Subtract<_bz_typename P_expr1::T_numtype, float > > > Subtract<typename P_expr1::T_numtype, float > > >
operator-(_bz_ArrayExpr<P_expr1> d1, operator-(_bz_ArrayExpr<P_expr1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Subtract<_bz_typename P_expr1::T_numtype, float> > Subtract<typename P_expr1::T_numtype, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// _bz_ArrayExpr<P_expr1> - double // _bz_ArrayExpr<P_expr1> - double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Subtract<_bz_typename P_expr1::T_numtype, double > > > Subtract<typename P_expr1::T_numtype, double > > >
operator-(_bz_ArrayExpr<P_expr1> d1, operator-(_bz_ArrayExpr<P_expr1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Subtract<_bz_typename P_expr1::T_numtype, double> > Subtract<typename P_expr1::T_numtype, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// _bz_ArrayExpr<P_expr1> - long double // _bz_ArrayExpr<P_expr1> - long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Subtract<_bz_typename P_expr1::T_numtype, long double > > > Subtract<typename P_expr1::T_numtype, long double > > >
operator-(_bz_ArrayExpr<P_expr1> d1, operator-(_bz_ArrayExpr<P_expr1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Subtract<_bz_typename P_expr1::T_numtype, long double> > Subtract<typename P_expr1::T_numtype, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> - complex<T2> // _bz_ArrayExpr<P_expr1> - complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Subtract<_bz_typename P_expr1::T_numtype, complex<T2> > > > Subtract<typename P_expr1::T_numtype, complex<T2> > > >
operator-(_bz_ArrayExpr<P_expr1> d1, operator-(_bz_ArrayExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Subtract<_bz_typename P_expr1::T_numtype, complex<T2> > > Subtract<typename P_expr1::T_numtype, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> - Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> - Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<int, T_numtype2 > > > Subtract<int, T_numtype2 > > >
operator-(IndexPlaceholder<N_index1> d1, operator-(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<int, T_numtype2> > Subtract<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> - _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> - _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<int, _bz_typename P_expr2::T_numtype > > > Subtract<int, typename P_expr2::T_numtype > > >
operator-(IndexPlaceholder<N_index1> d1, operator-(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<int, _bz_typename P_expr2::T_numtype> > Subtract<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> - IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> - IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<int, int > > > Subtract<int, int > > >
operator-(IndexPlaceholder<N_index1> d1, operator-(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<int, int> > Subtract<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> - int // IndexPlaceholder<N_index1> - int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Subtract<int, int > > > Subtract<int, int > > >
operator-(IndexPlaceholder<N_index1> d1, operator-(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Subtract<int, int> > Subtract<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> - float // IndexPlaceholder<N_index1> - float
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Subtract<int, float > > > Subtract<int, float > > >
operator-(IndexPlaceholder<N_index1> d1, operator-(IndexPlaceholder<N_index1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Subtract<int, float> > Subtract<int, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// IndexPlaceholder<N_index1> - double // IndexPlaceholder<N_index1> - double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Subtract<int, double > > > Subtract<int, double > > >
operator-(IndexPlaceholder<N_index1> d1, operator-(IndexPlaceholder<N_index1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Subtract<int, double> > Subtract<int, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// IndexPlaceholder<N_index1> - long double // IndexPlaceholder<N_index1> - long double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Subtract<int, long double > > > Subtract<int, long double > > >
operator-(IndexPlaceholder<N_index1> d1, operator-(IndexPlaceholder<N_index1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Subtract<int, long double> > Subtract<int, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> - complex<T2> // IndexPlaceholder<N_index1> - complex<T2>
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Subtract<int, complex<T2> > > > Subtract<int, complex<T2> > > >
operator-(IndexPlaceholder<N_index1> d1, operator-(IndexPlaceholder<N_index1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Subtract<int, complex<T2> > > Subtract<int, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int - Array<T_numtype2, N_rank2> // int - Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<int, T_numtype2 > > > Subtract<int, T_numtype2 > > >
operator-(int d1, operator-(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<int, T_numtype2> > Subtract<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int - _bz_ArrayExpr<P_expr2> // int - _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<int, _bz_typename P_expr2::T_numtype > > > Subtract<int, typename P_expr2::T_numtype > > >
operator-(int d1, operator-(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<int, _bz_typename P_expr2::T_numtype> > Subtract<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int - IndexPlaceholder<N_index2> // int - IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<int, int > > > Subtract<int, int > > >
operator-(int d1, operator-(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<int, int> > Subtract<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// float - Array<T_numtype2, N_rank2> // float - Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<float, T_numtype2 > > > Subtract<float, T_numtype2 > > >
operator-(float d1, operator-(float d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<float, T_numtype2> > Subtract<float, T_numtype2> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2.begin()); d2.begin());
} }
// float - _bz_ArrayExpr<P_expr2> // float - _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<float, _bz_typename P_expr2::T_numtype > > > Subtract<float, typename P_expr2::T_numtype > > >
operator-(float d1, operator-(float d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<float, _bz_typename P_expr2::T_numtype> > Subtract<float, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// float - IndexPlaceholder<N_index2> // float - IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<float, int > > > Subtract<float, int > > >
operator-(float d1, operator-(float d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<float, int> > Subtract<float, int> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// double - Array<T_numtype2, N_rank2> // double - Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<double, T_numtype2 > > > Subtract<double, T_numtype2 > > >
operator-(double d1, operator-(double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<double, T_numtype2> > Subtract<double, T_numtype2> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2.begin()); d2.begin());
} }
// double - _bz_ArrayExpr<P_expr2> // double - _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<double, _bz_typename P_expr2::T_numtype > > > Subtract<double, typename P_expr2::T_numtype > > >
operator-(double d1, operator-(double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<double, _bz_typename P_expr2::T_numtype> > Subtract<double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// double - IndexPlaceholder<N_index2> // double - IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<double, int > > > Subtract<double, int > > >
operator-(double d1, operator-(double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<double, int> > Subtract<double, int> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// long double - Array<T_numtype2, N_rank2> // long double - Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<long double, T_numtype2 > > > Subtract<long double, T_numtype2 > > >
operator-(long double d1, operator-(long double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<long double, T_numtype2> > Subtract<long double, T_numtype2> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2.begin()); d2.begin());
} }
// long double - _bz_ArrayExpr<P_expr2> // long double - _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<long double, _bz_typename P_expr2::T_numtype > > > Subtract<long double, typename P_expr2::T_numtype > > >
operator-(long double d1, operator-(long double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<long double, _bz_typename P_expr2::T_numtype> > Subtract<long double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
// long double - IndexPlaceholder<N_index2> // long double - IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<long double, int > > > Subtract<long double, int > > >
operator-(long double d1, operator-(long double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<long double, int> > Subtract<long double, int> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> - Array<T_numtype2, N_rank2> // complex<T1> - Array<T_numtype2, N_rank2>
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<complex<T1> , T_numtype2 > > > Subtract<complex<T1> , T_numtype2 > > >
operator-(complex<T1> d1, operator-(complex<T1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Subtract<complex<T1> , T_numtype2> > Subtract<complex<T1> , T_numtype2> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2.begin()); d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> - _bz_ArrayExpr<P_expr2> // complex<T1> - _bz_ArrayExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<complex<T1> , _bz_typename P_expr2::T_numtype > > > Subtract<complex<T1> , typename P_expr2::T_numtype > > >
operator-(complex<T1> d1, operator-(complex<T1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Subtract<complex<T1> , _bz_typename P_expr2::T_numtype> > Subtract<complex<T1> , typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> - IndexPlaceholder<N_index2> // complex<T1> - IndexPlaceholder<N_index2>
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<complex<T1> , int > > > Subtract<complex<T1> , int > > >
operator-(complex<T1> d1, operator-(complex<T1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Subtract<complex<T1> , int> > Subtract<complex<T1> , int> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Multiplication Operators * Multiplication Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> * Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> * Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<T_numtype1, T_numtype2 > > > Multiply<T_numtype1, T_numtype2 > > >
operator*(const Array<T_numtype1, N_rank1>& d1, operator*(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<T_numtype1, T_numtype2> > Multiply<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> * _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> * _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<T_numtype1, _bz_typename P_expr2::T_numtype > > > Multiply<T_numtype1, typename P_expr2::T_numtype > > >
operator*(const Array<T_numtype1, N_rank1>& d1, operator*(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<T_numtype1, _bz_typename P_expr2::T_numtype> > Multiply<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> * IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> * IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<T_numtype1, int > > > Multiply<T_numtype1, int > > >
operator*(const Array<T_numtype1, N_rank1>& d1, operator*(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<T_numtype1, int> > Multiply<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> * int // Array<T_numtype1, N_rank1> * int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Multiply<T_numtype1, int > > > Multiply<T_numtype1, int > > >
operator*(const Array<T_numtype1, N_rank1>& d1, operator*(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Multiply<T_numtype1, int> > Multiply<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// Array<T_numtype1, N_rank1> * float // Array<T_numtype1, N_rank1> * float
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Multiply<T_numtype1, float > > > Multiply<T_numtype1, float > > >
operator*(const Array<T_numtype1, N_rank1>& d1, operator*(const Array<T_numtype1, N_rank1>& d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Multiply<T_numtype1, float> > Multiply<T_numtype1, float> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// Array<T_numtype1, N_rank1> * double // Array<T_numtype1, N_rank1> * double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Multiply<T_numtype1, double > > > Multiply<T_numtype1, double > > >
operator*(const Array<T_numtype1, N_rank1>& d1, operator*(const Array<T_numtype1, N_rank1>& d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Multiply<T_numtype1, double> > Multiply<T_numtype1, double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// Array<T_numtype1, N_rank1> * long double // Array<T_numtype1, N_rank1> * long double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Multiply<T_numtype1, long double > > > Multiply<T_numtype1, long double > > >
operator*(const Array<T_numtype1, N_rank1>& d1, operator*(const Array<T_numtype1, N_rank1>& d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Multiply<T_numtype1, long double> > Multiply<T_numtype1, long double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Array<T_numtype1, N_rank1> * complex<T2> // Array<T_numtype1, N_rank1> * complex<T2>
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Multiply<T_numtype1, complex<T2> > > > Multiply<T_numtype1, complex<T2> > > >
operator*(const Array<T_numtype1, N_rank1>& d1, operator*(const Array<T_numtype1, N_rank1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Multiply<T_numtype1, complex<T2> > > Multiply<T_numtype1, complex<T2> > >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> * Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> * Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<_bz_typename P_expr1::T_numtype, T_numtype2 > > > Multiply<typename P_expr1::T_numtype, T_numtype2 > > >
operator*(_bz_ArrayExpr<P_expr1> d1, operator*(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<_bz_typename P_expr1::T_numtype, T_numtype2> > Multiply<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> * _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> * _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_num type > > > Multiply<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator*(_bz_ArrayExpr<P_expr1> d1, operator*(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_num type> > Multiply<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> * IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> * IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<_bz_typename P_expr1::T_numtype, int > > > Multiply<typename P_expr1::T_numtype, int > > >
operator*(_bz_ArrayExpr<P_expr1> d1, operator*(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<_bz_typename P_expr1::T_numtype, int> > Multiply<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> * int // _bz_ArrayExpr<P_expr1> * int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Multiply<_bz_typename P_expr1::T_numtype, int > > > Multiply<typename P_expr1::T_numtype, int > > >
operator*(_bz_ArrayExpr<P_expr1> d1, operator*(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Multiply<_bz_typename P_expr1::T_numtype, int> > Multiply<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> * float // _bz_ArrayExpr<P_expr1> * float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Multiply<_bz_typename P_expr1::T_numtype, float > > > Multiply<typename P_expr1::T_numtype, float > > >
operator*(_bz_ArrayExpr<P_expr1> d1, operator*(_bz_ArrayExpr<P_expr1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Multiply<_bz_typename P_expr1::T_numtype, float> > Multiply<typename P_expr1::T_numtype, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// _bz_ArrayExpr<P_expr1> * double // _bz_ArrayExpr<P_expr1> * double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Multiply<_bz_typename P_expr1::T_numtype, double > > > Multiply<typename P_expr1::T_numtype, double > > >
operator*(_bz_ArrayExpr<P_expr1> d1, operator*(_bz_ArrayExpr<P_expr1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Multiply<_bz_typename P_expr1::T_numtype, double> > Multiply<typename P_expr1::T_numtype, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// _bz_ArrayExpr<P_expr1> * long double // _bz_ArrayExpr<P_expr1> * long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Multiply<_bz_typename P_expr1::T_numtype, long double > > > Multiply<typename P_expr1::T_numtype, long double > > >
operator*(_bz_ArrayExpr<P_expr1> d1, operator*(_bz_ArrayExpr<P_expr1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Multiply<_bz_typename P_expr1::T_numtype, long double> > Multiply<typename P_expr1::T_numtype, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> * complex<T2> // _bz_ArrayExpr<P_expr1> * complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Multiply<_bz_typename P_expr1::T_numtype, complex<T2> > > > Multiply<typename P_expr1::T_numtype, complex<T2> > > >
operator*(_bz_ArrayExpr<P_expr1> d1, operator*(_bz_ArrayExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Multiply<_bz_typename P_expr1::T_numtype, complex<T2> > > Multiply<typename P_expr1::T_numtype, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> * Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> * Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<int, T_numtype2 > > > Multiply<int, T_numtype2 > > >
operator*(IndexPlaceholder<N_index1> d1, operator*(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<int, T_numtype2> > Multiply<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> * _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> * _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<int, _bz_typename P_expr2::T_numtype > > > Multiply<int, typename P_expr2::T_numtype > > >
operator*(IndexPlaceholder<N_index1> d1, operator*(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<int, _bz_typename P_expr2::T_numtype> > Multiply<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> * IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> * IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<int, int > > > Multiply<int, int > > >
operator*(IndexPlaceholder<N_index1> d1, operator*(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<int, int> > Multiply<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> * int // IndexPlaceholder<N_index1> * int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Multiply<int, int > > > Multiply<int, int > > >
operator*(IndexPlaceholder<N_index1> d1, operator*(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Multiply<int, int> > Multiply<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> * float // IndexPlaceholder<N_index1> * float
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Multiply<int, float > > > Multiply<int, float > > >
operator*(IndexPlaceholder<N_index1> d1, operator*(IndexPlaceholder<N_index1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Multiply<int, float> > Multiply<int, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// IndexPlaceholder<N_index1> * double // IndexPlaceholder<N_index1> * double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Multiply<int, double > > > Multiply<int, double > > >
operator*(IndexPlaceholder<N_index1> d1, operator*(IndexPlaceholder<N_index1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Multiply<int, double> > Multiply<int, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// IndexPlaceholder<N_index1> * long double // IndexPlaceholder<N_index1> * long double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Multiply<int, long double > > > Multiply<int, long double > > >
operator*(IndexPlaceholder<N_index1> d1, operator*(IndexPlaceholder<N_index1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Multiply<int, long double> > Multiply<int, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> * complex<T2> // IndexPlaceholder<N_index1> * complex<T2>
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Multiply<int, complex<T2> > > > Multiply<int, complex<T2> > > >
operator*(IndexPlaceholder<N_index1> d1, operator*(IndexPlaceholder<N_index1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Multiply<int, complex<T2> > > Multiply<int, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int * Array<T_numtype2, N_rank2> // int * Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<int, T_numtype2 > > > Multiply<int, T_numtype2 > > >
operator*(int d1, operator*(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<int, T_numtype2> > Multiply<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int * _bz_ArrayExpr<P_expr2> // int * _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<int, _bz_typename P_expr2::T_numtype > > > Multiply<int, typename P_expr2::T_numtype > > >
operator*(int d1, operator*(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<int, _bz_typename P_expr2::T_numtype> > Multiply<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int * IndexPlaceholder<N_index2> // int * IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<int, int > > > Multiply<int, int > > >
operator*(int d1, operator*(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<int, int> > Multiply<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// float * Array<T_numtype2, N_rank2> // float * Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<float, T_numtype2 > > > Multiply<float, T_numtype2 > > >
operator*(float d1, operator*(float d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<float, T_numtype2> > Multiply<float, T_numtype2> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2.begin()); d2.begin());
} }
// float * _bz_ArrayExpr<P_expr2> // float * _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<float, _bz_typename P_expr2::T_numtype > > > Multiply<float, typename P_expr2::T_numtype > > >
operator*(float d1, operator*(float d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<float, _bz_typename P_expr2::T_numtype> > Multiply<float, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// float * IndexPlaceholder<N_index2> // float * IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<float, int > > > Multiply<float, int > > >
operator*(float d1, operator*(float d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<float, int> > Multiply<float, int> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// double * Array<T_numtype2, N_rank2> // double * Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<double, T_numtype2 > > > Multiply<double, T_numtype2 > > >
operator*(double d1, operator*(double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<double, T_numtype2> > Multiply<double, T_numtype2> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2.begin()); d2.begin());
} }
// double * _bz_ArrayExpr<P_expr2> // double * _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<double, _bz_typename P_expr2::T_numtype > > > Multiply<double, typename P_expr2::T_numtype > > >
operator*(double d1, operator*(double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<double, _bz_typename P_expr2::T_numtype> > Multiply<double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// double * IndexPlaceholder<N_index2> // double * IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<double, int > > > Multiply<double, int > > >
operator*(double d1, operator*(double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<double, int> > Multiply<double, int> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// long double * Array<T_numtype2, N_rank2> // long double * Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<long double, T_numtype2 > > > Multiply<long double, T_numtype2 > > >
operator*(long double d1, operator*(long double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<long double, T_numtype2> > Multiply<long double, T_numtype2> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2.begin()); d2.begin());
} }
// long double * _bz_ArrayExpr<P_expr2> // long double * _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<long double, _bz_typename P_expr2::T_numtype > > > Multiply<long double, typename P_expr2::T_numtype > > >
operator*(long double d1, operator*(long double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<long double, _bz_typename P_expr2::T_numtype> > Multiply<long double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
// long double * IndexPlaceholder<N_index2> // long double * IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<long double, int > > > Multiply<long double, int > > >
operator*(long double d1, operator*(long double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<long double, int> > Multiply<long double, int> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> * Array<T_numtype2, N_rank2> // complex<T1> * Array<T_numtype2, N_rank2>
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<complex<T1> , T_numtype2 > > > Multiply<complex<T1> , T_numtype2 > > >
operator*(complex<T1> d1, operator*(complex<T1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Multiply<complex<T1> , T_numtype2> > Multiply<complex<T1> , T_numtype2> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2.begin()); d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> * _bz_ArrayExpr<P_expr2> // complex<T1> * _bz_ArrayExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<complex<T1> , _bz_typename P_expr2::T_numtype > > > Multiply<complex<T1> , typename P_expr2::T_numtype > > >
operator*(complex<T1> d1, operator*(complex<T1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Multiply<complex<T1> , _bz_typename P_expr2::T_numtype> > Multiply<complex<T1> , typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> * IndexPlaceholder<N_index2> // complex<T1> * IndexPlaceholder<N_index2>
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<complex<T1> , int > > > Multiply<complex<T1> , int > > >
operator*(complex<T1> d1, operator*(complex<T1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Multiply<complex<T1> , int> > Multiply<complex<T1> , int> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Division Operators * Division Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> / Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> / Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<T_numtype1, T_numtype2 > > > Divide<T_numtype1, T_numtype2 > > >
operator/(const Array<T_numtype1, N_rank1>& d1, operator/(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<T_numtype1, T_numtype2> > Divide<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> / _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> / _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<T_numtype1, _bz_typename P_expr2::T_numtype > > > Divide<T_numtype1, typename P_expr2::T_numtype > > >
operator/(const Array<T_numtype1, N_rank1>& d1, operator/(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<T_numtype1, _bz_typename P_expr2::T_numtype> > Divide<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> / IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> / IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<T_numtype1, int > > > Divide<T_numtype1, int > > >
operator/(const Array<T_numtype1, N_rank1>& d1, operator/(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<T_numtype1, int> > Divide<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> / int // Array<T_numtype1, N_rank1> / int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Divide<T_numtype1, int > > > Divide<T_numtype1, int > > >
operator/(const Array<T_numtype1, N_rank1>& d1, operator/(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Divide<T_numtype1, int> > Divide<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// Array<T_numtype1, N_rank1> / float // Array<T_numtype1, N_rank1> / float
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Divide<T_numtype1, float > > > Divide<T_numtype1, float > > >
operator/(const Array<T_numtype1, N_rank1>& d1, operator/(const Array<T_numtype1, N_rank1>& d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Divide<T_numtype1, float> > Divide<T_numtype1, float> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// Array<T_numtype1, N_rank1> / double // Array<T_numtype1, N_rank1> / double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Divide<T_numtype1, double > > > Divide<T_numtype1, double > > >
operator/(const Array<T_numtype1, N_rank1>& d1, operator/(const Array<T_numtype1, N_rank1>& d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Divide<T_numtype1, double> > Divide<T_numtype1, double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// Array<T_numtype1, N_rank1> / long double // Array<T_numtype1, N_rank1> / long double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Divide<T_numtype1, long double > > > Divide<T_numtype1, long double > > >
operator/(const Array<T_numtype1, N_rank1>& d1, operator/(const Array<T_numtype1, N_rank1>& d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Divide<T_numtype1, long double> > Divide<T_numtype1, long double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Array<T_numtype1, N_rank1> / complex<T2> // Array<T_numtype1, N_rank1> / complex<T2>
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Divide<T_numtype1, complex<T2> > > > Divide<T_numtype1, complex<T2> > > >
operator/(const Array<T_numtype1, N_rank1>& d1, operator/(const Array<T_numtype1, N_rank1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Divide<T_numtype1, complex<T2> > > Divide<T_numtype1, complex<T2> > >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> / Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> / Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<_bz_typename P_expr1::T_numtype, T_numtype2 > > > Divide<typename P_expr1::T_numtype, T_numtype2 > > >
operator/(_bz_ArrayExpr<P_expr1> d1, operator/(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<_bz_typename P_expr1::T_numtype, T_numtype2> > Divide<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> / _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> / _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numty pe > > > Divide<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator/(_bz_ArrayExpr<P_expr1> d1, operator/(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numty pe> > Divide<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> / IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> / IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<_bz_typename P_expr1::T_numtype, int > > > Divide<typename P_expr1::T_numtype, int > > >
operator/(_bz_ArrayExpr<P_expr1> d1, operator/(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<_bz_typename P_expr1::T_numtype, int> > Divide<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> / int // _bz_ArrayExpr<P_expr1> / int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Divide<_bz_typename P_expr1::T_numtype, int > > > Divide<typename P_expr1::T_numtype, int > > >
operator/(_bz_ArrayExpr<P_expr1> d1, operator/(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Divide<_bz_typename P_expr1::T_numtype, int> > Divide<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> / float // _bz_ArrayExpr<P_expr1> / float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Divide<_bz_typename P_expr1::T_numtype, float > > > Divide<typename P_expr1::T_numtype, float > > >
operator/(_bz_ArrayExpr<P_expr1> d1, operator/(_bz_ArrayExpr<P_expr1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Divide<_bz_typename P_expr1::T_numtype, float> > Divide<typename P_expr1::T_numtype, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// _bz_ArrayExpr<P_expr1> / double // _bz_ArrayExpr<P_expr1> / double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Divide<_bz_typename P_expr1::T_numtype, double > > > Divide<typename P_expr1::T_numtype, double > > >
operator/(_bz_ArrayExpr<P_expr1> d1, operator/(_bz_ArrayExpr<P_expr1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Divide<_bz_typename P_expr1::T_numtype, double> > Divide<typename P_expr1::T_numtype, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// _bz_ArrayExpr<P_expr1> / long double // _bz_ArrayExpr<P_expr1> / long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Divide<_bz_typename P_expr1::T_numtype, long double > > > Divide<typename P_expr1::T_numtype, long double > > >
operator/(_bz_ArrayExpr<P_expr1> d1, operator/(_bz_ArrayExpr<P_expr1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Divide<_bz_typename P_expr1::T_numtype, long double> > Divide<typename P_expr1::T_numtype, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> / complex<T2> // _bz_ArrayExpr<P_expr1> / complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Divide<_bz_typename P_expr1::T_numtype, complex<T2> > > > Divide<typename P_expr1::T_numtype, complex<T2> > > >
operator/(_bz_ArrayExpr<P_expr1> d1, operator/(_bz_ArrayExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Divide<_bz_typename P_expr1::T_numtype, complex<T2> > > Divide<typename P_expr1::T_numtype, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> / Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> / Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<int, T_numtype2 > > > Divide<int, T_numtype2 > > >
operator/(IndexPlaceholder<N_index1> d1, operator/(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<int, T_numtype2> > Divide<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> / _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> / _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<int, _bz_typename P_expr2::T_numtype > > > Divide<int, typename P_expr2::T_numtype > > >
operator/(IndexPlaceholder<N_index1> d1, operator/(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<int, _bz_typename P_expr2::T_numtype> > Divide<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> / IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> / IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<int, int > > > Divide<int, int > > >
operator/(IndexPlaceholder<N_index1> d1, operator/(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<int, int> > Divide<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> / int // IndexPlaceholder<N_index1> / int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Divide<int, int > > > Divide<int, int > > >
operator/(IndexPlaceholder<N_index1> d1, operator/(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Divide<int, int> > Divide<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> / float // IndexPlaceholder<N_index1> / float
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Divide<int, float > > > Divide<int, float > > >
operator/(IndexPlaceholder<N_index1> d1, operator/(IndexPlaceholder<N_index1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Divide<int, float> > Divide<int, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// IndexPlaceholder<N_index1> / double // IndexPlaceholder<N_index1> / double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Divide<int, double > > > Divide<int, double > > >
operator/(IndexPlaceholder<N_index1> d1, operator/(IndexPlaceholder<N_index1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Divide<int, double> > Divide<int, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// IndexPlaceholder<N_index1> / long double // IndexPlaceholder<N_index1> / long double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Divide<int, long double > > > Divide<int, long double > > >
operator/(IndexPlaceholder<N_index1> d1, operator/(IndexPlaceholder<N_index1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Divide<int, long double> > Divide<int, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> / complex<T2> // IndexPlaceholder<N_index1> / complex<T2>
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Divide<int, complex<T2> > > > Divide<int, complex<T2> > > >
operator/(IndexPlaceholder<N_index1> d1, operator/(IndexPlaceholder<N_index1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Divide<int, complex<T2> > > Divide<int, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int / Array<T_numtype2, N_rank2> // int / Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<int, T_numtype2 > > > Divide<int, T_numtype2 > > >
operator/(int d1, operator/(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<int, T_numtype2> > Divide<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int / _bz_ArrayExpr<P_expr2> // int / _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<int, _bz_typename P_expr2::T_numtype > > > Divide<int, typename P_expr2::T_numtype > > >
operator/(int d1, operator/(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<int, _bz_typename P_expr2::T_numtype> > Divide<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int / IndexPlaceholder<N_index2> // int / IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<int, int > > > Divide<int, int > > >
operator/(int d1, operator/(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<int, int> > Divide<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// float / Array<T_numtype2, N_rank2> // float / Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<float, T_numtype2 > > > Divide<float, T_numtype2 > > >
operator/(float d1, operator/(float d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<float, T_numtype2> > Divide<float, T_numtype2> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2.begin()); d2.begin());
} }
// float / _bz_ArrayExpr<P_expr2> // float / _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<float, _bz_typename P_expr2::T_numtype > > > Divide<float, typename P_expr2::T_numtype > > >
operator/(float d1, operator/(float d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<float, _bz_typename P_expr2::T_numtype> > Divide<float, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// float / IndexPlaceholder<N_index2> // float / IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<float, int > > > Divide<float, int > > >
operator/(float d1, operator/(float d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<float, int> > Divide<float, int> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// double / Array<T_numtype2, N_rank2> // double / Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<double, T_numtype2 > > > Divide<double, T_numtype2 > > >
operator/(double d1, operator/(double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<double, T_numtype2> > Divide<double, T_numtype2> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2.begin()); d2.begin());
} }
// double / _bz_ArrayExpr<P_expr2> // double / _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<double, _bz_typename P_expr2::T_numtype > > > Divide<double, typename P_expr2::T_numtype > > >
operator/(double d1, operator/(double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<double, _bz_typename P_expr2::T_numtype> > Divide<double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// double / IndexPlaceholder<N_index2> // double / IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<double, int > > > Divide<double, int > > >
operator/(double d1, operator/(double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<double, int> > Divide<double, int> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// long double / Array<T_numtype2, N_rank2> // long double / Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<long double, T_numtype2 > > > Divide<long double, T_numtype2 > > >
operator/(long double d1, operator/(long double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<long double, T_numtype2> > Divide<long double, T_numtype2> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2.begin()); d2.begin());
} }
// long double / _bz_ArrayExpr<P_expr2> // long double / _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<long double, _bz_typename P_expr2::T_numtype > > > Divide<long double, typename P_expr2::T_numtype > > >
operator/(long double d1, operator/(long double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<long double, _bz_typename P_expr2::T_numtype> > Divide<long double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
// long double / IndexPlaceholder<N_index2> // long double / IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<long double, int > > > Divide<long double, int > > >
operator/(long double d1, operator/(long double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<long double, int> > Divide<long double, int> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> / Array<T_numtype2, N_rank2> // complex<T1> / Array<T_numtype2, N_rank2>
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<complex<T1> , T_numtype2 > > > Divide<complex<T1> , T_numtype2 > > >
operator/(complex<T1> d1, operator/(complex<T1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Divide<complex<T1> , T_numtype2> > Divide<complex<T1> , T_numtype2> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2.begin()); d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> / _bz_ArrayExpr<P_expr2> // complex<T1> / _bz_ArrayExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<complex<T1> , _bz_typename P_expr2::T_numtype > > > Divide<complex<T1> , typename P_expr2::T_numtype > > >
operator/(complex<T1> d1, operator/(complex<T1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Divide<complex<T1> , _bz_typename P_expr2::T_numtype> > Divide<complex<T1> , typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> / IndexPlaceholder<N_index2> // complex<T1> / IndexPlaceholder<N_index2>
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<complex<T1> , int > > > Divide<complex<T1> , int > > >
operator/(complex<T1> d1, operator/(complex<T1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Divide<complex<T1> , int> > Divide<complex<T1> , int> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Modulus Operators * Modulus Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> % Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> % Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Modulo<T_numtype1, T_numtype2 > > > Modulo<T_numtype1, T_numtype2 > > >
operator%(const Array<T_numtype1, N_rank1>& d1, operator%(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Modulo<T_numtype1, T_numtype2> > Modulo<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> % _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> % _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Modulo<T_numtype1, _bz_typename P_expr2::T_numtype > > > Modulo<T_numtype1, typename P_expr2::T_numtype > > >
operator%(const Array<T_numtype1, N_rank1>& d1, operator%(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Modulo<T_numtype1, _bz_typename P_expr2::T_numtype> > Modulo<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> % IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> % IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Modulo<T_numtype1, int > > > Modulo<T_numtype1, int > > >
operator%(const Array<T_numtype1, N_rank1>& d1, operator%(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Modulo<T_numtype1, int> > Modulo<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> % int // Array<T_numtype1, N_rank1> % int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Modulo<T_numtype1, int > > > Modulo<T_numtype1, int > > >
operator%(const Array<T_numtype1, N_rank1>& d1, operator%(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Modulo<T_numtype1, int> > Modulo<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> % Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> % Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Modulo<_bz_typename P_expr1::T_numtype, T_numtype2 > > > Modulo<typename P_expr1::T_numtype, T_numtype2 > > >
operator%(_bz_ArrayExpr<P_expr1> d1, operator%(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Modulo<_bz_typename P_expr1::T_numtype, T_numtype2> > Modulo<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> % _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> % _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Modulo<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numty pe > > > Modulo<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator%(_bz_ArrayExpr<P_expr1> d1, operator%(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Modulo<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numty pe> > Modulo<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> % IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> % IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Modulo<_bz_typename P_expr1::T_numtype, int > > > Modulo<typename P_expr1::T_numtype, int > > >
operator%(_bz_ArrayExpr<P_expr1> d1, operator%(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Modulo<_bz_typename P_expr1::T_numtype, int> > Modulo<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> % int // _bz_ArrayExpr<P_expr1> % int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Modulo<_bz_typename P_expr1::T_numtype, int > > > Modulo<typename P_expr1::T_numtype, int > > >
operator%(_bz_ArrayExpr<P_expr1> d1, operator%(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Modulo<_bz_typename P_expr1::T_numtype, int> > Modulo<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> % Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> % Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Modulo<int, T_numtype2 > > > Modulo<int, T_numtype2 > > >
operator%(IndexPlaceholder<N_index1> d1, operator%(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Modulo<int, T_numtype2> > Modulo<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> % _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> % _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Modulo<int, _bz_typename P_expr2::T_numtype > > > Modulo<int, typename P_expr2::T_numtype > > >
operator%(IndexPlaceholder<N_index1> d1, operator%(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Modulo<int, _bz_typename P_expr2::T_numtype> > Modulo<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> % IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> % IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Modulo<int, int > > > Modulo<int, int > > >
operator%(IndexPlaceholder<N_index1> d1, operator%(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Modulo<int, int> > Modulo<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> % int // IndexPlaceholder<N_index1> % int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Modulo<int, int > > > Modulo<int, int > > >
operator%(IndexPlaceholder<N_index1> d1, operator%(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Modulo<int, int> > Modulo<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// int % Array<T_numtype2, N_rank2> // int % Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Modulo<int, T_numtype2 > > > Modulo<int, T_numtype2 > > >
operator%(int d1, operator%(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Modulo<int, T_numtype2> > Modulo<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int % _bz_ArrayExpr<P_expr2> // int % _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Modulo<int, _bz_typename P_expr2::T_numtype > > > Modulo<int, typename P_expr2::T_numtype > > >
operator%(int d1, operator%(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Modulo<int, _bz_typename P_expr2::T_numtype> > Modulo<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int % IndexPlaceholder<N_index2> // int % IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Modulo<int, int > > > Modulo<int, int > > >
operator%(int d1, operator%(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Modulo<int, int> > Modulo<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
/************************************************************************** ** /************************************************************************** **
* Greater-than Operators * Greater-than Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> > Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> > Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<T_numtype1, T_numtype2 > > > Greater<T_numtype1, T_numtype2 > > >
operator>(const Array<T_numtype1, N_rank1>& d1, operator>(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<T_numtype1, T_numtype2> > Greater<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> > _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> > _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<T_numtype1, _bz_typename P_expr2::T_numtype > > > Greater<T_numtype1, typename P_expr2::T_numtype > > >
operator>(const Array<T_numtype1, N_rank1>& d1, operator>(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<T_numtype1, _bz_typename P_expr2::T_numtype> > Greater<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> > IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> > IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<T_numtype1, int > > > Greater<T_numtype1, int > > >
operator>(const Array<T_numtype1, N_rank1>& d1, operator>(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<T_numtype1, int> > Greater<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> > int // Array<T_numtype1, N_rank1> > int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Greater<T_numtype1, int > > > Greater<T_numtype1, int > > >
operator>(const Array<T_numtype1, N_rank1>& d1, operator>(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Greater<T_numtype1, int> > Greater<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// Array<T_numtype1, N_rank1> > float // Array<T_numtype1, N_rank1> > float
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Greater<T_numtype1, float > > > Greater<T_numtype1, float > > >
operator>(const Array<T_numtype1, N_rank1>& d1, operator>(const Array<T_numtype1, N_rank1>& d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Greater<T_numtype1, float> > Greater<T_numtype1, float> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// Array<T_numtype1, N_rank1> > double // Array<T_numtype1, N_rank1> > double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Greater<T_numtype1, double > > > Greater<T_numtype1, double > > >
operator>(const Array<T_numtype1, N_rank1>& d1, operator>(const Array<T_numtype1, N_rank1>& d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Greater<T_numtype1, double> > Greater<T_numtype1, double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// Array<T_numtype1, N_rank1> > long double // Array<T_numtype1, N_rank1> > long double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Greater<T_numtype1, long double > > > Greater<T_numtype1, long double > > >
operator>(const Array<T_numtype1, N_rank1>& d1, operator>(const Array<T_numtype1, N_rank1>& d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Greater<T_numtype1, long double> > Greater<T_numtype1, long double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Array<T_numtype1, N_rank1> > complex<T2> // Array<T_numtype1, N_rank1> > complex<T2>
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Greater<T_numtype1, complex<T2> > > > Greater<T_numtype1, complex<T2> > > >
operator>(const Array<T_numtype1, N_rank1>& d1, operator>(const Array<T_numtype1, N_rank1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Greater<T_numtype1, complex<T2> > > Greater<T_numtype1, complex<T2> > >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> > Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> > Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<_bz_typename P_expr1::T_numtype, T_numtype2 > > > Greater<typename P_expr1::T_numtype, T_numtype2 > > >
operator>(_bz_ArrayExpr<P_expr1> d1, operator>(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<_bz_typename P_expr1::T_numtype, T_numtype2> > Greater<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> > _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> > _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numt ype > > > Greater<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator>(_bz_ArrayExpr<P_expr1> d1, operator>(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numt ype> > Greater<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> > IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> > IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<_bz_typename P_expr1::T_numtype, int > > > Greater<typename P_expr1::T_numtype, int > > >
operator>(_bz_ArrayExpr<P_expr1> d1, operator>(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<_bz_typename P_expr1::T_numtype, int> > Greater<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> > int // _bz_ArrayExpr<P_expr1> > int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Greater<_bz_typename P_expr1::T_numtype, int > > > Greater<typename P_expr1::T_numtype, int > > >
operator>(_bz_ArrayExpr<P_expr1> d1, operator>(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Greater<_bz_typename P_expr1::T_numtype, int> > Greater<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> > float // _bz_ArrayExpr<P_expr1> > float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Greater<_bz_typename P_expr1::T_numtype, float > > > Greater<typename P_expr1::T_numtype, float > > >
operator>(_bz_ArrayExpr<P_expr1> d1, operator>(_bz_ArrayExpr<P_expr1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Greater<_bz_typename P_expr1::T_numtype, float> > Greater<typename P_expr1::T_numtype, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// _bz_ArrayExpr<P_expr1> > double // _bz_ArrayExpr<P_expr1> > double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Greater<_bz_typename P_expr1::T_numtype, double > > > Greater<typename P_expr1::T_numtype, double > > >
operator>(_bz_ArrayExpr<P_expr1> d1, operator>(_bz_ArrayExpr<P_expr1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Greater<_bz_typename P_expr1::T_numtype, double> > Greater<typename P_expr1::T_numtype, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// _bz_ArrayExpr<P_expr1> > long double // _bz_ArrayExpr<P_expr1> > long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Greater<_bz_typename P_expr1::T_numtype, long double > > > Greater<typename P_expr1::T_numtype, long double > > >
operator>(_bz_ArrayExpr<P_expr1> d1, operator>(_bz_ArrayExpr<P_expr1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Greater<_bz_typename P_expr1::T_numtype, long double> > Greater<typename P_expr1::T_numtype, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> > complex<T2> // _bz_ArrayExpr<P_expr1> > complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Greater<_bz_typename P_expr1::T_numtype, complex<T2> > > > Greater<typename P_expr1::T_numtype, complex<T2> > > >
operator>(_bz_ArrayExpr<P_expr1> d1, operator>(_bz_ArrayExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Greater<_bz_typename P_expr1::T_numtype, complex<T2> > > Greater<typename P_expr1::T_numtype, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> > Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> > Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<int, T_numtype2 > > > Greater<int, T_numtype2 > > >
operator>(IndexPlaceholder<N_index1> d1, operator>(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<int, T_numtype2> > Greater<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> > _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> > _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<int, _bz_typename P_expr2::T_numtype > > > Greater<int, typename P_expr2::T_numtype > > >
operator>(IndexPlaceholder<N_index1> d1, operator>(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<int, _bz_typename P_expr2::T_numtype> > Greater<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> > IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> > IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<int, int > > > Greater<int, int > > >
operator>(IndexPlaceholder<N_index1> d1, operator>(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<int, int> > Greater<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> > int // IndexPlaceholder<N_index1> > int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Greater<int, int > > > Greater<int, int > > >
operator>(IndexPlaceholder<N_index1> d1, operator>(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Greater<int, int> > Greater<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> > float // IndexPlaceholder<N_index1> > float
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Greater<int, float > > > Greater<int, float > > >
operator>(IndexPlaceholder<N_index1> d1, operator>(IndexPlaceholder<N_index1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Greater<int, float> > Greater<int, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// IndexPlaceholder<N_index1> > double // IndexPlaceholder<N_index1> > double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Greater<int, double > > > Greater<int, double > > >
operator>(IndexPlaceholder<N_index1> d1, operator>(IndexPlaceholder<N_index1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Greater<int, double> > Greater<int, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// IndexPlaceholder<N_index1> > long double // IndexPlaceholder<N_index1> > long double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Greater<int, long double > > > Greater<int, long double > > >
operator>(IndexPlaceholder<N_index1> d1, operator>(IndexPlaceholder<N_index1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Greater<int, long double> > Greater<int, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> > complex<T2> // IndexPlaceholder<N_index1> > complex<T2>
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Greater<int, complex<T2> > > > Greater<int, complex<T2> > > >
operator>(IndexPlaceholder<N_index1> d1, operator>(IndexPlaceholder<N_index1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Greater<int, complex<T2> > > Greater<int, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int > Array<T_numtype2, N_rank2> // int > Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<int, T_numtype2 > > > Greater<int, T_numtype2 > > >
operator>(int d1, operator>(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<int, T_numtype2> > Greater<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int > _bz_ArrayExpr<P_expr2> // int > _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<int, _bz_typename P_expr2::T_numtype > > > Greater<int, typename P_expr2::T_numtype > > >
operator>(int d1, operator>(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<int, _bz_typename P_expr2::T_numtype> > Greater<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int > IndexPlaceholder<N_index2> // int > IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<int, int > > > Greater<int, int > > >
operator>(int d1, operator>(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<int, int> > Greater<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// float > Array<T_numtype2, N_rank2> // float > Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<float, T_numtype2 > > > Greater<float, T_numtype2 > > >
operator>(float d1, operator>(float d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<float, T_numtype2> > Greater<float, T_numtype2> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2.begin()); d2.begin());
} }
// float > _bz_ArrayExpr<P_expr2> // float > _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<float, _bz_typename P_expr2::T_numtype > > > Greater<float, typename P_expr2::T_numtype > > >
operator>(float d1, operator>(float d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<float, _bz_typename P_expr2::T_numtype> > Greater<float, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// float > IndexPlaceholder<N_index2> // float > IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<float, int > > > Greater<float, int > > >
operator>(float d1, operator>(float d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<float, int> > Greater<float, int> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// double > Array<T_numtype2, N_rank2> // double > Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<double, T_numtype2 > > > Greater<double, T_numtype2 > > >
operator>(double d1, operator>(double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<double, T_numtype2> > Greater<double, T_numtype2> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2.begin()); d2.begin());
} }
// double > _bz_ArrayExpr<P_expr2> // double > _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<double, _bz_typename P_expr2::T_numtype > > > Greater<double, typename P_expr2::T_numtype > > >
operator>(double d1, operator>(double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<double, _bz_typename P_expr2::T_numtype> > Greater<double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// double > IndexPlaceholder<N_index2> // double > IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<double, int > > > Greater<double, int > > >
operator>(double d1, operator>(double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<double, int> > Greater<double, int> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// long double > Array<T_numtype2, N_rank2> // long double > Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<long double, T_numtype2 > > > Greater<long double, T_numtype2 > > >
operator>(long double d1, operator>(long double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<long double, T_numtype2> > Greater<long double, T_numtype2> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2.begin()); d2.begin());
} }
// long double > _bz_ArrayExpr<P_expr2> // long double > _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<long double, _bz_typename P_expr2::T_numtype > > > Greater<long double, typename P_expr2::T_numtype > > >
operator>(long double d1, operator>(long double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<long double, _bz_typename P_expr2::T_numtype> > Greater<long double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
// long double > IndexPlaceholder<N_index2> // long double > IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<long double, int > > > Greater<long double, int > > >
operator>(long double d1, operator>(long double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<long double, int> > Greater<long double, int> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> > Array<T_numtype2, N_rank2> // complex<T1> > Array<T_numtype2, N_rank2>
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<complex<T1> , T_numtype2 > > > Greater<complex<T1> , T_numtype2 > > >
operator>(complex<T1> d1, operator>(complex<T1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Greater<complex<T1> , T_numtype2> > Greater<complex<T1> , T_numtype2> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2.begin()); d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> > _bz_ArrayExpr<P_expr2> // complex<T1> > _bz_ArrayExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<complex<T1> , _bz_typename P_expr2::T_numtype > > > Greater<complex<T1> , typename P_expr2::T_numtype > > >
operator>(complex<T1> d1, operator>(complex<T1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Greater<complex<T1> , _bz_typename P_expr2::T_numtype> > Greater<complex<T1> , typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> > IndexPlaceholder<N_index2> // complex<T1> > IndexPlaceholder<N_index2>
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<complex<T1> , int > > > Greater<complex<T1> , int > > >
operator>(complex<T1> d1, operator>(complex<T1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Greater<complex<T1> , int> > Greater<complex<T1> , int> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Less-than Operators * Less-than Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> < Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> < Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<T_numtype1, T_numtype2 > > > Less<T_numtype1, T_numtype2 > > >
operator<(const Array<T_numtype1, N_rank1>& d1, operator<(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<T_numtype1, T_numtype2> > Less<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> < _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> < _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<T_numtype1, _bz_typename P_expr2::T_numtype > > > Less<T_numtype1, typename P_expr2::T_numtype > > >
operator<(const Array<T_numtype1, N_rank1>& d1, operator<(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<T_numtype1, _bz_typename P_expr2::T_numtype> > Less<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> < IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> < IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<T_numtype1, int > > > Less<T_numtype1, int > > >
operator<(const Array<T_numtype1, N_rank1>& d1, operator<(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<T_numtype1, int> > Less<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> < int // Array<T_numtype1, N_rank1> < int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Less<T_numtype1, int > > > Less<T_numtype1, int > > >
operator<(const Array<T_numtype1, N_rank1>& d1, operator<(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Less<T_numtype1, int> > Less<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// Array<T_numtype1, N_rank1> < float // Array<T_numtype1, N_rank1> < float
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Less<T_numtype1, float > > > Less<T_numtype1, float > > >
operator<(const Array<T_numtype1, N_rank1>& d1, operator<(const Array<T_numtype1, N_rank1>& d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Less<T_numtype1, float> > Less<T_numtype1, float> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// Array<T_numtype1, N_rank1> < double // Array<T_numtype1, N_rank1> < double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Less<T_numtype1, double > > > Less<T_numtype1, double > > >
operator<(const Array<T_numtype1, N_rank1>& d1, operator<(const Array<T_numtype1, N_rank1>& d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Less<T_numtype1, double> > Less<T_numtype1, double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// Array<T_numtype1, N_rank1> < long double // Array<T_numtype1, N_rank1> < long double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Less<T_numtype1, long double > > > Less<T_numtype1, long double > > >
operator<(const Array<T_numtype1, N_rank1>& d1, operator<(const Array<T_numtype1, N_rank1>& d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Less<T_numtype1, long double> > Less<T_numtype1, long double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Array<T_numtype1, N_rank1> < complex<T2> // Array<T_numtype1, N_rank1> < complex<T2>
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Less<T_numtype1, complex<T2> > > > Less<T_numtype1, complex<T2> > > >
operator<(const Array<T_numtype1, N_rank1>& d1, operator<(const Array<T_numtype1, N_rank1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Less<T_numtype1, complex<T2> > > Less<T_numtype1, complex<T2> > >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> < Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> < Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<_bz_typename P_expr1::T_numtype, T_numtype2 > > > Less<typename P_expr1::T_numtype, T_numtype2 > > >
operator<(_bz_ArrayExpr<P_expr1> d1, operator<(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<_bz_typename P_expr1::T_numtype, T_numtype2> > Less<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> < _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> < _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numtype > > > Less<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator<(_bz_ArrayExpr<P_expr1> d1, operator<(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numtype > > Less<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> < IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> < IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<_bz_typename P_expr1::T_numtype, int > > > Less<typename P_expr1::T_numtype, int > > >
operator<(_bz_ArrayExpr<P_expr1> d1, operator<(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<_bz_typename P_expr1::T_numtype, int> > Less<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> < int // _bz_ArrayExpr<P_expr1> < int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Less<_bz_typename P_expr1::T_numtype, int > > > Less<typename P_expr1::T_numtype, int > > >
operator<(_bz_ArrayExpr<P_expr1> d1, operator<(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Less<_bz_typename P_expr1::T_numtype, int> > Less<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> < float // _bz_ArrayExpr<P_expr1> < float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Less<_bz_typename P_expr1::T_numtype, float > > > Less<typename P_expr1::T_numtype, float > > >
operator<(_bz_ArrayExpr<P_expr1> d1, operator<(_bz_ArrayExpr<P_expr1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Less<_bz_typename P_expr1::T_numtype, float> > Less<typename P_expr1::T_numtype, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// _bz_ArrayExpr<P_expr1> < double // _bz_ArrayExpr<P_expr1> < double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Less<_bz_typename P_expr1::T_numtype, double > > > Less<typename P_expr1::T_numtype, double > > >
operator<(_bz_ArrayExpr<P_expr1> d1, operator<(_bz_ArrayExpr<P_expr1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Less<_bz_typename P_expr1::T_numtype, double> > Less<typename P_expr1::T_numtype, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// _bz_ArrayExpr<P_expr1> < long double // _bz_ArrayExpr<P_expr1> < long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Less<_bz_typename P_expr1::T_numtype, long double > > > Less<typename P_expr1::T_numtype, long double > > >
operator<(_bz_ArrayExpr<P_expr1> d1, operator<(_bz_ArrayExpr<P_expr1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Less<_bz_typename P_expr1::T_numtype, long double> > Less<typename P_expr1::T_numtype, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> < complex<T2> // _bz_ArrayExpr<P_expr1> < complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Less<_bz_typename P_expr1::T_numtype, complex<T2> > > > Less<typename P_expr1::T_numtype, complex<T2> > > >
operator<(_bz_ArrayExpr<P_expr1> d1, operator<(_bz_ArrayExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Less<_bz_typename P_expr1::T_numtype, complex<T2> > > Less<typename P_expr1::T_numtype, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> < Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> < Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<int, T_numtype2 > > > Less<int, T_numtype2 > > >
operator<(IndexPlaceholder<N_index1> d1, operator<(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<int, T_numtype2> > Less<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> < _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> < _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<int, _bz_typename P_expr2::T_numtype > > > Less<int, typename P_expr2::T_numtype > > >
operator<(IndexPlaceholder<N_index1> d1, operator<(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<int, _bz_typename P_expr2::T_numtype> > Less<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> < IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> < IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<int, int > > > Less<int, int > > >
operator<(IndexPlaceholder<N_index1> d1, operator<(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<int, int> > Less<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> < int // IndexPlaceholder<N_index1> < int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Less<int, int > > > Less<int, int > > >
operator<(IndexPlaceholder<N_index1> d1, operator<(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Less<int, int> > Less<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> < float // IndexPlaceholder<N_index1> < float
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Less<int, float > > > Less<int, float > > >
operator<(IndexPlaceholder<N_index1> d1, operator<(IndexPlaceholder<N_index1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Less<int, float> > Less<int, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// IndexPlaceholder<N_index1> < double // IndexPlaceholder<N_index1> < double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Less<int, double > > > Less<int, double > > >
operator<(IndexPlaceholder<N_index1> d1, operator<(IndexPlaceholder<N_index1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Less<int, double> > Less<int, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// IndexPlaceholder<N_index1> < long double // IndexPlaceholder<N_index1> < long double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Less<int, long double > > > Less<int, long double > > >
operator<(IndexPlaceholder<N_index1> d1, operator<(IndexPlaceholder<N_index1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Less<int, long double> > Less<int, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> < complex<T2> // IndexPlaceholder<N_index1> < complex<T2>
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Less<int, complex<T2> > > > Less<int, complex<T2> > > >
operator<(IndexPlaceholder<N_index1> d1, operator<(IndexPlaceholder<N_index1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Less<int, complex<T2> > > Less<int, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int < Array<T_numtype2, N_rank2> // int < Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<int, T_numtype2 > > > Less<int, T_numtype2 > > >
operator<(int d1, operator<(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<int, T_numtype2> > Less<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int < _bz_ArrayExpr<P_expr2> // int < _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<int, _bz_typename P_expr2::T_numtype > > > Less<int, typename P_expr2::T_numtype > > >
operator<(int d1, operator<(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<int, _bz_typename P_expr2::T_numtype> > Less<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int < IndexPlaceholder<N_index2> // int < IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<int, int > > > Less<int, int > > >
operator<(int d1, operator<(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<int, int> > Less<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// float < Array<T_numtype2, N_rank2> // float < Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<float, T_numtype2 > > > Less<float, T_numtype2 > > >
operator<(float d1, operator<(float d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<float, T_numtype2> > Less<float, T_numtype2> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2.begin()); d2.begin());
} }
// float < _bz_ArrayExpr<P_expr2> // float < _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<float, _bz_typename P_expr2::T_numtype > > > Less<float, typename P_expr2::T_numtype > > >
operator<(float d1, operator<(float d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<float, _bz_typename P_expr2::T_numtype> > Less<float, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// float < IndexPlaceholder<N_index2> // float < IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<float, int > > > Less<float, int > > >
operator<(float d1, operator<(float d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<float, int> > Less<float, int> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// double < Array<T_numtype2, N_rank2> // double < Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<double, T_numtype2 > > > Less<double, T_numtype2 > > >
operator<(double d1, operator<(double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<double, T_numtype2> > Less<double, T_numtype2> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2.begin()); d2.begin());
} }
// double < _bz_ArrayExpr<P_expr2> // double < _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<double, _bz_typename P_expr2::T_numtype > > > Less<double, typename P_expr2::T_numtype > > >
operator<(double d1, operator<(double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<double, _bz_typename P_expr2::T_numtype> > Less<double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// double < IndexPlaceholder<N_index2> // double < IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<double, int > > > Less<double, int > > >
operator<(double d1, operator<(double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<double, int> > Less<double, int> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// long double < Array<T_numtype2, N_rank2> // long double < Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<long double, T_numtype2 > > > Less<long double, T_numtype2 > > >
operator<(long double d1, operator<(long double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<long double, T_numtype2> > Less<long double, T_numtype2> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2.begin()); d2.begin());
} }
// long double < _bz_ArrayExpr<P_expr2> // long double < _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<long double, _bz_typename P_expr2::T_numtype > > > Less<long double, typename P_expr2::T_numtype > > >
operator<(long double d1, operator<(long double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<long double, _bz_typename P_expr2::T_numtype> > Less<long double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
// long double < IndexPlaceholder<N_index2> // long double < IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<long double, int > > > Less<long double, int > > >
operator<(long double d1, operator<(long double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<long double, int> > Less<long double, int> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> < Array<T_numtype2, N_rank2> // complex<T1> < Array<T_numtype2, N_rank2>
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<complex<T1> , T_numtype2 > > > Less<complex<T1> , T_numtype2 > > >
operator<(complex<T1> d1, operator<(complex<T1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Less<complex<T1> , T_numtype2> > Less<complex<T1> , T_numtype2> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2.begin()); d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> < _bz_ArrayExpr<P_expr2> // complex<T1> < _bz_ArrayExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<complex<T1> , _bz_typename P_expr2::T_numtype > > > Less<complex<T1> , typename P_expr2::T_numtype > > >
operator<(complex<T1> d1, operator<(complex<T1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Less<complex<T1> , _bz_typename P_expr2::T_numtype> > Less<complex<T1> , typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> < IndexPlaceholder<N_index2> // complex<T1> < IndexPlaceholder<N_index2>
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<complex<T1> , int > > > Less<complex<T1> , int > > >
operator<(complex<T1> d1, operator<(complex<T1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Less<complex<T1> , int> > Less<complex<T1> , int> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Greater or equal (>=) operators * Greater or equal (>=) operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> >= Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> >= Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<T_numtype1, T_numtype2 > > > GreaterOrEqual<T_numtype1, T_numtype2 > > >
operator>=(const Array<T_numtype1, N_rank1>& d1, operator>=(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<T_numtype1, T_numtype2> > GreaterOrEqual<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> >= _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> >= _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<T_numtype1, _bz_typename P_expr2::T_numtype > > > GreaterOrEqual<T_numtype1, typename P_expr2::T_numtype > > >
operator>=(const Array<T_numtype1, N_rank1>& d1, operator>=(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<T_numtype1, _bz_typename P_expr2::T_numtype> > GreaterOrEqual<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> >= IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> >= IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<T_numtype1, int > > > GreaterOrEqual<T_numtype1, int > > >
operator>=(const Array<T_numtype1, N_rank1>& d1, operator>=(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<T_numtype1, int> > GreaterOrEqual<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> >= int // Array<T_numtype1, N_rank1> >= int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
GreaterOrEqual<T_numtype1, int > > > GreaterOrEqual<T_numtype1, int > > >
operator>=(const Array<T_numtype1, N_rank1>& d1, operator>=(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
GreaterOrEqual<T_numtype1, int> > GreaterOrEqual<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// Array<T_numtype1, N_rank1> >= float // Array<T_numtype1, N_rank1> >= float
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
GreaterOrEqual<T_numtype1, float > > > GreaterOrEqual<T_numtype1, float > > >
operator>=(const Array<T_numtype1, N_rank1>& d1, operator>=(const Array<T_numtype1, N_rank1>& d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
GreaterOrEqual<T_numtype1, float> > GreaterOrEqual<T_numtype1, float> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// Array<T_numtype1, N_rank1> >= double // Array<T_numtype1, N_rank1> >= double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
GreaterOrEqual<T_numtype1, double > > > GreaterOrEqual<T_numtype1, double > > >
operator>=(const Array<T_numtype1, N_rank1>& d1, operator>=(const Array<T_numtype1, N_rank1>& d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
GreaterOrEqual<T_numtype1, double> > GreaterOrEqual<T_numtype1, double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// Array<T_numtype1, N_rank1> >= long double // Array<T_numtype1, N_rank1> >= long double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
GreaterOrEqual<T_numtype1, long double > > > GreaterOrEqual<T_numtype1, long double > > >
operator>=(const Array<T_numtype1, N_rank1>& d1, operator>=(const Array<T_numtype1, N_rank1>& d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
GreaterOrEqual<T_numtype1, long double> > GreaterOrEqual<T_numtype1, long double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Array<T_numtype1, N_rank1> >= complex<T2> // Array<T_numtype1, N_rank1> >= complex<T2>
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
GreaterOrEqual<T_numtype1, complex<T2> > > > GreaterOrEqual<T_numtype1, complex<T2> > > >
operator>=(const Array<T_numtype1, N_rank1>& d1, operator>=(const Array<T_numtype1, N_rank1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
GreaterOrEqual<T_numtype1, complex<T2> > > GreaterOrEqual<T_numtype1, complex<T2> > >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> >= Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> >= Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, T_numtype2 > > > GreaterOrEqual<typename P_expr1::T_numtype, T_numtype2 > > >
operator>=(_bz_ArrayExpr<P_expr1> d1, operator>=(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, T_numtype2> > GreaterOrEqual<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> >= _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> >= _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype > > > GreaterOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_numty pe > > >
operator>=(_bz_ArrayExpr<P_expr1> d1, operator>=(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype> > GreaterOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_numty pe> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> >= IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> >= IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, int > > > GreaterOrEqual<typename P_expr1::T_numtype, int > > >
operator>=(_bz_ArrayExpr<P_expr1> d1, operator>=(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, int> > GreaterOrEqual<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> >= int // _bz_ArrayExpr<P_expr1> >= int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, int > > > GreaterOrEqual<typename P_expr1::T_numtype, int > > >
operator>=(_bz_ArrayExpr<P_expr1> d1, operator>=(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, int> > GreaterOrEqual<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> >= float // _bz_ArrayExpr<P_expr1> >= float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, float > > > GreaterOrEqual<typename P_expr1::T_numtype, float > > >
operator>=(_bz_ArrayExpr<P_expr1> d1, operator>=(_bz_ArrayExpr<P_expr1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, float> > GreaterOrEqual<typename P_expr1::T_numtype, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// _bz_ArrayExpr<P_expr1> >= double // _bz_ArrayExpr<P_expr1> >= double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, double > > > GreaterOrEqual<typename P_expr1::T_numtype, double > > >
operator>=(_bz_ArrayExpr<P_expr1> d1, operator>=(_bz_ArrayExpr<P_expr1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, double> > GreaterOrEqual<typename P_expr1::T_numtype, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// _bz_ArrayExpr<P_expr1> >= long double // _bz_ArrayExpr<P_expr1> >= long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, long double > > > GreaterOrEqual<typename P_expr1::T_numtype, long double > > >
operator>=(_bz_ArrayExpr<P_expr1> d1, operator>=(_bz_ArrayExpr<P_expr1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, long double> > GreaterOrEqual<typename P_expr1::T_numtype, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> >= complex<T2> // _bz_ArrayExpr<P_expr1> >= complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > > GreaterOrEqual<typename P_expr1::T_numtype, complex<T2> > > >
operator>=(_bz_ArrayExpr<P_expr1> d1, operator>=(_bz_ArrayExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
GreaterOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > GreaterOrEqual<typename P_expr1::T_numtype, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> >= Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> >= Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<int, T_numtype2 > > > GreaterOrEqual<int, T_numtype2 > > >
operator>=(IndexPlaceholder<N_index1> d1, operator>=(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<int, T_numtype2> > GreaterOrEqual<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> >= _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> >= _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<int, _bz_typename P_expr2::T_numtype > > > GreaterOrEqual<int, typename P_expr2::T_numtype > > >
operator>=(IndexPlaceholder<N_index1> d1, operator>=(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<int, _bz_typename P_expr2::T_numtype> > GreaterOrEqual<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> >= IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> >= IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<int, int > > > GreaterOrEqual<int, int > > >
operator>=(IndexPlaceholder<N_index1> d1, operator>=(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<int, int> > GreaterOrEqual<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> >= int // IndexPlaceholder<N_index1> >= int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
GreaterOrEqual<int, int > > > GreaterOrEqual<int, int > > >
operator>=(IndexPlaceholder<N_index1> d1, operator>=(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
GreaterOrEqual<int, int> > GreaterOrEqual<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> >= float // IndexPlaceholder<N_index1> >= float
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
GreaterOrEqual<int, float > > > GreaterOrEqual<int, float > > >
operator>=(IndexPlaceholder<N_index1> d1, operator>=(IndexPlaceholder<N_index1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
GreaterOrEqual<int, float> > GreaterOrEqual<int, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// IndexPlaceholder<N_index1> >= double // IndexPlaceholder<N_index1> >= double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
GreaterOrEqual<int, double > > > GreaterOrEqual<int, double > > >
operator>=(IndexPlaceholder<N_index1> d1, operator>=(IndexPlaceholder<N_index1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
GreaterOrEqual<int, double> > GreaterOrEqual<int, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// IndexPlaceholder<N_index1> >= long double // IndexPlaceholder<N_index1> >= long double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
GreaterOrEqual<int, long double > > > GreaterOrEqual<int, long double > > >
operator>=(IndexPlaceholder<N_index1> d1, operator>=(IndexPlaceholder<N_index1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
GreaterOrEqual<int, long double> > GreaterOrEqual<int, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> >= complex<T2> // IndexPlaceholder<N_index1> >= complex<T2>
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
GreaterOrEqual<int, complex<T2> > > > GreaterOrEqual<int, complex<T2> > > >
operator>=(IndexPlaceholder<N_index1> d1, operator>=(IndexPlaceholder<N_index1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
GreaterOrEqual<int, complex<T2> > > GreaterOrEqual<int, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int >= Array<T_numtype2, N_rank2> // int >= Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<int, T_numtype2 > > > GreaterOrEqual<int, T_numtype2 > > >
operator>=(int d1, operator>=(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<int, T_numtype2> > GreaterOrEqual<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int >= _bz_ArrayExpr<P_expr2> // int >= _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<int, _bz_typename P_expr2::T_numtype > > > GreaterOrEqual<int, typename P_expr2::T_numtype > > >
operator>=(int d1, operator>=(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<int, _bz_typename P_expr2::T_numtype> > GreaterOrEqual<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int >= IndexPlaceholder<N_index2> // int >= IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<int, int > > > GreaterOrEqual<int, int > > >
operator>=(int d1, operator>=(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<int, int> > GreaterOrEqual<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// float >= Array<T_numtype2, N_rank2> // float >= Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<float, T_numtype2 > > > GreaterOrEqual<float, T_numtype2 > > >
operator>=(float d1, operator>=(float d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<float, T_numtype2> > GreaterOrEqual<float, T_numtype2> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2.begin()); d2.begin());
} }
// float >= _bz_ArrayExpr<P_expr2> // float >= _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<float, _bz_typename P_expr2::T_numtype > > > GreaterOrEqual<float, typename P_expr2::T_numtype > > >
operator>=(float d1, operator>=(float d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<float, _bz_typename P_expr2::T_numtype> > GreaterOrEqual<float, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// float >= IndexPlaceholder<N_index2> // float >= IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<float, int > > > GreaterOrEqual<float, int > > >
operator>=(float d1, operator>=(float d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<float, int> > GreaterOrEqual<float, int> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// double >= Array<T_numtype2, N_rank2> // double >= Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<double, T_numtype2 > > > GreaterOrEqual<double, T_numtype2 > > >
operator>=(double d1, operator>=(double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<double, T_numtype2> > GreaterOrEqual<double, T_numtype2> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2.begin()); d2.begin());
} }
// double >= _bz_ArrayExpr<P_expr2> // double >= _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<double, _bz_typename P_expr2::T_numtype > > > GreaterOrEqual<double, typename P_expr2::T_numtype > > >
operator>=(double d1, operator>=(double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<double, _bz_typename P_expr2::T_numtype> > GreaterOrEqual<double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// double >= IndexPlaceholder<N_index2> // double >= IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<double, int > > > GreaterOrEqual<double, int > > >
operator>=(double d1, operator>=(double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<double, int> > GreaterOrEqual<double, int> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// long double >= Array<T_numtype2, N_rank2> // long double >= Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<long double, T_numtype2 > > > GreaterOrEqual<long double, T_numtype2 > > >
operator>=(long double d1, operator>=(long double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<long double, T_numtype2> > GreaterOrEqual<long double, T_numtype2> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2.begin()); d2.begin());
} }
// long double >= _bz_ArrayExpr<P_expr2> // long double >= _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<long double, _bz_typename P_expr2::T_numtype > > > GreaterOrEqual<long double, typename P_expr2::T_numtype > > >
operator>=(long double d1, operator>=(long double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<long double, _bz_typename P_expr2::T_numtype> > GreaterOrEqual<long double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
// long double >= IndexPlaceholder<N_index2> // long double >= IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<long double, int > > > GreaterOrEqual<long double, int > > >
operator>=(long double d1, operator>=(long double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<long double, int> > GreaterOrEqual<long double, int> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> >= Array<T_numtype2, N_rank2> // complex<T1> >= Array<T_numtype2, N_rank2>
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<complex<T1> , T_numtype2 > > > GreaterOrEqual<complex<T1> , T_numtype2 > > >
operator>=(complex<T1> d1, operator>=(complex<T1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
GreaterOrEqual<complex<T1> , T_numtype2> > GreaterOrEqual<complex<T1> , T_numtype2> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2.begin()); d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> >= _bz_ArrayExpr<P_expr2> // complex<T1> >= _bz_ArrayExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype > > > GreaterOrEqual<complex<T1> , typename P_expr2::T_numtype > > >
operator>=(complex<T1> d1, operator>=(complex<T1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
GreaterOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype> > GreaterOrEqual<complex<T1> , typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> >= IndexPlaceholder<N_index2> // complex<T1> >= IndexPlaceholder<N_index2>
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<complex<T1> , int > > > GreaterOrEqual<complex<T1> , int > > >
operator>=(complex<T1> d1, operator>=(complex<T1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
GreaterOrEqual<complex<T1> , int> > GreaterOrEqual<complex<T1> , int> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Less or equal (<=) operators * Less or equal (<=) operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> <= Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> <= Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<T_numtype1, T_numtype2 > > > LessOrEqual<T_numtype1, T_numtype2 > > >
operator<=(const Array<T_numtype1, N_rank1>& d1, operator<=(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<T_numtype1, T_numtype2> > LessOrEqual<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> <= _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> <= _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<T_numtype1, _bz_typename P_expr2::T_numtype > > > LessOrEqual<T_numtype1, typename P_expr2::T_numtype > > >
operator<=(const Array<T_numtype1, N_rank1>& d1, operator<=(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<T_numtype1, _bz_typename P_expr2::T_numtype> > LessOrEqual<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> <= IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> <= IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<T_numtype1, int > > > LessOrEqual<T_numtype1, int > > >
operator<=(const Array<T_numtype1, N_rank1>& d1, operator<=(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<T_numtype1, int> > LessOrEqual<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> <= int // Array<T_numtype1, N_rank1> <= int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LessOrEqual<T_numtype1, int > > > LessOrEqual<T_numtype1, int > > >
operator<=(const Array<T_numtype1, N_rank1>& d1, operator<=(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LessOrEqual<T_numtype1, int> > LessOrEqual<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// Array<T_numtype1, N_rank1> <= float // Array<T_numtype1, N_rank1> <= float
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
LessOrEqual<T_numtype1, float > > > LessOrEqual<T_numtype1, float > > >
operator<=(const Array<T_numtype1, N_rank1>& d1, operator<=(const Array<T_numtype1, N_rank1>& d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
LessOrEqual<T_numtype1, float> > LessOrEqual<T_numtype1, float> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// Array<T_numtype1, N_rank1> <= double // Array<T_numtype1, N_rank1> <= double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
LessOrEqual<T_numtype1, double > > > LessOrEqual<T_numtype1, double > > >
operator<=(const Array<T_numtype1, N_rank1>& d1, operator<=(const Array<T_numtype1, N_rank1>& d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
LessOrEqual<T_numtype1, double> > LessOrEqual<T_numtype1, double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// Array<T_numtype1, N_rank1> <= long double // Array<T_numtype1, N_rank1> <= long double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
LessOrEqual<T_numtype1, long double > > > LessOrEqual<T_numtype1, long double > > >
operator<=(const Array<T_numtype1, N_rank1>& d1, operator<=(const Array<T_numtype1, N_rank1>& d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
LessOrEqual<T_numtype1, long double> > LessOrEqual<T_numtype1, long double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Array<T_numtype1, N_rank1> <= complex<T2> // Array<T_numtype1, N_rank1> <= complex<T2>
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
LessOrEqual<T_numtype1, complex<T2> > > > LessOrEqual<T_numtype1, complex<T2> > > >
operator<=(const Array<T_numtype1, N_rank1>& d1, operator<=(const Array<T_numtype1, N_rank1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
LessOrEqual<T_numtype1, complex<T2> > > LessOrEqual<T_numtype1, complex<T2> > >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> <= Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> <= Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<_bz_typename P_expr1::T_numtype, T_numtype2 > > > LessOrEqual<typename P_expr1::T_numtype, T_numtype2 > > >
operator<=(_bz_ArrayExpr<P_expr1> d1, operator<=(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<_bz_typename P_expr1::T_numtype, T_numtype2> > LessOrEqual<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> <= _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> <= _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_ numtype > > > LessOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator<=(_bz_ArrayExpr<P_expr1> d1, operator<=(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_ numtype> > LessOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> <= IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> <= IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<_bz_typename P_expr1::T_numtype, int > > > LessOrEqual<typename P_expr1::T_numtype, int > > >
operator<=(_bz_ArrayExpr<P_expr1> d1, operator<=(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<_bz_typename P_expr1::T_numtype, int> > LessOrEqual<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> <= int // _bz_ArrayExpr<P_expr1> <= int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LessOrEqual<_bz_typename P_expr1::T_numtype, int > > > LessOrEqual<typename P_expr1::T_numtype, int > > >
operator<=(_bz_ArrayExpr<P_expr1> d1, operator<=(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LessOrEqual<_bz_typename P_expr1::T_numtype, int> > LessOrEqual<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> <= float // _bz_ArrayExpr<P_expr1> <= float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
LessOrEqual<_bz_typename P_expr1::T_numtype, float > > > LessOrEqual<typename P_expr1::T_numtype, float > > >
operator<=(_bz_ArrayExpr<P_expr1> d1, operator<=(_bz_ArrayExpr<P_expr1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
LessOrEqual<_bz_typename P_expr1::T_numtype, float> > LessOrEqual<typename P_expr1::T_numtype, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// _bz_ArrayExpr<P_expr1> <= double // _bz_ArrayExpr<P_expr1> <= double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
LessOrEqual<_bz_typename P_expr1::T_numtype, double > > > LessOrEqual<typename P_expr1::T_numtype, double > > >
operator<=(_bz_ArrayExpr<P_expr1> d1, operator<=(_bz_ArrayExpr<P_expr1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
LessOrEqual<_bz_typename P_expr1::T_numtype, double> > LessOrEqual<typename P_expr1::T_numtype, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// _bz_ArrayExpr<P_expr1> <= long double // _bz_ArrayExpr<P_expr1> <= long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
LessOrEqual<_bz_typename P_expr1::T_numtype, long double > > > LessOrEqual<typename P_expr1::T_numtype, long double > > >
operator<=(_bz_ArrayExpr<P_expr1> d1, operator<=(_bz_ArrayExpr<P_expr1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
LessOrEqual<_bz_typename P_expr1::T_numtype, long double> > LessOrEqual<typename P_expr1::T_numtype, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> <= complex<T2> // _bz_ArrayExpr<P_expr1> <= complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
LessOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > > LessOrEqual<typename P_expr1::T_numtype, complex<T2> > > >
operator<=(_bz_ArrayExpr<P_expr1> d1, operator<=(_bz_ArrayExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
LessOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > LessOrEqual<typename P_expr1::T_numtype, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> <= Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> <= Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<int, T_numtype2 > > > LessOrEqual<int, T_numtype2 > > >
operator<=(IndexPlaceholder<N_index1> d1, operator<=(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<int, T_numtype2> > LessOrEqual<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> <= _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> <= _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<int, _bz_typename P_expr2::T_numtype > > > LessOrEqual<int, typename P_expr2::T_numtype > > >
operator<=(IndexPlaceholder<N_index1> d1, operator<=(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<int, _bz_typename P_expr2::T_numtype> > LessOrEqual<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> <= IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> <= IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<int, int > > > LessOrEqual<int, int > > >
operator<=(IndexPlaceholder<N_index1> d1, operator<=(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<int, int> > LessOrEqual<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> <= int // IndexPlaceholder<N_index1> <= int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LessOrEqual<int, int > > > LessOrEqual<int, int > > >
operator<=(IndexPlaceholder<N_index1> d1, operator<=(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LessOrEqual<int, int> > LessOrEqual<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> <= float // IndexPlaceholder<N_index1> <= float
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
LessOrEqual<int, float > > > LessOrEqual<int, float > > >
operator<=(IndexPlaceholder<N_index1> d1, operator<=(IndexPlaceholder<N_index1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
LessOrEqual<int, float> > LessOrEqual<int, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// IndexPlaceholder<N_index1> <= double // IndexPlaceholder<N_index1> <= double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
LessOrEqual<int, double > > > LessOrEqual<int, double > > >
operator<=(IndexPlaceholder<N_index1> d1, operator<=(IndexPlaceholder<N_index1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
LessOrEqual<int, double> > LessOrEqual<int, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// IndexPlaceholder<N_index1> <= long double // IndexPlaceholder<N_index1> <= long double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
LessOrEqual<int, long double > > > LessOrEqual<int, long double > > >
operator<=(IndexPlaceholder<N_index1> d1, operator<=(IndexPlaceholder<N_index1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
LessOrEqual<int, long double> > LessOrEqual<int, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> <= complex<T2> // IndexPlaceholder<N_index1> <= complex<T2>
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
LessOrEqual<int, complex<T2> > > > LessOrEqual<int, complex<T2> > > >
operator<=(IndexPlaceholder<N_index1> d1, operator<=(IndexPlaceholder<N_index1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
LessOrEqual<int, complex<T2> > > LessOrEqual<int, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int <= Array<T_numtype2, N_rank2> // int <= Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<int, T_numtype2 > > > LessOrEqual<int, T_numtype2 > > >
operator<=(int d1, operator<=(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<int, T_numtype2> > LessOrEqual<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int <= _bz_ArrayExpr<P_expr2> // int <= _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<int, _bz_typename P_expr2::T_numtype > > > LessOrEqual<int, typename P_expr2::T_numtype > > >
operator<=(int d1, operator<=(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<int, _bz_typename P_expr2::T_numtype> > LessOrEqual<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int <= IndexPlaceholder<N_index2> // int <= IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<int, int > > > LessOrEqual<int, int > > >
operator<=(int d1, operator<=(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<int, int> > LessOrEqual<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// float <= Array<T_numtype2, N_rank2> // float <= Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<float, T_numtype2 > > > LessOrEqual<float, T_numtype2 > > >
operator<=(float d1, operator<=(float d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<float, T_numtype2> > LessOrEqual<float, T_numtype2> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2.begin()); d2.begin());
} }
// float <= _bz_ArrayExpr<P_expr2> // float <= _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<float, _bz_typename P_expr2::T_numtype > > > LessOrEqual<float, typename P_expr2::T_numtype > > >
operator<=(float d1, operator<=(float d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<float, _bz_typename P_expr2::T_numtype> > LessOrEqual<float, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// float <= IndexPlaceholder<N_index2> // float <= IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<float, int > > > LessOrEqual<float, int > > >
operator<=(float d1, operator<=(float d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<float, int> > LessOrEqual<float, int> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// double <= Array<T_numtype2, N_rank2> // double <= Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<double, T_numtype2 > > > LessOrEqual<double, T_numtype2 > > >
operator<=(double d1, operator<=(double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<double, T_numtype2> > LessOrEqual<double, T_numtype2> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2.begin()); d2.begin());
} }
// double <= _bz_ArrayExpr<P_expr2> // double <= _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<double, _bz_typename P_expr2::T_numtype > > > LessOrEqual<double, typename P_expr2::T_numtype > > >
operator<=(double d1, operator<=(double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<double, _bz_typename P_expr2::T_numtype> > LessOrEqual<double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// double <= IndexPlaceholder<N_index2> // double <= IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<double, int > > > LessOrEqual<double, int > > >
operator<=(double d1, operator<=(double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<double, int> > LessOrEqual<double, int> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// long double <= Array<T_numtype2, N_rank2> // long double <= Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<long double, T_numtype2 > > > LessOrEqual<long double, T_numtype2 > > >
operator<=(long double d1, operator<=(long double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<long double, T_numtype2> > LessOrEqual<long double, T_numtype2> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2.begin()); d2.begin());
} }
// long double <= _bz_ArrayExpr<P_expr2> // long double <= _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<long double, _bz_typename P_expr2::T_numtype > > > LessOrEqual<long double, typename P_expr2::T_numtype > > >
operator<=(long double d1, operator<=(long double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<long double, _bz_typename P_expr2::T_numtype> > LessOrEqual<long double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
// long double <= IndexPlaceholder<N_index2> // long double <= IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<long double, int > > > LessOrEqual<long double, int > > >
operator<=(long double d1, operator<=(long double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<long double, int> > LessOrEqual<long double, int> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> <= Array<T_numtype2, N_rank2> // complex<T1> <= Array<T_numtype2, N_rank2>
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<complex<T1> , T_numtype2 > > > LessOrEqual<complex<T1> , T_numtype2 > > >
operator<=(complex<T1> d1, operator<=(complex<T1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LessOrEqual<complex<T1> , T_numtype2> > LessOrEqual<complex<T1> , T_numtype2> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2.begin()); d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> <= _bz_ArrayExpr<P_expr2> // complex<T1> <= _bz_ArrayExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype > > > LessOrEqual<complex<T1> , typename P_expr2::T_numtype > > >
operator<=(complex<T1> d1, operator<=(complex<T1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LessOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype> > LessOrEqual<complex<T1> , typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> <= IndexPlaceholder<N_index2> // complex<T1> <= IndexPlaceholder<N_index2>
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<complex<T1> , int > > > LessOrEqual<complex<T1> , int > > >
operator<=(complex<T1> d1, operator<=(complex<T1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LessOrEqual<complex<T1> , int> > LessOrEqual<complex<T1> , int> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Equality operators * Equality operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> == Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> == Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<T_numtype1, T_numtype2 > > > Equal<T_numtype1, T_numtype2 > > >
operator==(const Array<T_numtype1, N_rank1>& d1, operator==(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<T_numtype1, T_numtype2> > Equal<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> == _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> == _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<T_numtype1, _bz_typename P_expr2::T_numtype > > > Equal<T_numtype1, typename P_expr2::T_numtype > > >
operator==(const Array<T_numtype1, N_rank1>& d1, operator==(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<T_numtype1, _bz_typename P_expr2::T_numtype> > Equal<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> == IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> == IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<T_numtype1, int > > > Equal<T_numtype1, int > > >
operator==(const Array<T_numtype1, N_rank1>& d1, operator==(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<T_numtype1, int> > Equal<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> == int // Array<T_numtype1, N_rank1> == int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Equal<T_numtype1, int > > > Equal<T_numtype1, int > > >
operator==(const Array<T_numtype1, N_rank1>& d1, operator==(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Equal<T_numtype1, int> > Equal<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// Array<T_numtype1, N_rank1> == float // Array<T_numtype1, N_rank1> == float
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Equal<T_numtype1, float > > > Equal<T_numtype1, float > > >
operator==(const Array<T_numtype1, N_rank1>& d1, operator==(const Array<T_numtype1, N_rank1>& d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Equal<T_numtype1, float> > Equal<T_numtype1, float> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// Array<T_numtype1, N_rank1> == double // Array<T_numtype1, N_rank1> == double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Equal<T_numtype1, double > > > Equal<T_numtype1, double > > >
operator==(const Array<T_numtype1, N_rank1>& d1, operator==(const Array<T_numtype1, N_rank1>& d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Equal<T_numtype1, double> > Equal<T_numtype1, double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// Array<T_numtype1, N_rank1> == long double // Array<T_numtype1, N_rank1> == long double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Equal<T_numtype1, long double > > > Equal<T_numtype1, long double > > >
operator==(const Array<T_numtype1, N_rank1>& d1, operator==(const Array<T_numtype1, N_rank1>& d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Equal<T_numtype1, long double> > Equal<T_numtype1, long double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Array<T_numtype1, N_rank1> == complex<T2> // Array<T_numtype1, N_rank1> == complex<T2>
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Equal<T_numtype1, complex<T2> > > > Equal<T_numtype1, complex<T2> > > >
operator==(const Array<T_numtype1, N_rank1>& d1, operator==(const Array<T_numtype1, N_rank1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Equal<T_numtype1, complex<T2> > > Equal<T_numtype1, complex<T2> > >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> == Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> == Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<_bz_typename P_expr1::T_numtype, T_numtype2 > > > Equal<typename P_expr1::T_numtype, T_numtype2 > > >
operator==(_bz_ArrayExpr<P_expr1> d1, operator==(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<_bz_typename P_expr1::T_numtype, T_numtype2> > Equal<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> == _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> == _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numtyp e > > > Equal<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator==(_bz_ArrayExpr<P_expr1> d1, operator==(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numtyp e> > Equal<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> == IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> == IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<_bz_typename P_expr1::T_numtype, int > > > Equal<typename P_expr1::T_numtype, int > > >
operator==(_bz_ArrayExpr<P_expr1> d1, operator==(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<_bz_typename P_expr1::T_numtype, int> > Equal<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> == int // _bz_ArrayExpr<P_expr1> == int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Equal<_bz_typename P_expr1::T_numtype, int > > > Equal<typename P_expr1::T_numtype, int > > >
operator==(_bz_ArrayExpr<P_expr1> d1, operator==(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Equal<_bz_typename P_expr1::T_numtype, int> > Equal<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> == float // _bz_ArrayExpr<P_expr1> == float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Equal<_bz_typename P_expr1::T_numtype, float > > > Equal<typename P_expr1::T_numtype, float > > >
operator==(_bz_ArrayExpr<P_expr1> d1, operator==(_bz_ArrayExpr<P_expr1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Equal<_bz_typename P_expr1::T_numtype, float> > Equal<typename P_expr1::T_numtype, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// _bz_ArrayExpr<P_expr1> == double // _bz_ArrayExpr<P_expr1> == double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Equal<_bz_typename P_expr1::T_numtype, double > > > Equal<typename P_expr1::T_numtype, double > > >
operator==(_bz_ArrayExpr<P_expr1> d1, operator==(_bz_ArrayExpr<P_expr1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Equal<_bz_typename P_expr1::T_numtype, double> > Equal<typename P_expr1::T_numtype, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// _bz_ArrayExpr<P_expr1> == long double // _bz_ArrayExpr<P_expr1> == long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Equal<_bz_typename P_expr1::T_numtype, long double > > > Equal<typename P_expr1::T_numtype, long double > > >
operator==(_bz_ArrayExpr<P_expr1> d1, operator==(_bz_ArrayExpr<P_expr1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Equal<_bz_typename P_expr1::T_numtype, long double> > Equal<typename P_expr1::T_numtype, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> == complex<T2> // _bz_ArrayExpr<P_expr1> == complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Equal<_bz_typename P_expr1::T_numtype, complex<T2> > > > Equal<typename P_expr1::T_numtype, complex<T2> > > >
operator==(_bz_ArrayExpr<P_expr1> d1, operator==(_bz_ArrayExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Equal<_bz_typename P_expr1::T_numtype, complex<T2> > > Equal<typename P_expr1::T_numtype, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> == Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> == Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<int, T_numtype2 > > > Equal<int, T_numtype2 > > >
operator==(IndexPlaceholder<N_index1> d1, operator==(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<int, T_numtype2> > Equal<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> == _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> == _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<int, _bz_typename P_expr2::T_numtype > > > Equal<int, typename P_expr2::T_numtype > > >
operator==(IndexPlaceholder<N_index1> d1, operator==(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<int, _bz_typename P_expr2::T_numtype> > Equal<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> == IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> == IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<int, int > > > Equal<int, int > > >
operator==(IndexPlaceholder<N_index1> d1, operator==(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<int, int> > Equal<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> == int // IndexPlaceholder<N_index1> == int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Equal<int, int > > > Equal<int, int > > >
operator==(IndexPlaceholder<N_index1> d1, operator==(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
Equal<int, int> > Equal<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> == float // IndexPlaceholder<N_index1> == float
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Equal<int, float > > > Equal<int, float > > >
operator==(IndexPlaceholder<N_index1> d1, operator==(IndexPlaceholder<N_index1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
Equal<int, float> > Equal<int, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// IndexPlaceholder<N_index1> == double // IndexPlaceholder<N_index1> == double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Equal<int, double > > > Equal<int, double > > >
operator==(IndexPlaceholder<N_index1> d1, operator==(IndexPlaceholder<N_index1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
Equal<int, double> > Equal<int, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// IndexPlaceholder<N_index1> == long double // IndexPlaceholder<N_index1> == long double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Equal<int, long double > > > Equal<int, long double > > >
operator==(IndexPlaceholder<N_index1> d1, operator==(IndexPlaceholder<N_index1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
Equal<int, long double> > Equal<int, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> == complex<T2> // IndexPlaceholder<N_index1> == complex<T2>
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Equal<int, complex<T2> > > > Equal<int, complex<T2> > > >
operator==(IndexPlaceholder<N_index1> d1, operator==(IndexPlaceholder<N_index1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
Equal<int, complex<T2> > > Equal<int, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int == Array<T_numtype2, N_rank2> // int == Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<int, T_numtype2 > > > Equal<int, T_numtype2 > > >
operator==(int d1, operator==(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<int, T_numtype2> > Equal<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int == _bz_ArrayExpr<P_expr2> // int == _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<int, _bz_typename P_expr2::T_numtype > > > Equal<int, typename P_expr2::T_numtype > > >
operator==(int d1, operator==(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<int, _bz_typename P_expr2::T_numtype> > Equal<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int == IndexPlaceholder<N_index2> // int == IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<int, int > > > Equal<int, int > > >
operator==(int d1, operator==(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<int, int> > Equal<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// float == Array<T_numtype2, N_rank2> // float == Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<float, T_numtype2 > > > Equal<float, T_numtype2 > > >
operator==(float d1, operator==(float d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<float, T_numtype2> > Equal<float, T_numtype2> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2.begin()); d2.begin());
} }
// float == _bz_ArrayExpr<P_expr2> // float == _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<float, _bz_typename P_expr2::T_numtype > > > Equal<float, typename P_expr2::T_numtype > > >
operator==(float d1, operator==(float d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<float, _bz_typename P_expr2::T_numtype> > Equal<float, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// float == IndexPlaceholder<N_index2> // float == IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<float, int > > > Equal<float, int > > >
operator==(float d1, operator==(float d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<float, int> > Equal<float, int> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// double == Array<T_numtype2, N_rank2> // double == Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<double, T_numtype2 > > > Equal<double, T_numtype2 > > >
operator==(double d1, operator==(double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<double, T_numtype2> > Equal<double, T_numtype2> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2.begin()); d2.begin());
} }
// double == _bz_ArrayExpr<P_expr2> // double == _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<double, _bz_typename P_expr2::T_numtype > > > Equal<double, typename P_expr2::T_numtype > > >
operator==(double d1, operator==(double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<double, _bz_typename P_expr2::T_numtype> > Equal<double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// double == IndexPlaceholder<N_index2> // double == IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<double, int > > > Equal<double, int > > >
operator==(double d1, operator==(double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<double, int> > Equal<double, int> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// long double == Array<T_numtype2, N_rank2> // long double == Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<long double, T_numtype2 > > > Equal<long double, T_numtype2 > > >
operator==(long double d1, operator==(long double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<long double, T_numtype2> > Equal<long double, T_numtype2> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2.begin()); d2.begin());
} }
// long double == _bz_ArrayExpr<P_expr2> // long double == _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<long double, _bz_typename P_expr2::T_numtype > > > Equal<long double, typename P_expr2::T_numtype > > >
operator==(long double d1, operator==(long double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<long double, _bz_typename P_expr2::T_numtype> > Equal<long double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
// long double == IndexPlaceholder<N_index2> // long double == IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<long double, int > > > Equal<long double, int > > >
operator==(long double d1, operator==(long double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<long double, int> > Equal<long double, int> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> == Array<T_numtype2, N_rank2> // complex<T1> == Array<T_numtype2, N_rank2>
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<complex<T1> , T_numtype2 > > > Equal<complex<T1> , T_numtype2 > > >
operator==(complex<T1> d1, operator==(complex<T1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
Equal<complex<T1> , T_numtype2> > Equal<complex<T1> , T_numtype2> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2.begin()); d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> == _bz_ArrayExpr<P_expr2> // complex<T1> == _bz_ArrayExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<complex<T1> , _bz_typename P_expr2::T_numtype > > > Equal<complex<T1> , typename P_expr2::T_numtype > > >
operator==(complex<T1> d1, operator==(complex<T1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
Equal<complex<T1> , _bz_typename P_expr2::T_numtype> > Equal<complex<T1> , typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> == IndexPlaceholder<N_index2> // complex<T1> == IndexPlaceholder<N_index2>
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<complex<T1> , int > > > Equal<complex<T1> , int > > >
operator==(complex<T1> d1, operator==(complex<T1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
Equal<complex<T1> , int> > Equal<complex<T1> , int> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Not-equal operators * Not-equal operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> != Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> != Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<T_numtype1, T_numtype2 > > > NotEqual<T_numtype1, T_numtype2 > > >
operator!=(const Array<T_numtype1, N_rank1>& d1, operator!=(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<T_numtype1, T_numtype2> > NotEqual<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> != _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> != _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<T_numtype1, _bz_typename P_expr2::T_numtype > > > NotEqual<T_numtype1, typename P_expr2::T_numtype > > >
operator!=(const Array<T_numtype1, N_rank1>& d1, operator!=(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<T_numtype1, _bz_typename P_expr2::T_numtype> > NotEqual<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> != IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> != IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<T_numtype1, int > > > NotEqual<T_numtype1, int > > >
operator!=(const Array<T_numtype1, N_rank1>& d1, operator!=(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<T_numtype1, int> > NotEqual<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> != int // Array<T_numtype1, N_rank1> != int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
NotEqual<T_numtype1, int > > > NotEqual<T_numtype1, int > > >
operator!=(const Array<T_numtype1, N_rank1>& d1, operator!=(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
NotEqual<T_numtype1, int> > NotEqual<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// Array<T_numtype1, N_rank1> != float // Array<T_numtype1, N_rank1> != float
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
NotEqual<T_numtype1, float > > > NotEqual<T_numtype1, float > > >
operator!=(const Array<T_numtype1, N_rank1>& d1, operator!=(const Array<T_numtype1, N_rank1>& d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
NotEqual<T_numtype1, float> > NotEqual<T_numtype1, float> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// Array<T_numtype1, N_rank1> != double // Array<T_numtype1, N_rank1> != double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
NotEqual<T_numtype1, double > > > NotEqual<T_numtype1, double > > >
operator!=(const Array<T_numtype1, N_rank1>& d1, operator!=(const Array<T_numtype1, N_rank1>& d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
NotEqual<T_numtype1, double> > NotEqual<T_numtype1, double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// Array<T_numtype1, N_rank1> != long double // Array<T_numtype1, N_rank1> != long double
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
NotEqual<T_numtype1, long double > > > NotEqual<T_numtype1, long double > > >
operator!=(const Array<T_numtype1, N_rank1>& d1, operator!=(const Array<T_numtype1, N_rank1>& d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
NotEqual<T_numtype1, long double> > NotEqual<T_numtype1, long double> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Array<T_numtype1, N_rank1> != complex<T2> // Array<T_numtype1, N_rank1> != complex<T2>
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
NotEqual<T_numtype1, complex<T2> > > > NotEqual<T_numtype1, complex<T2> > > >
operator!=(const Array<T_numtype1, N_rank1>& d1, operator!=(const Array<T_numtype1, N_rank1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
NotEqual<T_numtype1, complex<T2> > > NotEqual<T_numtype1, complex<T2> > >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> != Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> != Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<_bz_typename P_expr1::T_numtype, T_numtype2 > > > NotEqual<typename P_expr1::T_numtype, T_numtype2 > > >
operator!=(_bz_ArrayExpr<P_expr1> d1, operator!=(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<_bz_typename P_expr1::T_numtype, T_numtype2> > NotEqual<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> != _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> != _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_num type > > > NotEqual<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator!=(_bz_ArrayExpr<P_expr1> d1, operator!=(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_num type> > NotEqual<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> != IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> != IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<_bz_typename P_expr1::T_numtype, int > > > NotEqual<typename P_expr1::T_numtype, int > > >
operator!=(_bz_ArrayExpr<P_expr1> d1, operator!=(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<_bz_typename P_expr1::T_numtype, int> > NotEqual<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> != int // _bz_ArrayExpr<P_expr1> != int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
NotEqual<_bz_typename P_expr1::T_numtype, int > > > NotEqual<typename P_expr1::T_numtype, int > > >
operator!=(_bz_ArrayExpr<P_expr1> d1, operator!=(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
NotEqual<_bz_typename P_expr1::T_numtype, int> > NotEqual<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> != float // _bz_ArrayExpr<P_expr1> != float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
NotEqual<_bz_typename P_expr1::T_numtype, float > > > NotEqual<typename P_expr1::T_numtype, float > > >
operator!=(_bz_ArrayExpr<P_expr1> d1, operator!=(_bz_ArrayExpr<P_expr1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
NotEqual<_bz_typename P_expr1::T_numtype, float> > NotEqual<typename P_expr1::T_numtype, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// _bz_ArrayExpr<P_expr1> != double // _bz_ArrayExpr<P_expr1> != double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
NotEqual<_bz_typename P_expr1::T_numtype, double > > > NotEqual<typename P_expr1::T_numtype, double > > >
operator!=(_bz_ArrayExpr<P_expr1> d1, operator!=(_bz_ArrayExpr<P_expr1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
NotEqual<_bz_typename P_expr1::T_numtype, double> > NotEqual<typename P_expr1::T_numtype, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// _bz_ArrayExpr<P_expr1> != long double // _bz_ArrayExpr<P_expr1> != long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
NotEqual<_bz_typename P_expr1::T_numtype, long double > > > NotEqual<typename P_expr1::T_numtype, long double > > >
operator!=(_bz_ArrayExpr<P_expr1> d1, operator!=(_bz_ArrayExpr<P_expr1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
NotEqual<_bz_typename P_expr1::T_numtype, long double> > NotEqual<typename P_expr1::T_numtype, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_ArrayExpr<P_expr1> != complex<T2> // _bz_ArrayExpr<P_expr1> != complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
NotEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > > NotEqual<typename P_expr1::T_numtype, complex<T2> > > >
operator!=(_bz_ArrayExpr<P_expr1> d1, operator!=(_bz_ArrayExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
NotEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > NotEqual<typename P_expr1::T_numtype, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> != Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> != Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<int, T_numtype2 > > > NotEqual<int, T_numtype2 > > >
operator!=(IndexPlaceholder<N_index1> d1, operator!=(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<int, T_numtype2> > NotEqual<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> != _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> != _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<int, _bz_typename P_expr2::T_numtype > > > NotEqual<int, typename P_expr2::T_numtype > > >
operator!=(IndexPlaceholder<N_index1> d1, operator!=(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<int, _bz_typename P_expr2::T_numtype> > NotEqual<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> != IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> != IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<int, int > > > NotEqual<int, int > > >
operator!=(IndexPlaceholder<N_index1> d1, operator!=(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<int, int> > NotEqual<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> != int // IndexPlaceholder<N_index1> != int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
NotEqual<int, int > > > NotEqual<int, int > > >
operator!=(IndexPlaceholder<N_index1> d1, operator!=(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
NotEqual<int, int> > NotEqual<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> != float // IndexPlaceholder<N_index1> != float
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
NotEqual<int, float > > > NotEqual<int, float > > >
operator!=(IndexPlaceholder<N_index1> d1, operator!=(IndexPlaceholder<N_index1> d1,
float d2) float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<float>, _bz_ArrayExprConstant<float>,
NotEqual<int, float> > NotEqual<int, float> >
(d1, (d1,
_bz_ArrayExprConstant<float>(d2)); _bz_ArrayExprConstant<float>(d2));
} }
// IndexPlaceholder<N_index1> != double // IndexPlaceholder<N_index1> != double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
NotEqual<int, double > > > NotEqual<int, double > > >
operator!=(IndexPlaceholder<N_index1> d1, operator!=(IndexPlaceholder<N_index1> d1,
double d2) double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<double>, _bz_ArrayExprConstant<double>,
NotEqual<int, double> > NotEqual<int, double> >
(d1, (d1,
_bz_ArrayExprConstant<double>(d2)); _bz_ArrayExprConstant<double>(d2));
} }
// IndexPlaceholder<N_index1> != long double // IndexPlaceholder<N_index1> != long double
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
NotEqual<int, long double > > > NotEqual<int, long double > > >
operator!=(IndexPlaceholder<N_index1> d1, operator!=(IndexPlaceholder<N_index1> d1,
long double d2) long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<long double>, _bz_ArrayExprConstant<long double>,
NotEqual<int, long double> > NotEqual<int, long double> >
(d1, (d1,
_bz_ArrayExprConstant<long double>(d2)); _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// IndexPlaceholder<N_index1> != complex<T2> // IndexPlaceholder<N_index1> != complex<T2>
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
NotEqual<int, complex<T2> > > > NotEqual<int, complex<T2> > > >
operator!=(IndexPlaceholder<N_index1> d1, operator!=(IndexPlaceholder<N_index1> d1,
complex<T2> d2) complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<complex<T2> > , _bz_ArrayExprConstant<complex<T2> > ,
NotEqual<int, complex<T2> > > NotEqual<int, complex<T2> > >
(d1, (d1,
_bz_ArrayExprConstant<complex<T2> > (d2)); _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int != Array<T_numtype2, N_rank2> // int != Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<int, T_numtype2 > > > NotEqual<int, T_numtype2 > > >
operator!=(int d1, operator!=(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<int, T_numtype2> > NotEqual<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int != _bz_ArrayExpr<P_expr2> // int != _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<int, _bz_typename P_expr2::T_numtype > > > NotEqual<int, typename P_expr2::T_numtype > > >
operator!=(int d1, operator!=(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<int, _bz_typename P_expr2::T_numtype> > NotEqual<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int != IndexPlaceholder<N_index2> // int != IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<int, int > > > NotEqual<int, int > > >
operator!=(int d1, operator!=(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<int, int> > NotEqual<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// float != Array<T_numtype2, N_rank2> // float != Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<float, T_numtype2 > > > NotEqual<float, T_numtype2 > > >
operator!=(float d1, operator!=(float d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<float, T_numtype2> > NotEqual<float, T_numtype2> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2.begin()); d2.begin());
} }
// float != _bz_ArrayExpr<P_expr2> // float != _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<float, _bz_typename P_expr2::T_numtype > > > NotEqual<float, typename P_expr2::T_numtype > > >
operator!=(float d1, operator!=(float d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<float, _bz_typename P_expr2::T_numtype> > NotEqual<float, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// float != IndexPlaceholder<N_index2> // float != IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<float, int > > > NotEqual<float, int > > >
operator!=(float d1, operator!=(float d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<float, int> > NotEqual<float, int> >
(_bz_ArrayExprConstant<float>(d1), (_bz_ArrayExprConstant<float>(d1),
d2); d2);
} }
// double != Array<T_numtype2, N_rank2> // double != Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<double, T_numtype2 > > > NotEqual<double, T_numtype2 > > >
operator!=(double d1, operator!=(double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<double, T_numtype2> > NotEqual<double, T_numtype2> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2.begin()); d2.begin());
} }
// double != _bz_ArrayExpr<P_expr2> // double != _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<double, _bz_typename P_expr2::T_numtype > > > NotEqual<double, typename P_expr2::T_numtype > > >
operator!=(double d1, operator!=(double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<double, _bz_typename P_expr2::T_numtype> > NotEqual<double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// double != IndexPlaceholder<N_index2> // double != IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<double, int > > > NotEqual<double, int > > >
operator!=(double d1, operator!=(double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<double, int> > NotEqual<double, int> >
(_bz_ArrayExprConstant<double>(d1), (_bz_ArrayExprConstant<double>(d1),
d2); d2);
} }
// long double != Array<T_numtype2, N_rank2> // long double != Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<long double, T_numtype2 > > > NotEqual<long double, T_numtype2 > > >
operator!=(long double d1, operator!=(long double d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<long double, T_numtype2> > NotEqual<long double, T_numtype2> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2.begin()); d2.begin());
} }
// long double != _bz_ArrayExpr<P_expr2> // long double != _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<long double, _bz_typename P_expr2::T_numtype > > > NotEqual<long double, typename P_expr2::T_numtype > > >
operator!=(long double d1, operator!=(long double d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<long double, _bz_typename P_expr2::T_numtype> > NotEqual<long double, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
// long double != IndexPlaceholder<N_index2> // long double != IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<long double, int > > > NotEqual<long double, int > > >
operator!=(long double d1, operator!=(long double d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<long double, int> > NotEqual<long double, int> >
(_bz_ArrayExprConstant<long double>(d1), (_bz_ArrayExprConstant<long double>(d1),
d2); d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> != Array<T_numtype2, N_rank2> // complex<T1> != Array<T_numtype2, N_rank2>
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<complex<T1> , T_numtype2 > > > NotEqual<complex<T1> , T_numtype2 > > >
operator!=(complex<T1> d1, operator!=(complex<T1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
NotEqual<complex<T1> , T_numtype2> > NotEqual<complex<T1> , T_numtype2> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2.begin()); d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> != _bz_ArrayExpr<P_expr2> // complex<T1> != _bz_ArrayExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<complex<T1> , _bz_typename P_expr2::T_numtype > > > NotEqual<complex<T1> , typename P_expr2::T_numtype > > >
operator!=(complex<T1> d1, operator!=(complex<T1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
NotEqual<complex<T1> , _bz_typename P_expr2::T_numtype> > NotEqual<complex<T1> , typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> != IndexPlaceholder<N_index2> // complex<T1> != IndexPlaceholder<N_index2>
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<complex<T1> , int > > > NotEqual<complex<T1> , int > > >
operator!=(complex<T1> d1, operator!=(complex<T1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > ,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
NotEqual<complex<T1> , int> > NotEqual<complex<T1> , int> >
(_bz_ArrayExprConstant<complex<T1> > (d1), (_bz_ArrayExprConstant<complex<T1> > (d1),
d2); d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Logical AND operators * Logical AND operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> && Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> && Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalAnd<T_numtype1, T_numtype2 > > > LogicalAnd<T_numtype1, T_numtype2 > > >
operator&&(const Array<T_numtype1, N_rank1>& d1, operator&&(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalAnd<T_numtype1, T_numtype2> > LogicalAnd<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> && _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> && _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalAnd<T_numtype1, _bz_typename P_expr2::T_numtype > > > LogicalAnd<T_numtype1, typename P_expr2::T_numtype > > >
operator&&(const Array<T_numtype1, N_rank1>& d1, operator&&(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalAnd<T_numtype1, _bz_typename P_expr2::T_numtype> > LogicalAnd<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> && IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> && IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalAnd<T_numtype1, int > > > LogicalAnd<T_numtype1, int > > >
operator&&(const Array<T_numtype1, N_rank1>& d1, operator&&(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalAnd<T_numtype1, int> > LogicalAnd<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> && int // Array<T_numtype1, N_rank1> && int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalAnd<T_numtype1, int > > > LogicalAnd<T_numtype1, int > > >
operator&&(const Array<T_numtype1, N_rank1>& d1, operator&&(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalAnd<T_numtype1, int> > LogicalAnd<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> && Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> && Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalAnd<_bz_typename P_expr1::T_numtype, T_numtype2 > > > LogicalAnd<typename P_expr1::T_numtype, T_numtype2 > > >
operator&&(_bz_ArrayExpr<P_expr1> d1, operator&&(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalAnd<_bz_typename P_expr1::T_numtype, T_numtype2> > LogicalAnd<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> && _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> && _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype > > > LogicalAnd<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator&&(_bz_ArrayExpr<P_expr1> d1, operator&&(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype> > LogicalAnd<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> && IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> && IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalAnd<_bz_typename P_expr1::T_numtype, int > > > LogicalAnd<typename P_expr1::T_numtype, int > > >
operator&&(_bz_ArrayExpr<P_expr1> d1, operator&&(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalAnd<_bz_typename P_expr1::T_numtype, int> > LogicalAnd<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> && int // _bz_ArrayExpr<P_expr1> && int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalAnd<_bz_typename P_expr1::T_numtype, int > > > LogicalAnd<typename P_expr1::T_numtype, int > > >
operator&&(_bz_ArrayExpr<P_expr1> d1, operator&&(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalAnd<_bz_typename P_expr1::T_numtype, int> > LogicalAnd<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> && Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> && Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalAnd<int, T_numtype2 > > > LogicalAnd<int, T_numtype2 > > >
operator&&(IndexPlaceholder<N_index1> d1, operator&&(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalAnd<int, T_numtype2> > LogicalAnd<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> && _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> && _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalAnd<int, _bz_typename P_expr2::T_numtype > > > LogicalAnd<int, typename P_expr2::T_numtype > > >
operator&&(IndexPlaceholder<N_index1> d1, operator&&(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalAnd<int, _bz_typename P_expr2::T_numtype> > LogicalAnd<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> && IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> && IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalAnd<int, int > > > LogicalAnd<int, int > > >
operator&&(IndexPlaceholder<N_index1> d1, operator&&(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalAnd<int, int> > LogicalAnd<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> && int // IndexPlaceholder<N_index1> && int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalAnd<int, int > > > LogicalAnd<int, int > > >
operator&&(IndexPlaceholder<N_index1> d1, operator&&(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalAnd<int, int> > LogicalAnd<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// int && Array<T_numtype2, N_rank2> // int && Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalAnd<int, T_numtype2 > > > LogicalAnd<int, T_numtype2 > > >
operator&&(int d1, operator&&(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalAnd<int, T_numtype2> > LogicalAnd<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int && _bz_ArrayExpr<P_expr2> // int && _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalAnd<int, _bz_typename P_expr2::T_numtype > > > LogicalAnd<int, typename P_expr2::T_numtype > > >
operator&&(int d1, operator&&(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalAnd<int, _bz_typename P_expr2::T_numtype> > LogicalAnd<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int && IndexPlaceholder<N_index2> // int && IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalAnd<int, int > > > LogicalAnd<int, int > > >
operator&&(int d1, operator&&(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalAnd<int, int> > LogicalAnd<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
/************************************************************************** ** /************************************************************************** **
* Logical OR operators * Logical OR operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> || Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> || Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalOr<T_numtype1, T_numtype2 > > > LogicalOr<T_numtype1, T_numtype2 > > >
operator||(const Array<T_numtype1, N_rank1>& d1, operator||(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalOr<T_numtype1, T_numtype2> > LogicalOr<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> || _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> || _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalOr<T_numtype1, _bz_typename P_expr2::T_numtype > > > LogicalOr<T_numtype1, typename P_expr2::T_numtype > > >
operator||(const Array<T_numtype1, N_rank1>& d1, operator||(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalOr<T_numtype1, _bz_typename P_expr2::T_numtype> > LogicalOr<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> || IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> || IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalOr<T_numtype1, int > > > LogicalOr<T_numtype1, int > > >
operator||(const Array<T_numtype1, N_rank1>& d1, operator||(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalOr<T_numtype1, int> > LogicalOr<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> || int // Array<T_numtype1, N_rank1> || int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalOr<T_numtype1, int > > > LogicalOr<T_numtype1, int > > >
operator||(const Array<T_numtype1, N_rank1>& d1, operator||(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalOr<T_numtype1, int> > LogicalOr<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> || Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> || Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalOr<_bz_typename P_expr1::T_numtype, T_numtype2 > > > LogicalOr<typename P_expr1::T_numtype, T_numtype2 > > >
operator||(_bz_ArrayExpr<P_expr1> d1, operator||(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalOr<_bz_typename P_expr1::T_numtype, T_numtype2> > LogicalOr<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> || _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> || _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_nu mtype > > > LogicalOr<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator||(_bz_ArrayExpr<P_expr1> d1, operator||(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_nu mtype> > LogicalOr<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> || IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> || IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalOr<_bz_typename P_expr1::T_numtype, int > > > LogicalOr<typename P_expr1::T_numtype, int > > >
operator||(_bz_ArrayExpr<P_expr1> d1, operator||(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalOr<_bz_typename P_expr1::T_numtype, int> > LogicalOr<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> || int // _bz_ArrayExpr<P_expr1> || int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalOr<_bz_typename P_expr1::T_numtype, int > > > LogicalOr<typename P_expr1::T_numtype, int > > >
operator||(_bz_ArrayExpr<P_expr1> d1, operator||(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalOr<_bz_typename P_expr1::T_numtype, int> > LogicalOr<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> || Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> || Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalOr<int, T_numtype2 > > > LogicalOr<int, T_numtype2 > > >
operator||(IndexPlaceholder<N_index1> d1, operator||(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalOr<int, T_numtype2> > LogicalOr<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> || _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> || _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalOr<int, _bz_typename P_expr2::T_numtype > > > LogicalOr<int, typename P_expr2::T_numtype > > >
operator||(IndexPlaceholder<N_index1> d1, operator||(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalOr<int, _bz_typename P_expr2::T_numtype> > LogicalOr<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> || IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> || IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalOr<int, int > > > LogicalOr<int, int > > >
operator||(IndexPlaceholder<N_index1> d1, operator||(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalOr<int, int> > LogicalOr<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> || int // IndexPlaceholder<N_index1> || int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalOr<int, int > > > LogicalOr<int, int > > >
operator||(IndexPlaceholder<N_index1> d1, operator||(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
LogicalOr<int, int> > LogicalOr<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// int || Array<T_numtype2, N_rank2> // int || Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalOr<int, T_numtype2 > > > LogicalOr<int, T_numtype2 > > >
operator||(int d1, operator||(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
LogicalOr<int, T_numtype2> > LogicalOr<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int || _bz_ArrayExpr<P_expr2> // int || _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalOr<int, _bz_typename P_expr2::T_numtype > > > LogicalOr<int, typename P_expr2::T_numtype > > >
operator||(int d1, operator||(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
LogicalOr<int, _bz_typename P_expr2::T_numtype> > LogicalOr<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int || IndexPlaceholder<N_index2> // int || IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalOr<int, int > > > LogicalOr<int, int > > >
operator||(int d1, operator||(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
LogicalOr<int, int> > LogicalOr<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
/************************************************************************** ** /************************************************************************** **
* Bitwise XOR Operators * Bitwise XOR Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> ^ Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> ^ Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseXor<T_numtype1, T_numtype2 > > > BitwiseXor<T_numtype1, T_numtype2 > > >
operator^(const Array<T_numtype1, N_rank1>& d1, operator^(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseXor<T_numtype1, T_numtype2> > BitwiseXor<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> ^ _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> ^ _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseXor<T_numtype1, _bz_typename P_expr2::T_numtype > > > BitwiseXor<T_numtype1, typename P_expr2::T_numtype > > >
operator^(const Array<T_numtype1, N_rank1>& d1, operator^(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseXor<T_numtype1, _bz_typename P_expr2::T_numtype> > BitwiseXor<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> ^ IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> ^ IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseXor<T_numtype1, int > > > BitwiseXor<T_numtype1, int > > >
operator^(const Array<T_numtype1, N_rank1>& d1, operator^(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseXor<T_numtype1, int> > BitwiseXor<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> ^ int // Array<T_numtype1, N_rank1> ^ int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseXor<T_numtype1, int > > > BitwiseXor<T_numtype1, int > > >
operator^(const Array<T_numtype1, N_rank1>& d1, operator^(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseXor<T_numtype1, int> > BitwiseXor<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> ^ Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> ^ Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseXor<_bz_typename P_expr1::T_numtype, T_numtype2 > > > BitwiseXor<typename P_expr1::T_numtype, T_numtype2 > > >
operator^(_bz_ArrayExpr<P_expr1> d1, operator^(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseXor<_bz_typename P_expr1::T_numtype, T_numtype2> > BitwiseXor<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> ^ _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> ^ _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseXor<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype > > > BitwiseXor<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator^(_bz_ArrayExpr<P_expr1> d1, operator^(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseXor<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype> > BitwiseXor<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> ^ IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> ^ IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseXor<_bz_typename P_expr1::T_numtype, int > > > BitwiseXor<typename P_expr1::T_numtype, int > > >
operator^(_bz_ArrayExpr<P_expr1> d1, operator^(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseXor<_bz_typename P_expr1::T_numtype, int> > BitwiseXor<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> ^ int // _bz_ArrayExpr<P_expr1> ^ int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseXor<_bz_typename P_expr1::T_numtype, int > > > BitwiseXor<typename P_expr1::T_numtype, int > > >
operator^(_bz_ArrayExpr<P_expr1> d1, operator^(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseXor<_bz_typename P_expr1::T_numtype, int> > BitwiseXor<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> ^ Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> ^ Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseXor<int, T_numtype2 > > > BitwiseXor<int, T_numtype2 > > >
operator^(IndexPlaceholder<N_index1> d1, operator^(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseXor<int, T_numtype2> > BitwiseXor<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> ^ _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> ^ _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseXor<int, _bz_typename P_expr2::T_numtype > > > BitwiseXor<int, typename P_expr2::T_numtype > > >
operator^(IndexPlaceholder<N_index1> d1, operator^(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseXor<int, _bz_typename P_expr2::T_numtype> > BitwiseXor<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> ^ IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> ^ IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseXor<int, int > > > BitwiseXor<int, int > > >
operator^(IndexPlaceholder<N_index1> d1, operator^(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseXor<int, int> > BitwiseXor<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> ^ int // IndexPlaceholder<N_index1> ^ int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseXor<int, int > > > BitwiseXor<int, int > > >
operator^(IndexPlaceholder<N_index1> d1, operator^(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseXor<int, int> > BitwiseXor<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// int ^ Array<T_numtype2, N_rank2> // int ^ Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseXor<int, T_numtype2 > > > BitwiseXor<int, T_numtype2 > > >
operator^(int d1, operator^(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseXor<int, T_numtype2> > BitwiseXor<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int ^ _bz_ArrayExpr<P_expr2> // int ^ _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseXor<int, _bz_typename P_expr2::T_numtype > > > BitwiseXor<int, typename P_expr2::T_numtype > > >
operator^(int d1, operator^(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseXor<int, _bz_typename P_expr2::T_numtype> > BitwiseXor<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int ^ IndexPlaceholder<N_index2> // int ^ IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseXor<int, int > > > BitwiseXor<int, int > > >
operator^(int d1, operator^(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseXor<int, int> > BitwiseXor<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
/************************************************************************** ** /************************************************************************** **
* Bitwise And Operators * Bitwise And Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> & Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> & Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseAnd<T_numtype1, T_numtype2 > > > BitwiseAnd<T_numtype1, T_numtype2 > > >
operator&(const Array<T_numtype1, N_rank1>& d1, operator&(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseAnd<T_numtype1, T_numtype2> > BitwiseAnd<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> & _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> & _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseAnd<T_numtype1, _bz_typename P_expr2::T_numtype > > > BitwiseAnd<T_numtype1, typename P_expr2::T_numtype > > >
operator&(const Array<T_numtype1, N_rank1>& d1, operator&(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseAnd<T_numtype1, _bz_typename P_expr2::T_numtype> > BitwiseAnd<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> & IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> & IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseAnd<T_numtype1, int > > > BitwiseAnd<T_numtype1, int > > >
operator&(const Array<T_numtype1, N_rank1>& d1, operator&(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseAnd<T_numtype1, int> > BitwiseAnd<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> & int // Array<T_numtype1, N_rank1> & int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseAnd<T_numtype1, int > > > BitwiseAnd<T_numtype1, int > > >
operator&(const Array<T_numtype1, N_rank1>& d1, operator&(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseAnd<T_numtype1, int> > BitwiseAnd<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> & Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> & Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseAnd<_bz_typename P_expr1::T_numtype, T_numtype2 > > > BitwiseAnd<typename P_expr1::T_numtype, T_numtype2 > > >
operator&(_bz_ArrayExpr<P_expr1> d1, operator&(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseAnd<_bz_typename P_expr1::T_numtype, T_numtype2> > BitwiseAnd<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> & _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> & _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype > > > BitwiseAnd<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator&(_bz_ArrayExpr<P_expr1> d1, operator&(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype> > BitwiseAnd<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> & IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> & IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseAnd<_bz_typename P_expr1::T_numtype, int > > > BitwiseAnd<typename P_expr1::T_numtype, int > > >
operator&(_bz_ArrayExpr<P_expr1> d1, operator&(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseAnd<_bz_typename P_expr1::T_numtype, int> > BitwiseAnd<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> & int // _bz_ArrayExpr<P_expr1> & int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseAnd<_bz_typename P_expr1::T_numtype, int > > > BitwiseAnd<typename P_expr1::T_numtype, int > > >
operator&(_bz_ArrayExpr<P_expr1> d1, operator&(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseAnd<_bz_typename P_expr1::T_numtype, int> > BitwiseAnd<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> & Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> & Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseAnd<int, T_numtype2 > > > BitwiseAnd<int, T_numtype2 > > >
operator&(IndexPlaceholder<N_index1> d1, operator&(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseAnd<int, T_numtype2> > BitwiseAnd<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> & _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> & _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseAnd<int, _bz_typename P_expr2::T_numtype > > > BitwiseAnd<int, typename P_expr2::T_numtype > > >
operator&(IndexPlaceholder<N_index1> d1, operator&(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseAnd<int, _bz_typename P_expr2::T_numtype> > BitwiseAnd<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> & IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> & IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseAnd<int, int > > > BitwiseAnd<int, int > > >
operator&(IndexPlaceholder<N_index1> d1, operator&(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseAnd<int, int> > BitwiseAnd<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> & int // IndexPlaceholder<N_index1> & int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseAnd<int, int > > > BitwiseAnd<int, int > > >
operator&(IndexPlaceholder<N_index1> d1, operator&(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseAnd<int, int> > BitwiseAnd<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// int & Array<T_numtype2, N_rank2> // int & Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseAnd<int, T_numtype2 > > > BitwiseAnd<int, T_numtype2 > > >
operator&(int d1, operator&(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseAnd<int, T_numtype2> > BitwiseAnd<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int & _bz_ArrayExpr<P_expr2> // int & _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseAnd<int, _bz_typename P_expr2::T_numtype > > > BitwiseAnd<int, typename P_expr2::T_numtype > > >
operator&(int d1, operator&(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseAnd<int, _bz_typename P_expr2::T_numtype> > BitwiseAnd<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int & IndexPlaceholder<N_index2> // int & IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseAnd<int, int > > > BitwiseAnd<int, int > > >
operator&(int d1, operator&(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseAnd<int, int> > BitwiseAnd<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
/************************************************************************** ** /************************************************************************** **
* Bitwise Or Operators * Bitwise Or Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> | Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> | Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseOr<T_numtype1, T_numtype2 > > > BitwiseOr<T_numtype1, T_numtype2 > > >
operator|(const Array<T_numtype1, N_rank1>& d1, operator|(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseOr<T_numtype1, T_numtype2> > BitwiseOr<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> | _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> | _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseOr<T_numtype1, _bz_typename P_expr2::T_numtype > > > BitwiseOr<T_numtype1, typename P_expr2::T_numtype > > >
operator|(const Array<T_numtype1, N_rank1>& d1, operator|(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseOr<T_numtype1, _bz_typename P_expr2::T_numtype> > BitwiseOr<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> | IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> | IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseOr<T_numtype1, int > > > BitwiseOr<T_numtype1, int > > >
operator|(const Array<T_numtype1, N_rank1>& d1, operator|(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseOr<T_numtype1, int> > BitwiseOr<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> | int // Array<T_numtype1, N_rank1> | int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseOr<T_numtype1, int > > > BitwiseOr<T_numtype1, int > > >
operator|(const Array<T_numtype1, N_rank1>& d1, operator|(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseOr<T_numtype1, int> > BitwiseOr<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> | Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> | Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseOr<_bz_typename P_expr1::T_numtype, T_numtype2 > > > BitwiseOr<typename P_expr1::T_numtype, T_numtype2 > > >
operator|(_bz_ArrayExpr<P_expr1> d1, operator|(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseOr<_bz_typename P_expr1::T_numtype, T_numtype2> > BitwiseOr<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> | _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> | _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_nu mtype > > > BitwiseOr<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator|(_bz_ArrayExpr<P_expr1> d1, operator|(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_nu mtype> > BitwiseOr<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> | IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> | IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseOr<_bz_typename P_expr1::T_numtype, int > > > BitwiseOr<typename P_expr1::T_numtype, int > > >
operator|(_bz_ArrayExpr<P_expr1> d1, operator|(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseOr<_bz_typename P_expr1::T_numtype, int> > BitwiseOr<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> | int // _bz_ArrayExpr<P_expr1> | int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseOr<_bz_typename P_expr1::T_numtype, int > > > BitwiseOr<typename P_expr1::T_numtype, int > > >
operator|(_bz_ArrayExpr<P_expr1> d1, operator|(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseOr<_bz_typename P_expr1::T_numtype, int> > BitwiseOr<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> | Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> | Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseOr<int, T_numtype2 > > > BitwiseOr<int, T_numtype2 > > >
operator|(IndexPlaceholder<N_index1> d1, operator|(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseOr<int, T_numtype2> > BitwiseOr<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> | _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> | _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseOr<int, _bz_typename P_expr2::T_numtype > > > BitwiseOr<int, typename P_expr2::T_numtype > > >
operator|(IndexPlaceholder<N_index1> d1, operator|(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseOr<int, _bz_typename P_expr2::T_numtype> > BitwiseOr<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> | IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> | IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseOr<int, int > > > BitwiseOr<int, int > > >
operator|(IndexPlaceholder<N_index1> d1, operator|(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseOr<int, int> > BitwiseOr<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> | int // IndexPlaceholder<N_index1> | int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseOr<int, int > > > BitwiseOr<int, int > > >
operator|(IndexPlaceholder<N_index1> d1, operator|(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
BitwiseOr<int, int> > BitwiseOr<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// int | Array<T_numtype2, N_rank2> // int | Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseOr<int, T_numtype2 > > > BitwiseOr<int, T_numtype2 > > >
operator|(int d1, operator|(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
BitwiseOr<int, T_numtype2> > BitwiseOr<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int | _bz_ArrayExpr<P_expr2> // int | _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseOr<int, _bz_typename P_expr2::T_numtype > > > BitwiseOr<int, typename P_expr2::T_numtype > > >
operator|(int d1, operator|(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
BitwiseOr<int, _bz_typename P_expr2::T_numtype> > BitwiseOr<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int | IndexPlaceholder<N_index2> // int | IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseOr<int, int > > > BitwiseOr<int, int > > >
operator|(int d1, operator|(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
BitwiseOr<int, int> > BitwiseOr<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
/************************************************************************** ** /************************************************************************** **
* Shift right Operators * Shift right Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> >> Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> >> Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftRight<T_numtype1, T_numtype2 > > > ShiftRight<T_numtype1, T_numtype2 > > >
operator>>(const Array<T_numtype1, N_rank1>& d1, operator>>(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftRight<T_numtype1, T_numtype2> > ShiftRight<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> >> _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> >> _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftRight<T_numtype1, _bz_typename P_expr2::T_numtype > > > ShiftRight<T_numtype1, typename P_expr2::T_numtype > > >
operator>>(const Array<T_numtype1, N_rank1>& d1, operator>>(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftRight<T_numtype1, _bz_typename P_expr2::T_numtype> > ShiftRight<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> >> IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> >> IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftRight<T_numtype1, int > > > ShiftRight<T_numtype1, int > > >
operator>>(const Array<T_numtype1, N_rank1>& d1, operator>>(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftRight<T_numtype1, int> > ShiftRight<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> >> int // Array<T_numtype1, N_rank1> >> int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftRight<T_numtype1, int > > > ShiftRight<T_numtype1, int > > >
operator>>(const Array<T_numtype1, N_rank1>& d1, operator>>(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftRight<T_numtype1, int> > ShiftRight<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> >> Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> >> Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftRight<_bz_typename P_expr1::T_numtype, T_numtype2 > > > ShiftRight<typename P_expr1::T_numtype, T_numtype2 > > >
operator>>(_bz_ArrayExpr<P_expr1> d1, operator>>(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftRight<_bz_typename P_expr1::T_numtype, T_numtype2> > ShiftRight<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> >> _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> >> _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftRight<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype > > > ShiftRight<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator>>(_bz_ArrayExpr<P_expr1> d1, operator>>(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftRight<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype> > ShiftRight<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> >> IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> >> IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftRight<_bz_typename P_expr1::T_numtype, int > > > ShiftRight<typename P_expr1::T_numtype, int > > >
operator>>(_bz_ArrayExpr<P_expr1> d1, operator>>(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftRight<_bz_typename P_expr1::T_numtype, int> > ShiftRight<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> >> int // _bz_ArrayExpr<P_expr1> >> int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftRight<_bz_typename P_expr1::T_numtype, int > > > ShiftRight<typename P_expr1::T_numtype, int > > >
operator>>(_bz_ArrayExpr<P_expr1> d1, operator>>(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftRight<_bz_typename P_expr1::T_numtype, int> > ShiftRight<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> >> Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> >> Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftRight<int, T_numtype2 > > > ShiftRight<int, T_numtype2 > > >
operator>>(IndexPlaceholder<N_index1> d1, operator>>(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftRight<int, T_numtype2> > ShiftRight<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> >> _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> >> _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftRight<int, _bz_typename P_expr2::T_numtype > > > ShiftRight<int, typename P_expr2::T_numtype > > >
operator>>(IndexPlaceholder<N_index1> d1, operator>>(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftRight<int, _bz_typename P_expr2::T_numtype> > ShiftRight<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> >> IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> >> IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftRight<int, int > > > ShiftRight<int, int > > >
operator>>(IndexPlaceholder<N_index1> d1, operator>>(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftRight<int, int> > ShiftRight<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> >> int // IndexPlaceholder<N_index1> >> int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftRight<int, int > > > ShiftRight<int, int > > >
operator>>(IndexPlaceholder<N_index1> d1, operator>>(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftRight<int, int> > ShiftRight<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// int >> Array<T_numtype2, N_rank2> // int >> Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftRight<int, T_numtype2 > > > ShiftRight<int, T_numtype2 > > >
operator>>(int d1, operator>>(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftRight<int, T_numtype2> > ShiftRight<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int >> _bz_ArrayExpr<P_expr2> // int >> _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftRight<int, _bz_typename P_expr2::T_numtype > > > ShiftRight<int, typename P_expr2::T_numtype > > >
operator>>(int d1, operator>>(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftRight<int, _bz_typename P_expr2::T_numtype> > ShiftRight<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int >> IndexPlaceholder<N_index2> // int >> IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftRight<int, int > > > ShiftRight<int, int > > >
operator>>(int d1, operator>>(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftRight<int, int> > ShiftRight<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
/************************************************************************** ** /************************************************************************** **
* Shift left Operators * Shift left Operators
************************************************************************** **/ ************************************************************************** **/
// Array<T_numtype1, N_rank1> << Array<T_numtype2, N_rank2> // Array<T_numtype1, N_rank1> << Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftLeft<T_numtype1, T_numtype2 > > > ShiftLeft<T_numtype1, T_numtype2 > > >
operator<<(const Array<T_numtype1, N_rank1>& d1, operator<<(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftLeft<T_numtype1, T_numtype2> > ShiftLeft<T_numtype1, T_numtype2> >
(d1.begin(), (d1.begin(),
d2.begin()); d2.begin());
} }
// Array<T_numtype1, N_rank1> << _bz_ArrayExpr<P_expr2> // Array<T_numtype1, N_rank1> << _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftLeft<T_numtype1, _bz_typename P_expr2::T_numtype > > > ShiftLeft<T_numtype1, typename P_expr2::T_numtype > > >
operator<<(const Array<T_numtype1, N_rank1>& d1, operator<<(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftLeft<T_numtype1, _bz_typename P_expr2::T_numtype> > ShiftLeft<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> << IndexPlaceholder<N_index2> // Array<T_numtype1, N_rank1> << IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftLeft<T_numtype1, int > > > ShiftLeft<T_numtype1, int > > >
operator<<(const Array<T_numtype1, N_rank1>& d1, operator<<(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftLeft<T_numtype1, int> > ShiftLeft<T_numtype1, int> >
(d1.begin(), (d1.begin(),
d2); d2);
} }
// Array<T_numtype1, N_rank1> << int // Array<T_numtype1, N_rank1> << int
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftLeft<T_numtype1, int > > > ShiftLeft<T_numtype1, int > > >
operator<<(const Array<T_numtype1, N_rank1>& d1, operator<<(const Array<T_numtype1, N_rank1>& d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftLeft<T_numtype1, int> > ShiftLeft<T_numtype1, int> >
(d1.begin(), (d1.begin(),
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// _bz_ArrayExpr<P_expr1> << Array<T_numtype2, N_rank2> // _bz_ArrayExpr<P_expr1> << Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftLeft<_bz_typename P_expr1::T_numtype, T_numtype2 > > > ShiftLeft<typename P_expr1::T_numtype, T_numtype2 > > >
operator<<(_bz_ArrayExpr<P_expr1> d1, operator<<(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftLeft<_bz_typename P_expr1::T_numtype, T_numtype2> > ShiftLeft<typename P_expr1::T_numtype, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// _bz_ArrayExpr<P_expr1> << _bz_ArrayExpr<P_expr2> // _bz_ArrayExpr<P_expr1> << _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftLeft<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_nu mtype > > > ShiftLeft<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator<<(_bz_ArrayExpr<P_expr1> d1, operator<<(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftLeft<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_nu mtype> > ShiftLeft<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> << IndexPlaceholder<N_index2> // _bz_ArrayExpr<P_expr1> << IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftLeft<_bz_typename P_expr1::T_numtype, int > > > ShiftLeft<typename P_expr1::T_numtype, int > > >
operator<<(_bz_ArrayExpr<P_expr1> d1, operator<<(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftLeft<_bz_typename P_expr1::T_numtype, int> > ShiftLeft<typename P_expr1::T_numtype, int> >
(d1, (d1,
d2); d2);
} }
// _bz_ArrayExpr<P_expr1> << int // _bz_ArrayExpr<P_expr1> << int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftLeft<_bz_typename P_expr1::T_numtype, int > > > ShiftLeft<typename P_expr1::T_numtype, int > > >
operator<<(_bz_ArrayExpr<P_expr1> d1, operator<<(_bz_ArrayExpr<P_expr1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftLeft<_bz_typename P_expr1::T_numtype, int> > ShiftLeft<typename P_expr1::T_numtype, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// IndexPlaceholder<N_index1> << Array<T_numtype2, N_rank2> // IndexPlaceholder<N_index1> << Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftLeft<int, T_numtype2 > > > ShiftLeft<int, T_numtype2 > > >
operator<<(IndexPlaceholder<N_index1> d1, operator<<(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftLeft<int, T_numtype2> > ShiftLeft<int, T_numtype2> >
(d1, (d1,
d2.begin()); d2.begin());
} }
// IndexPlaceholder<N_index1> << _bz_ArrayExpr<P_expr2> // IndexPlaceholder<N_index1> << _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftLeft<int, _bz_typename P_expr2::T_numtype > > > ShiftLeft<int, typename P_expr2::T_numtype > > >
operator<<(IndexPlaceholder<N_index1> d1, operator<<(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftLeft<int, _bz_typename P_expr2::T_numtype> > ShiftLeft<int, typename P_expr2::T_numtype> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> << IndexPlaceholder<N_index2> // IndexPlaceholder<N_index1> << IndexPlaceholder<N_index2>
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftLeft<int, int > > > ShiftLeft<int, int > > >
operator<<(IndexPlaceholder<N_index1> d1, operator<<(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftLeft<int, int> > ShiftLeft<int, int> >
(d1, (d1,
d2); d2);
} }
// IndexPlaceholder<N_index1> << int // IndexPlaceholder<N_index1> << int
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftLeft<int, int > > > ShiftLeft<int, int > > >
operator<<(IndexPlaceholder<N_index1> d1, operator<<(IndexPlaceholder<N_index1> d1,
int d2) int d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>, _bz_ArrayExprConstant<int>,
ShiftLeft<int, int> > ShiftLeft<int, int> >
(d1, (d1,
_bz_ArrayExprConstant<int>(d2)); _bz_ArrayExprConstant<int>(d2));
} }
// int << Array<T_numtype2, N_rank2> // int << Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftLeft<int, T_numtype2 > > > ShiftLeft<int, T_numtype2 > > >
operator<<(int d1, operator<<(int d1,
const Array<T_numtype2, N_rank2>& d2) const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>, ArrayIterator<T_numtype2, N_rank2>,
ShiftLeft<int, T_numtype2> > ShiftLeft<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2.begin()); d2.begin());
} }
// int << _bz_ArrayExpr<P_expr2> // int << _bz_ArrayExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftLeft<int, _bz_typename P_expr2::T_numtype > > > ShiftLeft<int, typename P_expr2::T_numtype > > >
operator<<(int d1, operator<<(int d1,
_bz_ArrayExpr<P_expr2> d2) _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>, _bz_ArrayExpr<P_expr2>,
ShiftLeft<int, _bz_typename P_expr2::T_numtype> > ShiftLeft<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
// int << IndexPlaceholder<N_index2> // int << IndexPlaceholder<N_index2>
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<int>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftLeft<int, int > > > ShiftLeft<int, int > > >
operator<<(int d1, operator<<(int d1,
IndexPlaceholder<N_index2> d2) IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<int>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>, IndexPlaceholder<N_index2>,
ShiftLeft<int, int> > ShiftLeft<int, int> >
(_bz_ArrayExprConstant<int>(d1), (_bz_ArrayExprConstant<int>(d1),
d2); d2);
} }
/**************************************************************************
**
* Minimum Operators
**************************************************************************
**/
// Array<T_numtype1, N_rank1> min Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Min<T_numtype1, T_numtype2 > > >
min(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2)
{
return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Min<T_numtype1, T_numtype2> >
(d1.begin(),
d2.begin());
}
// Array<T_numtype1, N_rank1> min _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>,
_bz_Min<T_numtype1, typename P_expr2::T_numtype > > >
min(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2)
{
return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>,
_bz_Min<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(),
d2);
}
// Array<T_numtype1, N_rank1> min IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>,
_bz_Min<T_numtype1, int > > >
min(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2)
{
return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>,
_bz_Min<T_numtype1, int> >
(d1.begin(),
d2);
}
// Array<T_numtype1, N_rank1> min int
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>,
_bz_Min<T_numtype1, int > > >
min(const Array<T_numtype1, N_rank1>& d1,
int d2)
{
return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>,
_bz_Min<T_numtype1, int> >
(d1.begin(),
_bz_ArrayExprConstant<int>(d2));
}
// _bz_ArrayExpr<P_expr1> min Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Min<typename P_expr1::T_numtype, T_numtype2 > > >
min(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Min<typename P_expr1::T_numtype, T_numtype2> >
(d1,
d2.begin());
}
// _bz_ArrayExpr<P_expr1> min _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>,
_bz_Min<typename P_expr1::T_numtype, typename P_expr2::T_numtype > >
>
min(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>,
_bz_Min<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1,
d2);
}
// _bz_ArrayExpr<P_expr1> min IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>,
_bz_Min<typename P_expr1::T_numtype, int > > >
min(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>,
_bz_Min<typename P_expr1::T_numtype, int> >
(d1,
d2);
}
// _bz_ArrayExpr<P_expr1> min int
template<class P_expr1>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>,
_bz_Min<typename P_expr1::T_numtype, int > > >
min(_bz_ArrayExpr<P_expr1> d1,
int d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>,
_bz_Min<typename P_expr1::T_numtype, int> >
(d1,
_bz_ArrayExprConstant<int>(d2));
}
// IndexPlaceholder<N_index1> min Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Min<int, T_numtype2 > > >
min(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2)
{
return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Min<int, T_numtype2> >
(d1,
d2.begin());
}
// IndexPlaceholder<N_index1> min _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>,
_bz_Min<int, typename P_expr2::T_numtype > > >
min(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2)
{
return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>,
_bz_Min<int, typename P_expr2::T_numtype> >
(d1,
d2);
}
// IndexPlaceholder<N_index1> min IndexPlaceholder<N_index2>
template<int N_index1, int N_index2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>,
_bz_Min<int, int > > >
min(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2)
{
return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>,
_bz_Min<int, int> >
(d1,
d2);
}
// IndexPlaceholder<N_index1> min int
template<int N_index1>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>,
_bz_Min<int, int > > >
min(IndexPlaceholder<N_index1> d1,
int d2)
{
return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>,
_bz_Min<int, int> >
(d1,
_bz_ArrayExprConstant<int>(d2));
}
// int min Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Min<int, T_numtype2 > > >
min(int d1,
const Array<T_numtype2, N_rank2>& d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Min<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1),
d2.begin());
}
// int min _bz_ArrayExpr<P_expr2>
template<class P_expr2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>,
_bz_Min<int, typename P_expr2::T_numtype > > >
min(int d1,
_bz_ArrayExpr<P_expr2> d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>,
_bz_Min<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1),
d2);
}
// int min IndexPlaceholder<N_index2>
template<int N_index2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>,
_bz_Min<int, int > > >
min(int d1,
IndexPlaceholder<N_index2> d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>,
_bz_Min<int, int> >
(_bz_ArrayExprConstant<int>(d1),
d2);
}
/**************************************************************************
**
* Maximum Operators
**************************************************************************
**/
// Array<T_numtype1, N_rank1> max Array<T_numtype2, N_rank2>
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Max<T_numtype1, T_numtype2 > > >
max(const Array<T_numtype1, N_rank1>& d1,
const Array<T_numtype2, N_rank2>& d2)
{
return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Max<T_numtype1, T_numtype2> >
(d1.begin(),
d2.begin());
}
// Array<T_numtype1, N_rank1> max _bz_ArrayExpr<P_expr2>
template<class T_numtype1, int N_rank1, class P_expr2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>,
_bz_Max<T_numtype1, typename P_expr2::T_numtype > > >
max(const Array<T_numtype1, N_rank1>& d1,
_bz_ArrayExpr<P_expr2> d2)
{
return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExpr<P_expr2>,
_bz_Max<T_numtype1, typename P_expr2::T_numtype> >
(d1.begin(),
d2);
}
// Array<T_numtype1, N_rank1> max IndexPlaceholder<N_index2>
template<class T_numtype1, int N_rank1, int N_index2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>,
_bz_Max<T_numtype1, int > > >
max(const Array<T_numtype1, N_rank1>& d1,
IndexPlaceholder<N_index2> d2)
{
return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
IndexPlaceholder<N_index2>,
_bz_Max<T_numtype1, int> >
(d1.begin(),
d2);
}
// Array<T_numtype1, N_rank1> max int
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>,
_bz_Max<T_numtype1, int > > >
max(const Array<T_numtype1, N_rank1>& d1,
int d2)
{
return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ArrayExprConstant<int>,
_bz_Max<T_numtype1, int> >
(d1.begin(),
_bz_ArrayExprConstant<int>(d2));
}
// _bz_ArrayExpr<P_expr1> max Array<T_numtype2, N_rank2>
template<class P_expr1, class T_numtype2, int N_rank2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Max<typename P_expr1::T_numtype, T_numtype2 > > >
max(_bz_ArrayExpr<P_expr1> d1,
const Array<T_numtype2, N_rank2>& d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Max<typename P_expr1::T_numtype, T_numtype2> >
(d1,
d2.begin());
}
// _bz_ArrayExpr<P_expr1> max _bz_ArrayExpr<P_expr2>
template<class P_expr1, class P_expr2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>,
_bz_Max<typename P_expr1::T_numtype, typename P_expr2::T_numtype > >
>
max(_bz_ArrayExpr<P_expr1> d1,
_bz_ArrayExpr<P_expr2> d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExpr<P_expr2>,
_bz_Max<typename P_expr1::T_numtype, typename P_expr2::T_numtype> >
(d1,
d2);
}
// _bz_ArrayExpr<P_expr1> max IndexPlaceholder<N_index2>
template<class P_expr1, int N_index2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>,
_bz_Max<typename P_expr1::T_numtype, int > > >
max(_bz_ArrayExpr<P_expr1> d1,
IndexPlaceholder<N_index2> d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
IndexPlaceholder<N_index2>,
_bz_Max<typename P_expr1::T_numtype, int> >
(d1,
d2);
}
// _bz_ArrayExpr<P_expr1> max int
template<class P_expr1>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>,
_bz_Max<typename P_expr1::T_numtype, int > > >
max(_bz_ArrayExpr<P_expr1> d1,
int d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ArrayExprConstant<int>,
_bz_Max<typename P_expr1::T_numtype, int> >
(d1,
_bz_ArrayExprConstant<int>(d2));
}
// IndexPlaceholder<N_index1> max Array<T_numtype2, N_rank2>
template<int N_index1, class T_numtype2, int N_rank2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Max<int, T_numtype2 > > >
max(IndexPlaceholder<N_index1> d1,
const Array<T_numtype2, N_rank2>& d2)
{
return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Max<int, T_numtype2> >
(d1,
d2.begin());
}
// IndexPlaceholder<N_index1> max _bz_ArrayExpr<P_expr2>
template<int N_index1, class P_expr2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>,
_bz_Max<int, typename P_expr2::T_numtype > > >
max(IndexPlaceholder<N_index1> d1,
_bz_ArrayExpr<P_expr2> d2)
{
return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExpr<P_expr2>,
_bz_Max<int, typename P_expr2::T_numtype> >
(d1,
d2);
}
// IndexPlaceholder<N_index1> max IndexPlaceholder<N_index2>
template<int N_index1, int N_index2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>,
_bz_Max<int, int > > >
max(IndexPlaceholder<N_index1> d1,
IndexPlaceholder<N_index2> d2)
{
return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
IndexPlaceholder<N_index2>,
_bz_Max<int, int> >
(d1,
d2);
}
// IndexPlaceholder<N_index1> max int
template<int N_index1>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>,
_bz_Max<int, int > > >
max(IndexPlaceholder<N_index1> d1,
int d2)
{
return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>,
_bz_ArrayExprConstant<int>,
_bz_Max<int, int> >
(d1,
_bz_ArrayExprConstant<int>(d2));
}
// int max Array<T_numtype2, N_rank2>
template<class T_numtype2, int N_rank2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Max<int, T_numtype2 > > >
max(int d1,
const Array<T_numtype2, N_rank2>& d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
ArrayIterator<T_numtype2, N_rank2>,
_bz_Max<int, T_numtype2> >
(_bz_ArrayExprConstant<int>(d1),
d2.begin());
}
// int max _bz_ArrayExpr<P_expr2>
template<class P_expr2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>,
_bz_Max<int, typename P_expr2::T_numtype > > >
max(int d1,
_bz_ArrayExpr<P_expr2> d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
_bz_ArrayExpr<P_expr2>,
_bz_Max<int, typename P_expr2::T_numtype> >
(_bz_ArrayExprConstant<int>(d1),
d2);
}
// int max IndexPlaceholder<N_index2>
template<int N_index2>
inline
_bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>,
_bz_Max<int, int > > >
max(int d1,
IndexPlaceholder<N_index2> d2)
{
return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<int>,
IndexPlaceholder<N_index2>,
_bz_Max<int, int> >
(_bz_ArrayExprConstant<int>(d1),
d2);
}
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif #endif
 End of changes. 1441 change blocks. 
1448 lines changed or deleted 1938 lines changed or added


 bzdebug.h   bzdebug.h 
/************************************************************************** * /************************************************************************** *
* blitz/bzdebug.h Debugging macros * blitz/bzdebug.h Debugging macros
* *
* $Id: bzdebug.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: bzdebug.h,v 1.6 2004/10/06 21:58:33 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: bzdebug.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.7 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.6 1998/02/26 18:09:36 tveldhui
* Added testsuite support for precondition fail checking
*
* Revision 1.5 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.4 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.3 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
* Revision 1.2 1996/11/11 17:29:13 tveldhui
* Periodic RCS update
*
* Revision 1.1 1996/04/14 12:36:45 todd
* Initial revision
*
*
*/
#ifndef BZ_DEBUG_H #ifndef BZ_DEBUG_H
#define BZ_DEBUG_H #define BZ_DEBUG_H
#include <stdlib.h> #ifdef BZ_HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <assert.h> #include <assert.h>
#ifdef BZ_RTTI #ifdef BZ_HAVE_RTTI
#include <typeinfo> #include <typeinfo>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* These globals are used by the Blitz++ testsuite. The _bz_global * These globals are used by the Blitz++ testsuite. The _bz_global
* modifier ensures that they will reside in libblitz.a, but appear * modifier ensures that they will reside in libblitz.a, but appear
* "extern" elsewhere. * "extern" elsewhere.
*/ */
_bz_global _bz_bool assertFailMode BZ_GLOBAL_INIT(_bz_false); _bz_global bool assertFailMode BZ_GLOBAL_INIT(false);
_bz_global int assertFailCount BZ_GLOBAL_INIT(0); _bz_global int assertFailCount BZ_GLOBAL_INIT(0);
_bz_global int assertSuccessCount BZ_GLOBAL_INIT(0); _bz_global int assertSuccessCount BZ_GLOBAL_INIT(0);
#ifdef BZ_TESTSUITE #if defined(BZ_TESTSUITE)
/* /*
* In testsuite mode, these routines allow a test suite to check * In testsuite mode, these routines allow a test suite to check
* that precondition checking is being done properly. A typical * that precondition checking is being done properly. A typical
* use looks like this: * use looks like this:
* *
* beginCheckAssert(); * beginCheckAssert();
* // Some operation which should cause an assert to fail * // Some operation which should cause an assert to fail
* endCheckAssert(); * endCheckAssert();
* *
* The routine beginCheckAssert() sets a flag which results in * The routine beginCheckAssert() sets a flag which results in
* failed asserts being silently tallied. If no asserts have * failed asserts being silently tallied. If no asserts have
* failed by the time endCheckAssert() is invoked, the program * failed by the time endCheckAssert() is invoked, the program
* halts and issues an error code. * halts and issues an error code.
* *
* In normal operation (i.e. when beginCheckAssert() has not * In normal operation (i.e. when beginCheckAssert() has not
* been called), failed preconditions will cause the program * been called), failed preconditions will cause the program
* to halt and issue an error code. -- TV 980226 * to halt and issue an error code. -- TV 980226
*/ */
inline void checkAssert(_bz_bool condition, const char* where=0, inline void checkAssert(bool condition, const char* where=0,
int line=0) int line=0)
{ {
if (assertFailMode == _bz_true) if (assertFailMode == true)
{ {
if (condition == _bz_true) if (condition == true)
++assertSuccessCount; ++assertSuccessCount;
else else
++assertFailCount; ++assertFailCount;
} }
else { else {
if (!condition) if (!condition)
{ {
cerr << "Unexpected assert failure!" << endl; cerr << "Unexpected assert failure!" << endl;
if (where) if (where)
cerr << where << ":" << line << endl; cerr << where << ":" << line << endl;
cerr.flush(); cerr.flush();
assert(0); assert(0);
} }
} }
} }
inline void beginCheckAssert() inline void beginCheckAssert()
{ {
assertFailMode = _bz_true; assertFailMode = true;
assertSuccessCount = 0; assertSuccessCount = 0;
assertFailCount = 0; assertFailCount = 0;
} }
inline void endCheckAssert() inline void endCheckAssert()
{ {
assert(assertFailMode == _bz_true); assert(assertFailMode == true);
assertFailMode = _bz_false; assertFailMode = false;
if (assertFailCount == 0) if (assertFailCount == 0)
{ {
cerr << "Assert check failed!" << endl; cerr << "Assert check failed!" << endl;
assert(0); assert(0);
} }
} }
#define BZASSERT(X) checkAssert(X, __FILE__, __LINE__) #define BZASSERT(X) checkAssert(X, __FILE__, __LINE__)
#define BZPRECONDITION(X) checkAssert(X, __FILE__, __LINE__) #define BZPRECONDITION(X) checkAssert(X, __FILE__, __LINE__)
#define BZPOSTCONDITION(X) checkAssert(X, __FILE__, __LINE__) #define BZPOSTCONDITION(X) checkAssert(X, __FILE__, __LINE__)
#define BZSTATECHECK(X,Y) checkAssert(X == Y, __FILE__, __LINE__) #define BZSTATECHECK(X,Y) checkAssert(X == Y, __FILE__, __LINE__)
#define BZPRECHECK(X,Y) \ #define BZPRECHECK(X,Y) \
{ \ { \
if ((assertFailMode == _bz_false) && (!(X))) \ if ((assertFailMode == false) && (!(X))) \
cerr << Y << endl; \ cerr << Y << endl; \
checkAssert(X, __FILE__, __LINE__); \ checkAssert(X, __FILE__, __LINE__); \
} }
#define BZ_DEBUG_MESSAGE(X) \ #define BZ_DEBUG_MESSAGE(X) \
{ if (assertFailMode == _bz_false) { cout << __FILE__ << ":" << __L { \
INE__ << " " << X << endl; } } if (assertFailMode == false) \
{ \
cout << __FILE__ << ":" << __LINE__ << " " << X << endl; \
} \
}
#define BZ_DEBUG_PARAM(X) X
#define BZ_PRE_FAIL checkAssert(0) #define BZ_PRE_FAIL checkAssert(0)
#else #define BZ_ASM_DEBUG_MARKER
#ifdef BZ_DEBUG
#elif defined(BZ_DEBUG)
#define BZASSERT(X) assert(X) #define BZASSERT(X) assert(X)
#define BZPRECONDITION(X) assert(X) #define BZPRECONDITION(X) assert(X)
#define BZPOSTCONDITION(X) assert(X) #define BZPOSTCONDITION(X) assert(X)
#define BZSTATECHECK(X,Y) assert(X == Y) #define BZSTATECHECK(X,Y) assert(X == Y)
#define BZPRECHECK(X,Y) \ #define BZPRECHECK(X,Y)
{ if (!(X)) \
\ { if (!(X))
\
{ cerr << "[Blitz++] Precondition failure: Module " << __FILE__ \ { cerr << "[Blitz++] Precondition failure: Module " << __FILE__ \
<< " line " << __LINE__ << endl \ << " line " << __LINE__ << endl \
<< Y << endl; \ << Y << endl; \
cerr.flush(); \ cerr.flush(); \
assert(0); \ assert(0); \
} \ } \
} }
#define BZ_PRE_FAIL assert(0)
#define BZ_DEBUG_MESSAGE(X) \ #define BZ_DEBUG_MESSAGE(X) \
{ cout << __FILE__ << ":" << __LINE__ << " " << X << endl; } { cout << __FILE__ << ":" << __LINE__ << " " << X << endl; }
#define BZ_DEBUG_PARAM(X) X
#define BZ_PRE_FAIL assert(0)
// This routine doesn't exist anywhere; it's used to mark a
// position of interest in assembler (.s) files
void _bz_debug_marker(); void _bz_debug_marker();
#define BZ_ASM_DEBUG_MARKER _bz_debug_marker(); #define BZ_ASM_DEBUG_MARKER _bz_debug_marker();
#else // !BZ_DEBUG
#else // !BZ_TESTSUITE && !BZ_DEBUG
#define BZASSERT(X) #define BZASSERT(X)
#define BZPRECONDITION(X) #define BZPRECONDITION(X)
#define BZPOSTCONDITION(X) #define BZPOSTCONDITION(X)
#define BZSTATECHECK(X,Y) #define BZSTATECHECK(X,Y)
#define BZPRECHECK(X,Y) #define BZPRECHECK(X,Y)
#define BZ_PRE_FAIL
#define BZ_DEBUG_MESSAGE(X) #define BZ_DEBUG_MESSAGE(X)
#endif // !BZ_DEBUG #define BZ_DEBUG_PARAM(X)
#endif // !BZ_TESTSUITE #define BZ_PRE_FAIL
#define BZ_ASM_DEBUG_MARKER
// This routine doesn't exist anywhere; it's used to mark a #endif // !BZ_TESTSUITE && !BZ_DEBUG
// position of interest in assembler (.s) files
void _bz_debug_marker();
#define BZ_NOT_IMPLEMENTED() { cerr << "[Blitz++] Not implemented: module " \ #define BZ_NOT_IMPLEMENTED() { cerr << "[Blitz++] Not implemented: module " \
<< __FILE__ << " line " << __LINE__ << endl; \ << __FILE__ << " line " << __LINE__ << endl; \
exit(1); } exit(1); }
#ifdef BZ_RTTI #ifdef BZ_HAVE_RTTI
#define BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(X) typeid(X).name() #define BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(X) typeid(X).name()
#else #else
template<class T> template<typename T>
class _bz_stringLiteralForNumericType { class _bz_stringLiteralForNumericType {
public: public:
static const char* string() static const char* string()
{ return "unknown"; } { return "unknown"; }
}; };
#define BZ_DECL_SLFNT(X,Y) \ #define BZ_DECL_SLFNT(X,Y) \
template<> \ template<> \
class _bz_stringLiteralForNumericType< X > { \ class _bz_stringLiteralForNumericType< X > { \
public: \ public: \
static const char* string() \ static const char* string() \
{ return Y; } \ { return Y; } \
} }
#ifdef BZ_BOOL #ifdef BZ_HAVE_BOOL
BZ_DECL_SLFNT(bool, "bool"); BZ_DECL_SLFNT(bool, "bool");
#endif #endif
BZ_DECL_SLFNT(char, "char"); BZ_DECL_SLFNT(char, "char");
BZ_DECL_SLFNT(unsigned char, "unsigned char"); BZ_DECL_SLFNT(unsigned char, "unsigned char");
BZ_DECL_SLFNT(short int, "short int"); BZ_DECL_SLFNT(short int, "short int");
BZ_DECL_SLFNT(short unsigned int, "short unsigned int"); BZ_DECL_SLFNT(short unsigned int, "short unsigned int");
BZ_DECL_SLFNT(int, "int"); BZ_DECL_SLFNT(int, "int");
BZ_DECL_SLFNT(unsigned int, "unsigned int"); BZ_DECL_SLFNT(unsigned int, "unsigned int");
BZ_DECL_SLFNT(long, "long"); BZ_DECL_SLFNT(long, "long");
skipping to change at line 239 skipping to change at line 222
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
BZ_DECL_SLFNT(complex<float>, "complex<float>"); BZ_DECL_SLFNT(complex<float>, "complex<float>");
BZ_DECL_SLFNT(complex<double>, "complex<double>"); BZ_DECL_SLFNT(complex<double>, "complex<double>");
BZ_DECL_SLFNT(complex<long double>, "complex<long double>"); BZ_DECL_SLFNT(complex<long double>, "complex<long double>");
#endif #endif
#define BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(X) \ #define BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(X) \
_bz_stringLiteralForNumericType<X>::string() _bz_stringLiteralForNumericType<X>::string()
#endif // !BZ_RTTI #endif // !BZ_HAVE_RTTI
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_DEBUG_H #endif // BZ_DEBUG_H
 End of changes. 26 change blocks. 
67 lines changed or deleted 50 lines changed or added


 cartesian.h   cartesian.h 
/************************************************************************** * /************************************************************************** *
* blitz/array/cartesian.h Cartesian product of indirection containers * blitz/array/cartesian.h Cartesian product of indirection containers
* *
* $Id: cartesian.h,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: cartesian.h,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_CARTESIAN_H #ifndef BZ_ARRAY_CARTESIAN_H
#define BZ_ARRAY_CARTESIAN_H #define BZ_ARRAY_CARTESIAN_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* CartesianProduct<T_tuple,T_container> is an adaptor which represents * CartesianProduct<T_tuple,T_container> is an adaptor which represents
* the cartesian product of several containers. * the cartesian product of several containers.
*/ */
// forward declaration of iterator // forward declaration of iterator
template<class T_tuple, class T_container, int N_containers> template<typename T_tuple, typename T_container, int N_containers>
class CartesianProductIterator; class CartesianProductIterator;
struct _cp_end_tag { }; struct _cp_end_tag { };
template<class T_tuple, class T_container, int N_containers> template<typename T_tuple, typename T_container, int N_containers>
class CartesianProduct { class CartesianProduct {
public: public:
typedef T_tuple value_type; typedef T_tuple value_type;
typedef T_tuple& reference; typedef T_tuple& reference;
typedef const T_tuple& const_reference; typedef const T_tuple& const_reference;
typedef CartesianProductIterator<T_tuple,T_container,N_containers> iter ator; typedef CartesianProductIterator<T_tuple,T_container,N_containers> iter ator;
typedef int difference_type; typedef int difference_type;
typedef int size_type; typedef int size_type;
iterator begin() iterator begin()
skipping to change at line 81 skipping to change at line 73
CartesianProduct(const T_container& container0, CartesianProduct(const T_container& container0,
const T_container& container1, const T_container& container1,
const T_container& container2) const T_container& container2)
{ {
BZPRECONDITION(N_containers == 3); BZPRECONDITION(N_containers == 3);
containers_[0] = &container0; containers_[0] = &container0;
containers_[1] = &container1; containers_[1] = &container1;
containers_[2] = &container2; containers_[2] = &container2;
} }
CartesianProduct(const T_container& container0,
const T_container& container1,
const T_container& container2,
const T_container& container3)
{
BZPRECONDITION(N_containers == 4);
containers_[0] = &container0;
containers_[1] = &container1;
containers_[2] = &container2;
containers_[3] = &container3;
}
CartesianProduct(const T_container& container0,
const T_container& container1,
const T_container& container2,
const T_container& container3,
const T_container& container4)
{
BZPRECONDITION(N_containers == 5);
containers_[0] = &container0;
containers_[1] = &container1;
containers_[2] = &container2;
containers_[3] = &container3;
containers_[4] = &container4;
}
CartesianProduct(const T_container& container0,
const T_container& container1,
const T_container& container2,
const T_container& container3,
const T_container& container4,
const T_container& container5)
{
BZPRECONDITION(N_containers == 6);
containers_[0] = &container0;
containers_[1] = &container1;
containers_[2] = &container2;
containers_[3] = &container3;
containers_[4] = &container4;
containers_[5] = &container5;
}
CartesianProduct(const T_container& container0,
const T_container& container1,
const T_container& container2,
const T_container& container3,
const T_container& container4,
const T_container& container5,
const T_container& container6)
{
BZPRECONDITION(N_containers == 7);
containers_[0] = &container0;
containers_[1] = &container1;
containers_[2] = &container2;
containers_[3] = &container3;
containers_[4] = &container4;
containers_[5] = &container5;
containers_[6] = &container6;
}
CartesianProduct(const T_container& container0,
const T_container& container1,
const T_container& container2,
const T_container& container3,
const T_container& container4,
const T_container& container5,
const T_container& container6,
const T_container& container7)
{
BZPRECONDITION(N_containers == 8);
containers_[0] = &container0;
containers_[1] = &container1;
containers_[2] = &container2;
containers_[3] = &container3;
containers_[4] = &container4;
containers_[5] = &container5;
containers_[6] = &container6;
containers_[7] = &container7;
}
CartesianProduct(const T_container& container0,
const T_container& container1,
const T_container& container2,
const T_container& container3,
const T_container& container4,
const T_container& container5,
const T_container& container6,
const T_container& container7,
const T_container& container8)
{
BZPRECONDITION(N_containers == 9);
containers_[0] = &container0;
containers_[1] = &container1;
containers_[2] = &container2;
containers_[3] = &container3;
containers_[4] = &container4;
containers_[5] = &container5;
containers_[6] = &container6;
containers_[7] = &container7;
containers_[8] = &container8;
}
CartesianProduct(const T_container& container0,
const T_container& container1,
const T_container& container2,
const T_container& container3,
const T_container& container4,
const T_container& container5,
const T_container& container6,
const T_container& container7,
const T_container& container8,
const T_container& container9)
{
BZPRECONDITION(N_containers == 10);
containers_[0] = &container0;
containers_[1] = &container1;
containers_[2] = &container2;
containers_[3] = &container3;
containers_[4] = &container4;
containers_[5] = &container5;
containers_[6] = &container6;
containers_[7] = &container7;
containers_[8] = &container8;
containers_[9] = &container9;
}
CartesianProduct(const T_container& container0,
const T_container& container1,
const T_container& container2,
const T_container& container3,
const T_container& container4,
const T_container& container5,
const T_container& container6,
const T_container& container7,
const T_container& container8,
const T_container& container9,
const T_container& container10)
{
BZPRECONDITION(N_containers == 11);
containers_[0] = &container0;
containers_[1] = &container1;
containers_[2] = &container2;
containers_[3] = &container3;
containers_[4] = &container4;
containers_[5] = &container5;
containers_[6] = &container6;
containers_[7] = &container7;
containers_[8] = &container8;
containers_[9] = &container9;
containers_[10] = &container10;
}
const T_container& operator[](int i) const T_container& operator[](int i)
{ return *(containers_[i]); } { return *(containers_[i]); }
void debugDump(); void debugDump();
protected: protected:
const T_container* containers_[N_containers]; const T_container* containers_[N_containers];
}; };
template<class T_tuple, class T_container, int N_containers> template<typename T_tuple, typename T_container, int N_containers>
void CartesianProduct<T_tuple,T_container,N_containers>::debugDump() void CartesianProduct<T_tuple,T_container,N_containers>::debugDump()
{ {
cout << "Dump of CartesianProduct<..,..," << N_containers << ">" << end l; cout << "Dump of CartesianProduct<..,..," << N_containers << ">" << end l;
for (int i=0; i < N_containers; ++i) for (int i=0; i < N_containers; ++i)
{ {
cout << "Container " << (i+1) << ": "; cout << "Container " << (i+1) << ": ";
_bz_typename T_container::const_iterator iter = containers_[i]->beg in(), _bz_typename T_container::const_iterator iter = containers_[i]->beg in(),
end = containers_[i]->end(); end = containers_[i]->end();
for (; iter != end; ++iter) for (; iter != end; ++iter)
cout << (*iter) << '\t'; cout << (*iter) << '\t';
} }
} }
template<class T_tuple, class T_container, int N_containers> template<typename T_tuple, typename T_container, int N_containers>
class CartesianProductIterator { class CartesianProductIterator {
public: public:
typedef _bz_typename T_container::const_iterator citerator; typedef _bz_typename T_container::const_iterator citerator;
typedef CartesianProductIterator<T_tuple,T_container,N_containers> iter ator; typedef CartesianProductIterator<T_tuple,T_container,N_containers> iter ator;
typedef CartesianProduct<T_tuple,T_container,N_containers> T_cp; typedef CartesianProduct<T_tuple,T_container,N_containers> T_cp;
CartesianProductIterator(T_cp& container) CartesianProductIterator(T_cp& container)
{ {
for (int i=0; i < N_containers; ++i) for (int i=0; i < N_containers; ++i)
{ {
firstiters_[i] = container[i].begin(); firstiters_[i] = container[i].begin();
iters_[i] = firstiters_[i]; iters_[i] = firstiters_[i];
enditers_[i] = container[i].end(); enditers_[i] = container[i].end();
tuple_[i] = *iters_[i]; tuple_[i] = *iters_[i];
} }
endflag_ = _bz_false; endflag_ = false;
} }
void operator++(); void operator++();
CartesianProductIterator(_cp_end_tag) CartesianProductIterator(_cp_end_tag)
{ {
endflag_ = _bz_true; endflag_ = true;
} }
_bz_bool operator==(const iterator& x) const bool operator==(const iterator& x) const
{ {
return (endflag_ == x.endflag_); return (endflag_ == x.endflag_);
} }
_bz_bool operator!=(const iterator& x) const bool operator!=(const iterator& x) const
{ {
return endflag_ != x.endflag_; return endflag_ != x.endflag_;
} }
const T_tuple& operator*() const const T_tuple& operator*() const
{ return tuple_; } { return tuple_; }
protected: protected:
citerator iters_[N_containers]; citerator iters_[N_containers];
citerator firstiters_[N_containers]; citerator firstiters_[N_containers];
citerator enditers_[N_containers]; citerator enditers_[N_containers];
T_tuple tuple_; T_tuple tuple_;
_bz_bool endflag_; bool endflag_;
}; };
template<class T_tuple, class T_container, int N_containers> template<typename T_tuple, typename T_container, int N_containers>
void CartesianProductIterator<T_tuple, T_container, void CartesianProductIterator<T_tuple, T_container,
N_containers>::operator++() N_containers>::operator++()
{ {
// NEEDS_WORK: put in short-circuit for most common case
// (just increment the last iterator)
// Usual stack-style increment // Usual stack-style increment
const int Nminus1 = N_containers - 1; const int Nminus1 = N_containers - 1;
int i = Nminus1; int i = Nminus1;
for (; i >= 0; --i) // Short-circuit for most common case
// (just increment the last iterator)
if((++iters_[i]) != enditers_[i])
{
tuple_[i] = *iters_[i];
return;
}
// Less common cases
for (--i; i >= 0; --i)
{ {
++iters_[i]; ++iters_[i];
if (iters_[i] != enditers_[i]) if (iters_[i] != enditers_[i])
break; break;
} }
if (i == -1) if (i == -1)
{ {
endflag_ = _bz_true; endflag_ = true;
return; return;
} }
tuple_[i] = *iters_[i]; tuple_[i] = *iters_[i];
for (++i; i < N_containers; ++i) for (++i; i < N_containers; ++i)
{ {
iters_[i] = firstiters_[i]; iters_[i] = firstiters_[i];
tuple_[i] = *iters_[i]; tuple_[i] = *iters_[i];
} }
 End of changes. 16 change blocks. 
26 lines changed or deleted 178 lines changed or added


 cgsolve.h   cgsolve.h 
/************************************************************************** * /************************************************************************** *
* blitz/array/cgsolve.h Basic conjugate gradient solver for linear system s * blitz/array/cgsolve.h Basic conjugate gradient solver for linear system s
* *
* $Id: cgsolve.h,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: cgsolve.h,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_CGSOLVE_H #ifndef BZ_CGSOLVE_H
#define BZ_CGSOLVE_H #define BZ_CGSOLVE_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T_numtype> template<typename T_numtype>
void dump(const char* name, Array<T_numtype,3>& A) void dump(const char* name, Array<T_numtype,3>& A)
{ {
T_numtype normA = 0; T_numtype normA = 0;
for (int i=A.lbound(0); i <= A.ubound(0); ++i) for (int i=A.lbound(0); i <= A.ubound(0); ++i)
{ {
for (int j=A.lbound(1); j <= A.ubound(1); ++j) for (int j=A.lbound(1); j <= A.ubound(1); ++j)
{ {
for (int k=A.lbound(2); k <= A.ubound(2); ++k) for (int k=A.lbound(2); k <= A.ubound(2); ++k)
{ {
T_numtype tmp = A(i,j,k); T_numtype tmp = A(i,j,k);
normA += ::fabs(tmp); normA += ::fabs(tmp);
} }
} }
} }
normA /= A.numElements(); normA /= A.numElements();
cout << "Average magnitude of " << name << " is " << normA << endl; cout << "Average magnitude of " << name << " is " << normA << endl;
} }
template<class T_stencil, class T_numtype, int N_rank, class T_BCs> template<typename T_stencil, typename T_numtype, int N_rank, typename T_BCs >
int conjugateGradientSolver(T_stencil stencil, int conjugateGradientSolver(T_stencil stencil,
Array<T_numtype,N_rank>& x, Array<T_numtype,N_rank>& x,
Array<T_numtype,N_rank>& rhs, double haltrho, Array<T_numtype,N_rank>& rhs, double haltrho,
const T_BCs& boundaryConditions) const T_BCs& boundaryConditions)
{ {
// NEEDS_WORK: only apply CG updates over interior; need to handle // NEEDS_WORK: only apply CG updates over interior; need to handle
// BCs separately. // BCs separately.
// x = unknowns being solved for (initial guess assumed) // x = unknowns being solved for (initial guess assumed)
// r = residual // r = residual
 End of changes. 4 change blocks. 
12 lines changed or deleted 4 lines changed or added


 compiler.h   compiler.h 
/************************************************************************** * /************************************************************************** *
* blitz/compiler.h Compiler specific directives and kludges * blitz/compiler.h Compiler specific directives and kludges
* *
* $Id: compiler.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: compiler.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.7 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.6 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.5 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.4 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
* Revision 1.3 1996/11/11 17:29:13 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_COMPILER_H #ifndef BZ_COMPILER_H
#define BZ_COMPILER_H #define BZ_COMPILER_H
// The file <blitz/config.h> is generated automatically by the // The file <blitz/bzconfig.h> is used to select a compiler-specific
// script 'bzconfig', located in the 'compiler' directory. // config.h file that is generated automatically by configure.
#include <blitz/config.h> #include <blitz/bzconfig.h>
/* /*
* Define some kludges. * Define some kludges.
*/ */
#ifndef BZ_TEMPLATES #ifndef BZ_HAVE_TEMPLATES
#error In <blitz/config.h>: A working template implementation is requi red by Blitz++ (you may need to rerun the compiler/bzconfig script) #error In <blitz/config.h>: A working template implementation is requi red by Blitz++ (you may need to rerun the compiler/bzconfig script)
#endif #endif
#ifndef BZ_MEMBER_TEMPLATES #ifndef BZ_HAVE_MEMBER_TEMPLATES
#error In <blitz/config.h>: Your compiler does not support member templa tes. (you may need to rerun the compiler/bzconfig script) #error In <blitz/config.h>: Your compiler does not support member templa tes. (you may need to rerun the compiler/bzconfig script)
#endif #endif
#ifndef BZ_FULL_SPECIALIZATION_SYNTAX #ifndef BZ_HAVE_FULL_SPECIALIZATION_SYNTAX
#error In <blitz/config.h>: Your compiler does not support template<> ful l specialization syntax. You may need to rerun the compiler/bzconfig scrip t. #error In <blitz/config.h>: Your compiler does not support template<> ful l specialization syntax. You may need to rerun the compiler/bzconfig scrip t.
#endif #endif
#ifndef BZ_PARTIAL_ORDERING #ifndef BZ_HAVE_PARTIAL_ORDERING
#error In <blitz/config.h>: Your compiler does not support partial orderi ng (you may need to rerun the compiler/bzconfig script) #error In <blitz/config.h>: Your compiler does not support partial orderi ng (you may need to rerun the compiler/bzconfig script)
#endif #endif
#ifndef BZ_PARTIAL_SPECIALIZATION #ifndef BZ_HAVE_PARTIAL_SPECIALIZATION
#error In <blitz/config.h>: Your compiler does not support partial specia lization (you may need to rerun the compiler/bzconfig script) #error In <blitz/config.h>: Your compiler does not support partial specia lization (you may need to rerun the compiler/bzconfig script)
#endif #endif
#ifdef BZ_NAMESPACES #ifdef BZ_HAVE_NAMESPACES
#define BZ_NAMESPACE(X) namespace X { #define BZ_NAMESPACE(X) namespace X {
#define BZ_NAMESPACE_END } #define BZ_NAMESPACE_END }
#define BZ_USING_NAMESPACE(X) using namespace X; #define BZ_USING_NAMESPACE(X) using namespace X;
#else #else
#define BZ_NAMESPACE(X) #define BZ_NAMESPACE(X)
#define BZ_NAMESPACE_END #define BZ_NAMESPACE_END
#define BZ_USING_NAMESPACE(X) #define BZ_USING_NAMESPACE(X)
#endif #endif
#ifdef BZ_TEMPLATE_QUALIFIED_RETURN_TYPE #ifdef BZ_HAVE_TEMPLATE_QUALIFIED_RETURN_TYPE
#define BZ_USE_NUMTRAIT #define BZ_USE_NUMTRAIT
#endif #endif
#ifdef BZ_DEFAULT_TEMPLATE_PARAMETERS #ifdef BZ_HAVE_DEFAULT_TEMPLATE_PARAMETERS
#define BZ_TEMPLATE_DEFAULT(X) = X #define BZ_TEMPLATE_DEFAULT(X) = X
#else #else
#define BZ_TEMPLATE_DEFAULT #define BZ_TEMPLATE_DEFAULT
#endif #endif
#ifdef BZ_EXPLICIT #ifndef BZ_HAVE_EXPLICIT
#define _bz_explicit explicit #define explicit
#else
#define _bz_explicit
#endif #endif
#ifdef BZ_TYPENAME #ifdef BZ_HAVE_TYPENAME
#define _bz_typename typename #define _bz_typename typename
#else #else
#define _bz_typename #define _bz_typename
#endif #endif
#ifdef BZ_MUTABLE #ifndef BZ_HAVE_MUTABLE
#define _bz_mutable mutable #define mutable
#else
#define _bz_mutable
#endif #endif
#ifdef BZ_DISABLE_RESTRICT #ifdef BZ_DISABLE_RESTRICT
#undef BZ_NCEG_RESTRICT #undef BZ_HAVE_NCEG_RESTRICT
#endif #endif
#ifdef BZ_NCEG_RESTRICT #ifndef BZ_HAVE_NCEG_RESTRICT
#define _bz_restrict restrict #if defined(BZ_HAVE_NCEG_RESTRICT_EGCS)
#elif defined(BZ_NCEG_RESTRICT_EGCS) #define restrict __restrict__
#define _bz_restrict __restrict__ #else
#else #define restrict
#define _bz_restrict #endif
#endif #endif
#ifdef BZ_BOOL #if !defined(BZ_HAVE_BOOL) && !defined(BZ_NO_BOOL_KLUDGE)
#define _bz_bool bool #define bool int
#define _bz_true true #define true 1
#define _bz_false false #define false 0
#else
#define _bz_bool int
#define _bz_true 1
#define _bz_false 0
#endif #endif
#ifdef BZ_ENUM_COMPUTATIONS_WITH_CAST #ifdef BZ_HAVE_ENUM_COMPUTATIONS_WITH_CAST
#define BZ_ENUM_CAST(X) (int)X #define BZ_ENUM_CAST(X) (int)X
#elif defined(BZ_ENUM_COMPUTATIONS) #elif defined(BZ_HAVE_ENUM_COMPUTATIONS)
#define BZ_ENUM_CAST(X) X #define BZ_ENUM_CAST(X) X
#else #else
#error In <blitz/config.h>: Your compiler does not support enum computa tions. You may have to rerun compiler/bzconfig. #error In <blitz/config.h>: Your compiler does not support enum computa tions. You may have to rerun compiler/bzconfig.
#endif #endif
#if defined(BZ_MATH_FN_IN_NAMESPACE_STD) #if defined(BZ_MATH_FN_IN_NAMESPACE_STD)
#define BZ_MATHFN_SCOPE(x) std::x #define BZ_MATHFN_SCOPE(x) std::x
#elif defined(BZ_NAMESPACES) #elif defined(BZ_HAVE_NAMESPACES)
#define BZ_MATHFN_SCOPE(x) ::x #define BZ_MATHFN_SCOPE(x) ::x
#else #else
#define BZ_MATHFN_SCOPE(x) x #define BZ_MATHFN_SCOPE(x) x
#endif #endif
#if defined(BZ_COMPLEX_MATH_IN_NAMESPACE_STD) #if defined(BZ_HAVE_COMPLEX_MATH_IN_NAMESPACE_STD)
#define BZ_CMATHFN_SCOPE(x) std::x #define BZ_CMATHFN_SCOPE(x) std::x
#elif defined(BZ_NAMESPACES) #elif defined(BZ_HAVE_NAMESPACES)
#define BZ_CMATHFN_SCOPE(x) ::x #define BZ_CMATHFN_SCOPE(x) ::x
#else #else
#define BZ_CMATHFN_SCOPE(x) x #define BZ_CMATHFN_SCOPE(x) x
#endif #endif
#if defined(BZ_NAMESPACES) #if defined(BZ_HAVE_NAMESPACES)
#define BZ_IEEEMATHFN_SCOPE(x) ::x #define BZ_IEEEMATHFN_SCOPE(x) ::x
#else #else
#define BZ_IEEEMATHFN_SCOPE(x) x #define BZ_IEEEMATHFN_SCOPE(x) x
#endif #endif
#if defined(BZ_NAMESPACES) #if defined(BZ_HAVE_NAMESPACES)
#define BZ_BLITZ_SCOPE(x) blitz::x #define BZ_BLITZ_SCOPE(x) blitz::x
#else #else
#define BZ_BLITZ_SCOPE(x) ::x #define BZ_BLITZ_SCOPE(x) ::x
#endif #endif
#if defined(BZ_NAMESPACES) #if defined(BZ_HAVE_NAMESPACES) && defined(BZ_HAVE_STD)
#define BZ_STD_SCOPE(x) std::x #define BZ_STD_SCOPE(x) std::x
#else #else
#define BZ_STD_SCOPE(x) ::x #define BZ_STD_SCOPE(x) ::x
#endif #endif
#endif // BZ_COMPILER_H #endif // BZ_COMPILER_H
 End of changes. 26 change blocks. 
71 lines changed or deleted 37 lines changed or added


 complex.cc   complex.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/complex.cc Special functions for complex arrays * blitz/array/complex.cc Special functions for complex arrays
* *
* $Id: complex.cc,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: complex.cc,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
// Special functions for complex arrays
#ifndef BZ_ARRAYCOMPLEX_CC #ifndef BZ_ARRAYCOMPLEX_CC
#define BZ_ARRAYCOMPLEX_CC #define BZ_ARRAYCOMPLEX_CC
// Special functions for complex arrays
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/complex.cc> must be included via <blitz/array/array.h> #error <blitz/array/complex.cc> must be included via <blitz/array/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
inline Array<T_numtype, N_rank> real(const Array<complex<T_numtype>,N_rank> & A) inline Array<T_numtype, N_rank> real(const Array<complex<T_numtype>,N_rank> & A)
{ {
return A.extractComponent(T_numtype(), 0, 2); return A.extractComponent(T_numtype(), 0, 2);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
inline Array<T_numtype, N_rank> imag(const Array<complex<T_numtype>,N_rank> & A) inline Array<T_numtype, N_rank> imag(const Array<complex<T_numtype>,N_rank> & A)
{ {
return A.extractComponent(T_numtype(), 1, 2); return A.extractComponent(T_numtype(), 1, 2);
} }
#endif #endif
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ARRAYCOMPLEX_CC #endif // BZ_ARRAYCOMPLEX_CC
 End of changes. 5 change blocks. 
14 lines changed or deleted 6 lines changed or added


 convolve.cc   convolve.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/convolve.cc One-dimensional convolution * blitz/array/convolve.cc One-dimensional convolution
* *
* $Id: convolve.cc,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: convolve.cc,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_CONVOLVE_CC #ifndef BZ_ARRAY_CONVOLVE_CC
#define BZ_ARRAY_CONVOLVE_CC #define BZ_ARRAY_CONVOLVE_CC
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T> template<typename T>
Array<T,1> convolve(const Array<T,1>& B, const Array<T,1>& C) Array<T,1> convolve(const Array<T,1>& B, const Array<T,1>& C)
{ {
int Bl = B.lbound(0), Bh = B.ubound(0); int Bl = B.lbound(0), Bh = B.ubound(0);
int Cl = C.lbound(0), Ch = C.ubound(0); int Cl = C.lbound(0), Ch = C.ubound(0);
int lbound = Bl + Cl; int lbound = Bl + Cl;
int ubound = Bh + Ch; int ubound = Bh + Ch;
Array<T,1> A(Range(lbound,ubound)); Array<T,1> A(Range(lbound,ubound));
 End of changes. 3 change blocks. 
10 lines changed or deleted 3 lines changed or added


 convolve.h   convolve.h 
/************************************************************************** * /************************************************************************** *
* blitz/array/convolve.h One-dimensional convolution * blitz/array/convolve.h One-dimensional convolution
* *
* $Id: convolve.h,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: convolve.h,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_CONVOLVE_H #ifndef BZ_ARRAY_CONVOLVE_H
#define BZ_ARRAY_CONVOLVE_H #define BZ_ARRAY_CONVOLVE_H
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/convolve.h> must be included after <blitz/array.h> #error <blitz/array/convolve.h> must be included after <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T> template<typename T>
Array<T,1> convolve(const Array<T,1>& B, const Array<T,1>& C); Array<T,1> convolve(const Array<T,1>& B, const Array<T,1>& C);
BZ_NAMESPACE_END BZ_NAMESPACE_END
#include <blitz/array/convolve.cc> #include <blitz/array/convolve.cc>
#endif // BZ_ARRAY_CONVOLVE_H #endif // BZ_ARRAY_CONVOLVE_H
 End of changes. 3 change blocks. 
11 lines changed or deleted 3 lines changed or added


 cycle.cc   cycle.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/cycle.cc Cycle arrays for time-stepping of PDEs. * blitz/array/cycle.cc Cycle arrays for time-stepping of PDEs.
* *
* $Id: cycle.cc,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: cycle.cc,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYCYCLE_CC #ifndef BZ_ARRAYCYCLE_CC
#define BZ_ARRAYCYCLE_CC #define BZ_ARRAYCYCLE_CC
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/cycle.cc> must be included via <blitz/array.h> #error <blitz/array/cycle.cc> must be included via <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void cycleArrays(Array<T_numtype, N_rank>& a, Array<T_numtype, N_rank>& b) void cycleArrays(Array<T_numtype, N_rank>& a, Array<T_numtype, N_rank>& b)
{ {
Array<T_numtype, N_rank> tmp(a); Array<T_numtype, N_rank> tmp(a);
a.reference(b); a.reference(b);
b.reference(tmp); b.reference(tmp);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void cycleArrays(Array<T_numtype, N_rank>& a, Array<T_numtype, N_rank>& b, void cycleArrays(Array<T_numtype, N_rank>& a, Array<T_numtype, N_rank>& b,
Array<T_numtype, N_rank>& c) Array<T_numtype, N_rank>& c)
{ {
Array<T_numtype, N_rank> tmp(a); Array<T_numtype, N_rank> tmp(a);
a.reference(b); a.reference(b);
b.reference(c); b.reference(c);
c.reference(tmp); c.reference(tmp);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void cycleArrays(Array<T_numtype, N_rank>& a, Array<T_numtype, N_rank>& b, void cycleArrays(Array<T_numtype, N_rank>& a, Array<T_numtype, N_rank>& b,
Array<T_numtype, N_rank>& c, Array<T_numtype, N_rank>& d) Array<T_numtype, N_rank>& c, Array<T_numtype, N_rank>& d)
{ {
Array<T_numtype, N_rank> tmp(a); Array<T_numtype, N_rank> tmp(a);
a.reference(b); a.reference(b);
b.reference(c); b.reference(c);
c.reference(d); c.reference(d);
d.reference(tmp); d.reference(tmp);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void cycleArrays(Array<T_numtype, N_rank>& a, Array<T_numtype, N_rank>& b, void cycleArrays(Array<T_numtype, N_rank>& a, Array<T_numtype, N_rank>& b,
Array<T_numtype, N_rank>& c, Array<T_numtype, N_rank>& d, Array<T_numtype, N_rank>& c, Array<T_numtype, N_rank>& d,
Array<T_numtype, N_rank>& e) Array<T_numtype, N_rank>& e)
{ {
Array<T_numtype, N_rank> tmp(a); Array<T_numtype, N_rank> tmp(a);
a.reference(b); a.reference(b);
b.reference(c); b.reference(c);
c.reference(d); c.reference(d);
d.reference(e); d.reference(e);
e.reference(tmp); e.reference(tmp);
 End of changes. 6 change blocks. 
14 lines changed or deleted 6 lines changed or added


 default.h   default.h 
skipping to change at line 46 skipping to change at line 46
class IRNGWrapper { class IRNGWrapper {
}; };
template<typename IRNG> template<typename IRNG>
class IRNGWrapper<IRNG,sharedState> { class IRNGWrapper<IRNG,sharedState> {
public: public:
void seed(IRNG_int x) void seed(IRNG_int x)
{ irng_.seed(x); } { irng_.seed(x); }
typedef typename IRNG::T_state T_state;
T_state getState() const { return irng_.getState(); }
std::string getStateString() const { return irng_.getStateString(); }
void setState(const T_state& s) { irng_.setState(s); }
void setState(const std::string& s) { irng_.setState(s); }
protected: protected:
static IRNG irng_; static IRNG irng_;
}; };
template<typename IRNG> template<typename IRNG>
IRNG IRNGWrapper<IRNG,sharedState>::irng_; IRNG IRNGWrapper<IRNG,sharedState>::irng_;
template<typename IRNG> template<typename IRNG>
class IRNGWrapper<IRNG,independentState> { class IRNGWrapper<IRNG,independentState> {
public: public:
void seed(IRNG_int x) void seed(IRNG_int x)
{ irng_.seed(x); } { irng_.seed(x); }
typedef typename IRNG::T_state T_state;
T_state getState() const { return irng_.getState(); }
std::string getStateString() const { return irng_.getStateString(); }
void setState(const T_state& s) { irng_.setState(s); }
void setState(const std::string& s) { irng_.setState(s); }
protected: protected:
IRNG irng_; IRNG irng_;
}; };
// defaultIRNG is a type alias for the default Integer Random // defaultIRNG is a type alias for the default Integer Random
// Number Generator (IRNG). // Number Generator (IRNG).
typedef MersenneTwister defaultIRNG; typedef MersenneTwister defaultIRNG;
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 2 change blocks. 
0 lines changed or deleted 12 lines changed or added


 domain.h   domain.h 
/************************************************************************** * /************************************************************************** *
* blitz/array/domain.h Declaration of the RectDomain class * blitz/array/domain.h Declaration of the RectDomain class
* *
* $Id: domain.h,v 1.3 2001/02/11 15:43:39 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: domain.h,v $
* Revision 1.3 2001/02/11 15:43:39 tveldhui
* Additions from Julian Cummings:
* - StridedDomain class
* - more versions of resizeAndPreserve
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_DOMAIN_H #ifndef BZ_DOMAIN_H
#define BZ_DOMAIN_H #define BZ_DOMAIN_H
#ifndef BZ_TINYVEC_H #include <blitz/tinyvec.h>
#include <blitz/tinyvec.h> #include <blitz/range.h>
#endif
#ifndef BZ_RANGE_H
#include <blitz/range.h>
#endif
/* /*
* Portions of this class were inspired by the "RectDomain" class * Portions of this class were inspired by the "RectDomain" class
* provided by the Titanium language (UC Berkeley). * provided by the Titanium language (UC Berkeley).
*/ */
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<int N_rank> template<int N_rank>
class RectDomain { class RectDomain {
typedef TinyVector<int,N_rank> Bounds;
public: public:
RectDomain(const TinyVector<int,N_rank>& lbound,
const TinyVector<int,N_rank>& ubound) RectDomain() { }
: lbound_(lbound), ubound_(ubound) RectDomain(const Bounds& lbound,const Bounds& ubound): lbound_(lbound),
{ } ubound_(ubound) { }
RectDomain(const TinyVector<Range,N_rank>& bounds): lbound_(),ubound_()
{
for (int i=0;i<N_rank;++i) {
lbound_(i) = bounds(i).first();
ubound_(i) = bounds(i).last();
}
}
// NEEDS_WORK: better constructors // NEEDS_WORK: better constructors
// RectDomain(Range, Range, ...) // RectDomain(Range, Range, ...)
// RectDomain with any combination of Range and int // RectDomain with any combination of Range and int
const TinyVector<int,N_rank>& lbound() const Bounds& lbound() { return lbound_; }
{ return lbound_; } Bounds& ubound() { return ubound_; }
const Bounds& lbound() const { return lbound_; }
int lbound(int i) const const Bounds& ubound() const { return ubound_; }
{ return lbound_(i); }
const TinyVector<int,N_rank>& ubound() const
{ return ubound_; }
int ubound(int i) const int& lbound(const int i) { return lbound_(i); }
{ return ubound_(i); } int& ubound(const int i) { return ubound_(i); }
int lbound(const int i) const { return lbound_(i); }
int ubound(const int i) const { return ubound_(i); }
Range operator[](int rank) const Range operator[](const int rank) const { return Range(lbound_(rank), ub
{ return Range(lbound_(rank), ubound_(rank)); } ound_(rank)); }
void shrink(int amount) void shrink(const int amount) {
{
lbound_ += amount; lbound_ += amount;
ubound_ -= amount; ubound_ -= amount;
} }
void shrink(int dim, int amount) void shrink(const int dim,const int amount) {
{
lbound_(dim) += amount; lbound_(dim) += amount;
ubound_(dim) -= amount; ubound_(dim) -= amount;
} }
void expand(int amount) void expand(const int amount) {
{
lbound_ -= amount; lbound_ -= amount;
ubound_ += amount; ubound_ += amount;
} }
void expand(int dim, int amount) void expand(const int dim,const int amount) {
{
lbound_(dim) -= amount; lbound_(dim) -= amount;
ubound_(dim) += amount; ubound_(dim) += amount;
} }
private: private:
TinyVector<int,N_rank> lbound_, ubound_;
Bounds lbound_;
Bounds ubound_;
}; };
/* /*
* StridedDomain added by Julian Cummings * StridedDomain added by Julian Cummings
*/ */
template<int N_rank> template<int N_rank>
class StridedDomain { class StridedDomain {
typedef TinyVector<int,N_rank> Bounds;
typedef TinyVector<int,N_rank> Strides;
public: public:
StridedDomain(const TinyVector<int,N_rank>& lbound,
const TinyVector<int,N_rank>& ubound, StridedDomain(const Bounds& lbound,const Bounds& ubound,const Strides&
const TinyVector<int,N_rank>& stride) stride):
: lbound_(lbound), ubound_(ubound), stride_(stride) lbound_(lbound),ubound_(ubound),stride_(stride) { }
{ }
// NEEDS_WORK: better constructors // NEEDS_WORK: better constructors
// StridedDomain(Range, Range, ...) // StridedDomain(Range, Range, ...)
// StridedDomain with any combination of Range and int // StridedDomain with any combination of Range and int
const TinyVector<int,N_rank>& lbound() const const Bounds& lbound() const { return lbound_; }
{ return lbound_; } const Bounds& ubound() const { return ubound_; }
const Strides& stride() const { return stride_; }
int lbound(int i) const
{ return lbound_(i); }
const TinyVector<int,N_rank>& ubound() const
{ return ubound_; }
int ubound(int i) const
{ return ubound_(i); }
const TinyVector<int,N_rank>& stride() const
{ return stride_; }
int stride(int i) const int lbound(const int i) const { return lbound_(i); }
{ return stride_(i); } int ubound(const int i) const { return ubound_(i); }
int stride(const int i) const { return stride_(i); }
Range operator[](int rank) const Range operator[](const int rank) const { return Range(lbound_(rank),ubo
{ return Range(lbound_(rank), ubound_(rank), stride_(rank)); } und_(rank),stride_(rank)); }
void shrink(int amount) void shrink(const int amount) {
{ lbound_ += amount*stride_;
lbound_ += amount * stride_; ubound_ -= amount*stride_;
ubound_ -= amount * stride_;
} }
void shrink(int dim, int amount) void shrink(const int dim,const int amount) {
{ lbound_(dim) += amount*stride_(dim);
lbound_(dim) += amount * stride_(dim); ubound_(dim) -= amount*stride_(dim);
ubound_(dim) -= amount * stride_(dim);
} }
void expand(int amount) void expand(const int amount) {
{ lbound_ -= amount*stride_;
lbound_ -= amount * stride_; ubound_ += amount*stride_;
ubound_ += amount * stride_;
} }
void expand(int dim, int amount) void expand(const int dim,const int amount) {
{ lbound_(dim) -= amount*stride_(dim);
lbound_(dim) -= amount * stride_(dim); ubound_(dim) += amount*stride_(dim);
ubound_(dim) += amount * stride_(dim);
} }
private: private:
TinyVector<int,N_rank> lbound_, ubound_, stride_;
Bounds lbound_;
Bounds ubound_;
Strides stride_;
}; };
template<int N_rank> template<int N_rank>
inline RectDomain<N_rank> strip(const TinyVector<int,N_rank>& startPosition inline RectDomain<N_rank>
, strip(const TinyVector<int,N_rank>& startPosition,const int stripDimension,
int stripDimension, int ubound) const int ubound) {
{
BZPRECONDITION((stripDimension >= 0) && (stripDimension < N_rank)); BZPRECONDITION((stripDimension >= 0) && (stripDimension < N_rank));
BZPRECONDITION(ubound >= startPosition(stripDimension)); BZPRECONDITION(ubound >= startPosition(stripDimension));
TinyVector<int,N_rank> endPosition = startPosition; TinyVector<int,N_rank> endPosition = startPosition;
endPosition(stripDimension) = ubound; endPosition(stripDimension) = ubound;
return RectDomain<N_rank>(startPosition, endPosition); return RectDomain<N_rank>(startPosition, endPosition);
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 25 change blocks. 
91 lines changed or deleted 69 lines changed or added


 dot.h   dot.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/meta/dot.h Tiny vector dot product metaprogram * blitz/meta/dot.h Tiny vector dot product metaprogram
* *
* $Id: dot.h,v 1.2 2001/01/24 20:22:51 tveldhui Exp $ * $Id: dot.h,v 1.5 2005/05/07 04:17:57 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: dot.h,v $
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:08:44 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_META_DOT_H #ifndef BZ_META_DOT_H
#define BZ_META_DOT_H #define BZ_META_DOT_H
#ifndef BZ_PROMOTE_H #ifndef BZ_PROMOTE_H
#include <blitz/promote.h> #include <blitz/promote.h>
#endif #endif
#ifndef BZ_METAPROG_H #ifndef BZ_METAPROG_H
#include <blitz/meta/metaprog.h> #include <blitz/meta/metaprog.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<int N, int I> template<int N, int I>
class _bz_meta_vectorDot { class _bz_meta_vectorDot {
public: public:
enum { loopFlag = (I < N-1) ? 1 : 0 }; static const int loopFlag = (I < N-1) ? 1 : 0;
template<class T_expr1, class T_expr2> template<typename T_expr1, typename T_expr2>
static inline BZ_PROMOTE(_bz_typename T_expr1::T_numtype, static inline BZ_PROMOTE(_bz_typename T_expr1::T_numtype,
_bz_typename T_expr2::T_numtype) _bz_typename T_expr2::T_numtype)
f(const T_expr1& a, const T_expr2& b) f(const T_expr1& a, const T_expr2& b)
{ {
return a[I] * b[I] return a[I] * b[I]
+ _bz_meta_vectorDot<loopFlag * N, loopFlag * (I+1)>::f(a,b); + _bz_meta_vectorDot<loopFlag * N, loopFlag * (I+1)>::f(a,b);
} }
template<class T_expr1, class T_expr2> template<typename T_expr1, typename T_expr2>
static inline BZ_PROMOTE(_bz_typename T_expr1::T_numtype, static inline BZ_PROMOTE(_bz_typename T_expr1::T_numtype,
_bz_typename T_expr2::T_numtype) _bz_typename T_expr2::T_numtype)
f_value_ref(T_expr1 a, const T_expr2& b) f_value_ref(T_expr1 a, const T_expr2& b)
{ {
return a[I] * b[I] return a[I] * b[I]
+ _bz_meta_vectorDot<loopFlag * N, loopFlag * (I+1)>::f(a,b); + _bz_meta_vectorDot<loopFlag * N, loopFlag * (I+1)>::f(a,b);
} }
template<class T_expr1, class T_expr2> template<typename T_expr1, typename T_expr2>
static inline BZ_PROMOTE(_bz_typename T_expr1::T_numtype, static inline BZ_PROMOTE(_bz_typename T_expr1::T_numtype,
_bz_typename T_expr2::T_numtype) _bz_typename T_expr2::T_numtype)
f_ref_value(const T_expr1& a, T_expr2 b) f_ref_value(const T_expr1& a, T_expr2 b)
{ {
return a[I] * b[I] return a[I] * b[I]
+ _bz_meta_vectorDot<loopFlag * N, loopFlag * (I+1)>::f(a,b); + _bz_meta_vectorDot<loopFlag * N, loopFlag * (I+1)>::f(a,b);
} }
template<class T_expr1, class P_numtype2> template<typename T_expr1, typename P_numtype2>
static inline BZ_PROMOTE(_bz_typename T_expr1::T_numtype, static inline BZ_PROMOTE(_bz_typename T_expr1::T_numtype,
P_numtype2) P_numtype2)
dotWithArgs(const T_expr1& a, P_numtype2 i1, P_numtype2 i2=0, dotWithArgs(const T_expr1& a, P_numtype2 i1, P_numtype2 i2=0,
P_numtype2 i3=0, P_numtype2 i4=0, P_numtype2 i5=0, P_numtype2 i6=0, P_numtype2 i3=0, P_numtype2 i4=0, P_numtype2 i5=0, P_numtype2 i6=0,
P_numtype2 i7=0, P_numtype2 i8=0, P_numtype2 i9=0, P_numtype2 i10=0 ) P_numtype2 i7=0, P_numtype2 i8=0, P_numtype2 i9=0, P_numtype2 i10=0 )
{ {
return a[I] * i1 return a[I] * i1
+ _bz_meta_vectorDot<loopFlag * N, loopFlag * (I+1)>::dotWithAr gs + _bz_meta_vectorDot<loopFlag * N, loopFlag * (I+1)>::dotWithAr gs
(a, i2, i3, i4, i5, i6, i7, i8, i9); (a, i2, i3, i4, i5, i6, i7, i8, i9);
} }
}; };
template<> template<>
class _bz_meta_vectorDot<0,0> { class _bz_meta_vectorDot<0,0> {
public: public:
template<class T_expr1, class T_expr2> template<typename T_expr1, typename T_expr2>
static inline _bz_meta_nullOperand f(const T_expr1&, const T_expr2&) static inline _bz_meta_nullOperand f(const T_expr1&, const T_expr2&)
{ return _bz_meta_nullOperand(); } { return _bz_meta_nullOperand(); }
template<class T_expr1, class P_numtype2> template<typename T_expr1, typename P_numtype2>
static inline _bz_meta_nullOperand static inline _bz_meta_nullOperand
dotWithArgs(const T_expr1& a, P_numtype2 i1, P_numtype2 i2=0, dotWithArgs(const T_expr1& a, P_numtype2 i1, P_numtype2 i2=0,
P_numtype2 i3=0, P_numtype2 i4=0, P_numtype2 i5=0, P_numtype2 i6=0, P_numtype2 i3=0, P_numtype2 i4=0, P_numtype2 i5=0, P_numtype2 i6=0,
P_numtype2 i7=0, P_numtype2 i8=0, P_numtype2 i9=0, P_numtype2 i10=0 ) P_numtype2 i7=0, P_numtype2 i8=0, P_numtype2 i9=0, P_numtype2 i10=0 )
{ {
return _bz_meta_nullOperand(); return _bz_meta_nullOperand();
} }
}; };
 End of changes. 10 change blocks. 
24 lines changed or deleted 11 lines changed or added


 et.h   et.h 
/************************************************************************** * /************************************************************************** *
* blitz/array/et.h Include expression templates implementation for arrays * blitz/array/et.h Include expression templates implementation for arrays
* *
* $Id: et.h,v 1.4 2002/06/26 23:56:37 jcumming Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: et.h,v $
* Revision 1.4 2002/06/26 23:56:37 jcumming
* Added #include of blitz/array/misc.cc if not using new expression templa
tes.
*
* Revision 1.3 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_ET_H #ifndef BZ_ARRAY_ET_H
#define BZ_ARRAY_ET_H #define BZ_ARRAY_ET_H
#ifdef BZ_NEW_EXPRESSION_TEMPLATES #ifdef BZ_NEW_EXPRESSION_TEMPLATES
#include <blitz/array/newet.h> // Expression templates #include <blitz/array/newet.h> // Expression templates
#else #else
#include <blitz/array/bops.cc> // Expression templates, two operands #include <blitz/array/bops.cc> // Expression templates, two operands
#include <blitz/array/uops.cc> // Expression templates, math functions #include <blitz/array/uops.cc> // Expression templates, math functions
#include <blitz/array/misc.cc> // Expression templates, miscellaneous #include <blitz/array/misc.cc> // Expression templates, miscellaneous
#endif #endif
 End of changes. 2 change blocks. 
14 lines changed or deleted 2 lines changed or added


 etbase.h   etbase.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/etbase.h Declaration of the ETBase<T> class * blitz/etbase.h Declaration of the ETBase<T> class
* *
* $Id: etbase.h,v 1.2 2001/01/25 00:25:54 tveldhui Exp $ * $Id: etbase.h,v 1.5 2003/12/30 23:03:29 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: etbase.h,v $
* Revision 1.2 2001/01/25 00:25:54 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ETBASE_H #ifndef BZ_ETBASE_H
#define BZ_ETBASE_H #define BZ_ETBASE_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T> template<typename T>
class ETBase { class ETBase {
public: public:
ETBase() ETBase()
{ } { }
ETBase(const ETBase<T>&) ETBase(const ETBase<T>&)
{ } { }
T& unwrap() { return static_cast<T&>(*this); }
const T& unwrap() const { return static_cast<const T&>(*this); }
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ETBASE_H #endif // BZ_ETBASE_H
 End of changes. 5 change blocks. 
9 lines changed or deleted 9 lines changed or added


 eval.cc   eval.cc 
/*
* $Id: eval.cc,v 1.6 2002/05/27 19:48:57 jcumming Exp $
*
* $Log: eval.cc,v $
* Revision 1.6 2002/05/27 19:48:57 jcumming
* Removed use of this->. Member data_ of templated base class is now decl
ared
* in derived class Array.
*
* Revision 1.5 2002/05/23 00:15:43 jcumming
* Fixed bug in Array::evaluateWithIndexTraversal1() by removing cast of
* second argument to T_numtype in call to T_update::update(). This cast
* will occur automatically when the update operation is performed. This
* fixes a problem reported by Masahiro Tatsumi <tatsumi@nfi.co.jp> in
* which one could not assign a double to an Array of TinyVectors of double
* without explicitly constructing a TinyVector of doubles on the right-han
d
* side. Also fixed an unused variable warning emanating from the function
* Array::evaluateWithFastTraversal() by moving the definition of local
* variable "last" so that it is only seen if it is used.
*
* Revision 1.4 2002/03/06 16:18:34 patricg
*
* data_ replaced by this->data_
*
* Revision 1.3 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.2 2001/01/24 22:51:51 tveldhui
* Reorganized #include orders to avoid including the huge Vector e.t.
* implementation when using Array.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1998/02/25 20:04:01 tveldhui
* Initial revision
*
*/
#ifndef BZ_ARRAYEVAL_CC #ifndef BZ_ARRAYEVAL_CC
#define BZ_ARRAYEVAL_CC #define BZ_ARRAYEVAL_CC
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/eval.cc> must be included via <blitz/array.h> #error <blitz/array/eval.cc> must be included via <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
skipping to change at line 81 skipping to change at line 40
* three-dimensional, has at least six array operands, and there are * three-dimensional, has at least six array operands, and there are
* no index placeholders in the expression. These are all things which * no index placeholders in the expression. These are all things which
* can be checked at compile time, so the if()/else() syntax has been * can be checked at compile time, so the if()/else() syntax has been
* replaced with this class template. * replaced with this class template.
*/ */
// Fast traversals require <set> from the ISO/ANSI C++ standard library // Fast traversals require <set> from the ISO/ANSI C++ standard library
#ifdef BZ_HAVE_STD #ifdef BZ_HAVE_STD
#ifdef BZ_ARRAY_SPACE_FILLING_TRAVERSAL #ifdef BZ_ARRAY_SPACE_FILLING_TRAVERSAL
template<_bz_bool canTryFastTraversal> template<bool canTryFastTraversal>
struct _bz_tryFastTraversal { struct _bz_tryFastTraversal {
template<class T_numtype, int N_rank, class T_expr, class T_update> template<typename T_numtype, int N_rank, typename T_expr, typename T_up
static _bz_bool tryFast(Array<T_numtype,N_rank>& array, date>
static bool tryFast(Array<T_numtype,N_rank>& array,
BZ_ETPARM(T_expr) expr, T_update) BZ_ETPARM(T_expr) expr, T_update)
{ {
return _bz_false; return false;
} }
}; };
template<> template<>
struct _bz_tryFastTraversal<_bz_true> { struct _bz_tryFastTraversal<true> {
template<class T_numtype, int N_rank, class T_expr, class T_update> template<typename T_numtype, int N_rank, typename T_expr, typename T_up
static _bz_bool tryFast(Array<T_numtype,N_rank>& array, date>
static bool tryFast(Array<T_numtype,N_rank>& array,
BZ_ETPARM(T_expr) expr, T_update) BZ_ETPARM(T_expr) expr, T_update)
{ {
// See if there's an appropriate space filling curve available. // See if there's an appropriate space filling curve available.
// Currently fast traversals use an N-1 dimensional curve. The // Currently fast traversals use an N-1 dimensional curve. The
// Nth dimension column corresponding to each point on the curve // Nth dimension column corresponding to each point on the curve
// is traversed in the normal fashion. // is traversed in the normal fashion.
TraversalOrderCollection<N_rank-1> traversals; TraversalOrderCollection<N_rank-1> traversals;
TinyVector<int, N_rank - 1> traversalGridSize; TinyVector<int, N_rank - 1> traversalGridSize;
for (int i=0; i < N_rank - 1; ++i) for (int i=0; i < N_rank - 1; ++i)
skipping to change at line 123 skipping to change at line 82
traversals.find(traversalGridSize); traversals.find(traversalGridSize);
if (order) if (order)
{ {
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
cerr << "Array<" << BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype) cerr << "Array<" << BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype)
<< ", " << N_rank << ">: Using stack traversal" << endl; << ", " << N_rank << ">: Using stack traversal" << endl;
#endif #endif
// A curve was available -- use fast traversal. // A curve was available -- use fast traversal.
array.evaluateWithFastTraversal(*order, expr, T_update()); array.evaluateWithFastTraversal(*order, expr, T_update());
return _bz_true; return true;
} }
return _bz_false; return false;
} }
}; };
#endif // BZ_ARRAY_SPACE_FILLING_TRAVERSAL #endif // BZ_ARRAY_SPACE_FILLING_TRAVERSAL
#endif // BZ_HAVE_STD #endif // BZ_HAVE_STD
template<class T_numtype, int N_rank> template<class T_expr, class T_update > template<typename T_numtype, int N_rank> template<typename T_expr, typename T_update>
inline Array<T_numtype, N_rank>& inline Array<T_numtype, N_rank>&
Array<T_numtype, N_rank>::evaluate(T_expr expr, Array<T_numtype, N_rank>::evaluate(T_expr expr,
T_update) T_update)
{ {
// Check that all arrays have the same shape // Check that all arrays have the same shape
#ifdef BZ_DEBUG #ifdef BZ_DEBUG
if (!expr.shapeCheck(shape())) if (!expr.shapeCheck(shape()))
{ {
if (assertFailMode == _bz_false) if (assertFailMode == false)
{ {
cerr << "[Blitz++] Shape check failed: Module " << __FILE__ cerr << "[Blitz++] Shape check failed: Module " << __FILE__
<< " line " << __LINE__ << endl << " line " << __LINE__ << endl
<< " Expression: "; << " Expression: ";
prettyPrintFormat format(_bz_true); // Use terse formatting prettyPrintFormat format(true); // Use terse formatting
string str; BZ_STD_SCOPE(string) str;
expr.prettyPrint(str, format); expr.prettyPrint(str, format);
cerr << str << endl ; cerr << str << endl ;
} }
#if 0 #if 0
// Shape dumping is broken by change to using string for prettyPrint // Shape dumping is broken by change to using string for prettyPrint
<< " Shapes: " << shape() << " = "; << " Shapes: " << shape() << " = ";
prettyPrintFormat format2; prettyPrintFormat format2;
format2.setDumpArrayShapesMode(); format2.setDumpArrayShapesMode();
expr.prettyPrint(cerr, format2); expr.prettyPrint(cerr, format2);
skipping to change at line 183 skipping to change at line 142
* Check that the arrays are not empty (e.g. length 0 arrays) * Check that the arrays are not empty (e.g. length 0 arrays)
* This fixes a bug found by Peter Bienstman, 6/16/99, where * This fixes a bug found by Peter Bienstman, 6/16/99, where
* Array<double,2> A(0,0),B(0,0); B=A(tensor::j,tensor::i); * Array<double,2> A(0,0),B(0,0); B=A(tensor::j,tensor::i);
* went into an infinite loop. * went into an infinite loop.
*/ */
if (numElements() == 0) if (numElements() == 0)
return *this; return *this;
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
cout << "T_expr::numIndexPlaceholders = " << T_expr::numIndexPlaceholders cout << "T_expr::numIndexPlaceholders = " << T_expr::numIndexPlaceholde
<< endl; cout.flush(); rs
<< endl;
cout.flush();
#endif #endif
// Tau profiling code. Provide Tau with a pretty-printed version of // Tau profiling code. Provide Tau with a pretty-printed version of
// the expression. // the expression.
// NEEDS_WORK-- use a static initializer somehow. // NEEDS_WORK-- use a static initializer somehow.
#ifdef BZ_TAU_PROFILING #ifdef BZ_TAU_PROFILING
static string exprDescription; static BZ_STD_SCOPE(string) exprDescription;
if (!exprDescription.length()) // faked static initializer if (!exprDescription.length()) // faked static initializer
{ {
exprDescription = "A"; exprDescription = "A";
prettyPrintFormat format(_bz_true); // Terse mode on prettyPrintFormat format(true); // Terse mode on
format.nextArrayOperandSymbol(); format.nextArrayOperandSymbol();
T_update::prettyPrint(exprDescription); T_update::prettyPrint(exprDescription);
expr.prettyPrint(exprDescription, format); expr.prettyPrint(exprDescription, format);
} }
TAU_PROFILE(" ", exprDescription, TAU_BLITZ); TAU_PROFILE(" ", exprDescription, TAU_BLITZ);
#endif #endif
// Determine which evaluation mechanism to use // Determine which evaluation mechanism to use
if (T_expr::numIndexPlaceholders > 0) if (T_expr::numIndexPlaceholders > 0)
{ {
skipping to change at line 267 skipping to change at line 227
// If fast traversal isn't available or appropriate, then just // If fast traversal isn't available or appropriate, then just
// do a stack traversal. // do a stack traversal.
if (N_rank == 1) if (N_rank == 1)
return evaluateWithStackTraversal1(expr, T_update()); return evaluateWithStackTraversal1(expr, T_update());
else else
return evaluateWithStackTraversalN(expr, T_update()); return evaluateWithStackTraversalN(expr, T_update());
} }
} }
template<class T_numtype, int N_rank> template<class T_expr, class T_update > template<typename T_numtype, int N_rank> template<typename T_expr, typename T_update>
inline Array<T_numtype, N_rank>& inline Array<T_numtype, N_rank>&
Array<T_numtype, N_rank>::evaluateWithStackTraversal1( Array<T_numtype, N_rank>::evaluateWithStackTraversal1(
T_expr expr, T_update) T_expr expr, T_update)
{ {
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
BZ_DEBUG_MESSAGE("Array<" << BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numt ype) BZ_DEBUG_MESSAGE("Array<" << BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numt ype)
<< ", " << N_rank << ">: Using stack traversal"); << ", " << N_rank << ">: Using stack traversal");
#endif #endif
FastArrayIterator<T_numtype, N_rank> iter(*this); FastArrayIterator<T_numtype, N_rank> iter(*this);
iter.loadStride(firstRank); iter.loadStride(firstRank);
expr.loadStride(firstRank); expr.loadStride(firstRank);
_bz_bool useUnitStride = iter.isUnitStride(firstRank) bool useUnitStride = iter.isUnitStride(firstRank)
&& expr.isUnitStride(firstRank); && expr.isUnitStride(firstRank);
#ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE #ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE
int commonStride = expr.suggestStride(firstRank); int commonStride = expr.suggestStride(firstRank);
if (iter.suggestStride(firstRank) > commonStride) if (iter.suggestStride(firstRank) > commonStride)
commonStride = iter.suggestStride(firstRank); commonStride = iter.suggestStride(firstRank);
bool useCommonStride = iter.isStride(firstRank,commonStride) bool useCommonStride = iter.isStride(firstRank,commonStride)
&& expr.isStride(firstRank,commonStride); && expr.isStride(firstRank,commonStride);
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
BZ_DEBUG_MESSAGE("BZ_ARRAY_EXPR_USE_COMMON_STRIDE:" << endl BZ_DEBUG_MESSAGE("BZ_ARRAY_EXPR_USE_COMMON_STRIDE:" << endl
<< " commonStride = " << commonStride << " useCommonStride = " << " commonStride = " << commonStride << " useCommonStride = "
<< useCommonStride); << useCommonStride);
#endif #endif
#else #else
int commonStride = 1; int commonStride = 1;
bool useCommonStride = _bz_false; bool useCommonStride = false;
#endif #endif
const T_numtype * last = iter.data() + length(firstRank) const T_numtype * last = iter.data() + length(firstRank)
* stride(firstRank); * stride(firstRank);
if (useUnitStride || useCommonStride) if (useUnitStride || useCommonStride)
{ {
#ifdef BZ_USE_FAST_READ_ARRAY_EXPR #ifdef BZ_USE_FAST_READ_ARRAY_EXPR
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
BZ_DEBUG_MESSAGE("BZ_USE_FAST_READ_ARRAY_EXPR with commonStride"); BZ_DEBUG_MESSAGE("BZ_USE_FAST_READ_ARRAY_EXPR with commonStride");
#endif #endif
int ubound = length(firstRank) * commonStride; int ubound = length(firstRank) * commonStride;
T_numtype* _bz_restrict data = const_cast<T_numtype*>(iter.data()); T_numtype* restrict data = const_cast<T_numtype*>(iter.data());
if (commonStride == 1) if (commonStride == 1)
{ {
#ifndef BZ_ARRAY_STACK_TRAVERSAL_UNROLL #ifndef BZ_ARRAY_STACK_TRAVERSAL_UNROLL
for (int i=0; i < ubound; ++i) for (int i=0; i < ubound; ++i)
T_update::update(data[i], expr.fastRead(i)); T_update::update(*data++, expr.fastRead(i));
#else #else
int n1 = ubound & 3; int n1 = ubound & 3;
int i = 0; int i = 0;
for (; i < n1; ++i) for (; i < n1; ++i)
T_update::update(data[i], expr.fastRead(i)); T_update::update(*data++, expr.fastRead(i));
for (; i < ubound; i += 4) for (; i < ubound; i += 4)
{ {
#ifndef BZ_ARRAY_STACK_TRAVERSAL_CSE_AND_ANTIALIAS #ifndef BZ_ARRAY_STACK_TRAVERSAL_CSE_AND_ANTIALIAS
T_update::update(data[i], expr.fastRead(i)); T_update::update(*data++, expr.fastRead(i));
T_update::update(data[i+1], expr.fastRead(i+1)); T_update::update(*data++, expr.fastRead(i+1));
T_update::update(data[i+2], expr.fastRead(i+2)); T_update::update(*data++, expr.fastRead(i+2));
T_update::update(data[i+3], expr.fastRead(i+3)); T_update::update(*data++, expr.fastRead(i+3));
#else #else
int t1 = i+1; const int t1 = i+1;
int t2 = i+2; const int t2 = i+2;
int t3 = i+3; const int t3 = i+3;
_bz_typename T_expr::T_numtype tmp1, tmp2, tmp3, tmp4; _bz_typename T_expr::T_numtype tmp1, tmp2, tmp3, tmp4;
tmp1 = expr.fastRead(i); tmp1 = expr.fastRead(i);
tmp2 = expr.fastRead(BZ_NO_PROPAGATE(t1)); tmp2 = expr.fastRead(BZ_NO_PROPAGATE(t1));
tmp3 = expr.fastRead(BZ_NO_PROPAGATE(t2)); tmp3 = expr.fastRead(BZ_NO_PROPAGATE(t2));
tmp4 = expr.fastRead(BZ_NO_PROPAGATE(t3)); tmp4 = expr.fastRead(BZ_NO_PROPAGATE(t3));
T_update::update(data[i], BZ_NO_PROPAGATE(tmp1)); T_update::update(*data++, tmp1);
T_update::update(data[BZ_NO_PROPAGATE(t1)], tmp2); T_update::update(*data++, tmp2);
T_update::update(data[BZ_NO_PROPAGATE(t2)], tmp3); T_update::update(*data++, tmp3);
T_update::update(data[BZ_NO_PROPAGATE(t3)], tmp4); T_update::update(*data++, tmp4);
#endif #endif
} }
#endif // BZ_ARRAY_STACK_TRAVERSAL_UNROLL #endif // BZ_ARRAY_STACK_TRAVERSAL_UNROLL
} }
#ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE #ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE
else { else {
#ifndef BZ_ARRAY_STACK_TRAVERSAL_UNROLL #ifndef BZ_ARRAY_STACK_TRAVERSAL_UNROLL
for (int i=0; i < ubound; i += commonStride) for (int i=0; i != ubound; i += commonStride)
T_update::update(data[i], expr.fastRead(i)); T_update::update(data[i], expr.fastRead(i));
#else #else
int n1 = (length(firstRank) & 3) * commonStride; int n1 = (length(firstRank) & 3) * commonStride;
int i = 0; int i = 0;
for (; i < n1; i += commonStride) for (; i != n1; i += commonStride)
T_update::update(data[i], expr.fastRead(i)); T_update::update(data[i], expr.fastRead(i));
int strideInc = 4 * commonStride; int strideInc = 4 * commonStride;
for (; i < ubound; i += strideInc) for (; i != ubound; i += strideInc)
{ {
T_update::update(data[i], expr.fastRead(i)); T_update::update(data[i], expr.fastRead(i));
int i2 = i + commonStride; int i2 = i + commonStride;
T_update::update(data[i2], expr.fastRead(i2)); T_update::update(data[i2], expr.fastRead(i2));
int i3 = i + 2 * commonStride; int i3 = i + 2 * commonStride;
T_update::update(data[i3], expr.fastRead(i3)); T_update::update(data[i3], expr.fastRead(i3));
int i4 = i + 3 * commonStride; int i4 = i + 3 * commonStride;
T_update::update(data[i4], expr.fastRead(i4)); T_update::update(data[i4], expr.fastRead(i4));
} }
#endif // BZ_ARRAY_STACK_TRAVERSAL_UNROLL #endif // BZ_ARRAY_STACK_TRAVERSAL_UNROLL
skipping to change at line 405 skipping to change at line 365
{ {
T_update::update(*const_cast<T_numtype*>(iter.data()), *expr); T_update::update(*const_cast<T_numtype*>(iter.data()), *expr);
iter.advance(); iter.advance();
expr.advance(); expr.advance();
} }
} }
return *this; return *this;
} }
template<class T_numtype, int N_rank> template<class T_expr, class T_update > template<typename T_numtype, int N_rank> template<typename T_expr, typename T_update>
inline Array<T_numtype, N_rank>& inline Array<T_numtype, N_rank>&
Array<T_numtype, N_rank>::evaluateWithStackTraversalN( Array<T_numtype, N_rank>::evaluateWithStackTraversalN(
T_expr expr, T_update) T_expr expr, T_update)
{ {
/* /*
* A stack traversal replaces the usual nested loops: * A stack traversal replaces the usual nested loops:
* *
* for (int i=A.lbound(firstDim); i <= A.ubound(firstDim); ++i) * for (int i=A.lbound(firstDim); i <= A.ubound(firstDim); ++i)
* for (int j=A.lbound(secondDim); j <= A.ubound(secondDim); ++j) * for (int j=A.lbound(secondDim); j <= A.ubound(secondDim); ++j)
* for (int k=A.lbound(thirdDim); k <= A.ubound(thirdDim); ++k) * for (int k=A.lbound(thirdDim); k <= A.ubound(thirdDim); ++k)
skipping to change at line 447 skipping to change at line 407
* become the innermost "loop". * become the innermost "loop".
* *
* Ordering the loops from ordering(N_rank-1) down to * Ordering the loops from ordering(N_rank-1) down to
* ordering(0) ensures that the largest stride is associated * ordering(0) ensures that the largest stride is associated
* with the outermost loop, and the smallest stride with the * with the outermost loop, and the smallest stride with the
* innermost. This is critical for good performance on * innermost. This is critical for good performance on
* cached machines. * cached machines.
*/ */
const int maxRank = ordering(0); const int maxRank = ordering(0);
const int secondLastRank = ordering(1); // const int secondLastRank = ordering(1);
// Create an iterator for the array receiving the result // Create an iterator for the array receiving the result
FastArrayIterator<T_numtype, N_rank> iter(*this); FastArrayIterator<T_numtype, N_rank> iter(*this);
// Set the initial stack configuration by pushing the pointer // Set the initial stack configuration by pushing the pointer
// to the first element of the array onto the stack N times. // to the first element of the array onto the stack N times.
int i; int i;
for (i=1; i < N_rank; ++i) for (i=1; i < N_rank; ++i)
{ {
skipping to change at line 471 skipping to change at line 431
// Load the strides associated with the innermost loop. // Load the strides associated with the innermost loop.
iter.loadStride(maxRank); iter.loadStride(maxRank);
expr.loadStride(maxRank); expr.loadStride(maxRank);
/* /*
* Is the stride in the innermost loop equal to 1? If so, * Is the stride in the innermost loop equal to 1? If so,
* we might take advantage of this and generate more * we might take advantage of this and generate more
* efficient code. * efficient code.
*/ */
_bz_bool useUnitStride = iter.isUnitStride(maxRank) bool useUnitStride = iter.isUnitStride(maxRank)
&& expr.isUnitStride(maxRank); && expr.isUnitStride(maxRank);
/* /*
* Do all array operands share a common stride in the innermost * Do all array operands share a common stride in the innermost
* loop? If so, we can generate more efficient code (but only * loop? If so, we can generate more efficient code (but only
* if this optimization has been enabled). * if this optimization has been enabled).
*/ */
#ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE #ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE
int commonStride = expr.suggestStride(maxRank); int commonStride = expr.suggestStride(maxRank);
if (iter.suggestStride(maxRank) > commonStride) if (iter.suggestStride(maxRank) > commonStride)
skipping to change at line 494 skipping to change at line 454
&& expr.isStride(maxRank,commonStride); && expr.isStride(maxRank,commonStride);
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
BZ_DEBUG_MESSAGE("BZ_ARRAY_EXPR_USE_COMMON_STRIDE" << endl BZ_DEBUG_MESSAGE("BZ_ARRAY_EXPR_USE_COMMON_STRIDE" << endl
<< "commonStride = " << commonStride << " useCommonStride = " << "commonStride = " << commonStride << " useCommonStride = "
<< useCommonStride); << useCommonStride);
#endif #endif
#else #else
int commonStride = 1; int commonStride = 1;
bool useCommonStride = _bz_false; bool useCommonStride = false;
#endif #endif
/* /*
* The "last" array contains a pointer to the last element * The "last" array contains a pointer to the last element
* encountered in each "loop". * encountered in each "loop".
*/ */
const T_numtype* last[N_rank]; const T_numtype* last[N_rank];
// Set up the initial state of the "last" array // Set up the initial state of the "last" array
for (i=1; i < N_rank; ++i) for (i=1; i < N_rank; ++i)
skipping to change at line 570 skipping to change at line 530
while (true) { while (true) {
/* /*
* This bit of code handles the innermost loop. It would look * This bit of code handles the innermost loop. It would look
* a lot simpler if it weren't for unit stride and common stride * a lot simpler if it weren't for unit stride and common stride
* optimizations; these clutter up the code with multiple versions. * optimizations; these clutter up the code with multiple versions.
*/ */
if ((useUnitStride) || (useCommonStride)) if ((useUnitStride) || (useCommonStride))
{ {
T_numtype * _bz_restrict end = const_cast<T_numtype*>(iter.data
())
+ lastLength;
#ifdef BZ_USE_FAST_READ_ARRAY_EXPR #ifdef BZ_USE_FAST_READ_ARRAY_EXPR
/* /*
* The check for BZ_USE_FAST_READ_ARRAY_EXPR can probably * The check for BZ_USE_FAST_READ_ARRAY_EXPR can probably
* be taken out. This was put in place while the unit stride/ * be taken out. This was put in place while the unit stride/
* common stride optimizations were being implemented and * common stride optimizations were being implemented and
* tested. * tested.
*/ */
// Calculate the end of the innermost loop // Calculate the end of the innermost loop
int ubound = lastLength * commonStride; int ubound = lastLength * commonStride;
/* /*
* This is a real kludge. I didn't want to have to write * This is a real kludge. I didn't want to have to write
* a const and non-const version of FastArrayIterator, so I use a * a const and non-const version of FastArrayIterator, so I use a
* const iterator and cast away const. This could * const iterator and cast away const. This could
* probably be avoided with some trick, but the whole routine * probably be avoided with some trick, but the whole routine
* is ugly, so why bother. * is ugly, so why bother.
*/ */
T_numtype* _bz_restrict data = const_cast<T_numtype*>(iter.data ()); T_numtype* restrict data = const_cast<T_numtype*>(iter.data());
/* /*
* BZ_NEEDS_WORK-- need to implement optional unrolling. * BZ_NEEDS_WORK-- need to implement optional unrolling.
*/ */
if (commonStride == 1) if (commonStride == 1)
{ {
for (int i=0; i < ubound; ++i) for (int i=0; i < ubound; ++i)
T_update::update(data[i], expr.fastRead(i)); T_update::update(*data++, expr.fastRead(i));
} }
#ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE #ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE
else { else {
for (int i=0; i < ubound; i += commonStride) for (int i=0; i != ubound; i += commonStride)
T_update::update(data[i], expr.fastRead(i)); T_update::update(data[i], expr.fastRead(i));
} }
#endif #endif
/* /*
* Tidy up for the fact that we haven't actually been * Tidy up for the fact that we haven't actually been
* incrementing the iterators in the innermost loop, by * incrementing the iterators in the innermost loop, by
* faking it afterward. * faking it afterward.
*/ */
iter.advance(lastLength * commonStride); iter.advance(lastLength * commonStride);
expr.advance(lastLength * commonStride); expr.advance(lastLength * commonStride);
#else #else
// !BZ_USE_FAST_READ_ARRAY_EXPR // !BZ_USE_FAST_READ_ARRAY_EXPR
// This bit of code not really needed; should remove at some // This bit of code not really needed; should remove at some
// point, along with the test for BZ_USE_FAST_READ_ARRAY_EXPR // point, along with the test for BZ_USE_FAST_READ_ARRAY_EXPR
T_numtype * restrict end = const_cast<T_numtype*>(iter.data())
+ lastLength;
while (iter.data() != end) while (iter.data() != end)
{ {
T_update::update(*const_cast<T_numtype*>(iter.data()), *exp r); T_update::update(*const_cast<T_numtype*>(iter.data()), *exp r);
iter.advance(commonStride); iter.advance(commonStride);
expr.advance(commonStride); expr.advance(commonStride);
} }
#endif #endif
} }
else { else {
/* /*
* We don't have a unit stride or common stride in the innermos t * We don't have a unit stride or common stride in the innermos t
* loop. This is going to hurt performance. Luckily 95% of * loop. This is going to hurt performance. Luckily 95% of
* the time, we hit the cases above. * the time, we hit the cases above.
*/ */
T_numtype * _bz_restrict end = const_cast<T_numtype*>(iter.data ()) T_numtype * restrict end = const_cast<T_numtype*>(iter.data())
+ lastLength * stride(maxRank); + lastLength * stride(maxRank);
while (iter.data() != end) while (iter.data() != end)
{ {
T_update::update(*const_cast<T_numtype*>(iter.data()), *exp r); T_update::update(*const_cast<T_numtype*>(iter.data()), *exp r);
iter.advance(); iter.advance();
expr.advance(); expr.advance();
} }
} }
skipping to change at line 694 skipping to change at line 654
} }
// Load the stride for the innermost loop again. // Load the stride for the innermost loop again.
iter.loadStride(maxRank); iter.loadStride(maxRank);
expr.loadStride(maxRank); expr.loadStride(maxRank);
} }
return *this; return *this;
} }
template<class T_numtype, int N_rank> template<class T_expr, class T_update > template<typename T_numtype, int N_rank> template<typename T_expr, typename T_update>
inline Array<T_numtype, N_rank>& inline Array<T_numtype, N_rank>&
Array<T_numtype, N_rank>::evaluateWithIndexTraversal1( Array<T_numtype, N_rank>::evaluateWithIndexTraversal1(
T_expr expr, T_update) T_expr expr, T_update)
{ {
TinyVector<int,N_rank> index; TinyVector<int,N_rank> index;
if (stride(firstRank) == 1) if (stride(firstRank) == 1)
{ {
T_numtype * _bz_restrict iter = data_; T_numtype * restrict iter = data_ + lbound(firstRank);
int last = ubound(firstRank); int last = ubound(firstRank);
for (index[0] = lbound(firstRank); index[0] <= last; for (index[0] = lbound(firstRank); index[0] <= last;
++index[0]) ++index[0])
{ {
T_update::update(iter[index[0]], expr(index)); T_update::update(*iter++, expr(index));
} }
} }
else { else {
FastArrayIterator<T_numtype, N_rank> iter(*this); FastArrayIterator<T_numtype, N_rank> iter(*this);
iter.loadStride(0); iter.loadStride(0);
int last = ubound(firstRank); int last = ubound(firstRank);
for (index[0] = lbound(firstRank); index[0] <= last; for (index[0] = lbound(firstRank); index[0] <= last;
++index[0]) ++index[0])
{ {
T_update::update(*const_cast<T_numtype*>(iter.data()), T_update::update(*const_cast<T_numtype*>(iter.data()),
expr(index)); expr(index));
iter.advance(); iter.advance();
} }
} }
return *this; return *this;
} }
template<class T_numtype, int N_rank> template<class T_expr, class T_update > template<typename T_numtype, int N_rank> template<typename T_expr, typename T_update>
inline Array<T_numtype, N_rank>& inline Array<T_numtype, N_rank>&
Array<T_numtype, N_rank>::evaluateWithIndexTraversalN( Array<T_numtype, N_rank>::evaluateWithIndexTraversalN(
T_expr expr, T_update) T_expr expr, T_update)
{ {
// Do a stack-type traversal for the destination array and use // Do a stack-type traversal for the destination array and use
// index traversal for the source expression // index traversal for the source expression
const int maxRank = ordering(0); const int maxRank = ordering(0);
const int secondLastRank = ordering(1);
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
cout << "Index traversal: N_rank = " << N_rank << endl; const int secondLastRank = ordering(1);
cout << "maxRank = " << maxRank << " secondLastRank = " << secondLastRank cout << "Index traversal: N_rank = " << N_rank << endl;
<< endl; cout << "maxRank = " << maxRank << " secondLastRank = " << secondLastRa
cout.flush(); nk
<< endl;
cout.flush();
#endif #endif
FastArrayIterator<T_numtype, N_rank> iter(*this); FastArrayIterator<T_numtype, N_rank> iter(*this);
for (int i=1; i < N_rank; ++i) for (int i=1; i < N_rank; ++i)
iter.push(ordering(i)); iter.push(ordering(i));
iter.loadStride(maxRank); iter.loadStride(maxRank);
TinyVector<int,N_rank> index, last; TinyVector<int,N_rank> index, last;
index = storage_.base(); index = storage_.base();
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
last(i) = storage_.base(i) + length_(i); last(i) = storage_.base(i) + length_(i);
int lastLength = length(maxRank); // int lastLength = length(maxRank);
while (true) { while (true) {
for (index[maxRank] = base(maxRank); for (index[maxRank] = base(maxRank);
index[maxRank] < last[maxRank]; index[maxRank] < last[maxRank];
++index[maxRank]) ++index[maxRank])
{ {
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
#if 0 #if 0
cout << "(" << index[0] << "," << index[1] << ") " << endl; cout << "(" << index[0] << "," << index[1] << ") " << endl;
skipping to change at line 810 skipping to change at line 770
} }
return *this; return *this;
} }
// Fast traversals require <set> from the ISO/ANSI C++ standard library // Fast traversals require <set> from the ISO/ANSI C++ standard library
#ifdef BZ_HAVE_STD #ifdef BZ_HAVE_STD
#ifdef BZ_ARRAY_SPACE_FILLING_TRAVERSAL #ifdef BZ_ARRAY_SPACE_FILLING_TRAVERSAL
template<class T_numtype, int N_rank> template<class T_expr, class T_update > template<typename T_numtype, int N_rank> template<typename T_expr, typename T_update>
inline Array<T_numtype, N_rank>& inline Array<T_numtype, N_rank>&
Array<T_numtype, N_rank>::evaluateWithFastTraversal( Array<T_numtype, N_rank>::evaluateWithFastTraversal(
const TraversalOrder<N_rank - 1>& order, const TraversalOrder<N_rank - 1>& order,
T_expr expr, T_expr expr,
T_update) T_update)
{ {
const int maxRank = ordering(0); const int maxRank = ordering(0);
const int secondLastRank = ordering(1);
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
cerr << "maxRank = " << maxRank << " secondLastRank = " << secondLastRank const int secondLastRank = ordering(1);
<< endl; cerr << "maxRank = " << maxRank << " secondLastRank = " << secondLastRa
nk
<< endl;
#endif #endif
FastArrayIterator<T_numtype, N_rank> iter(*this); FastArrayIterator<T_numtype, N_rank> iter(*this);
iter.push(0); iter.push(0);
expr.push(0); expr.push(0);
_bz_bool useUnitStride = iter.isUnitStride(maxRank) bool useUnitStride = iter.isUnitStride(maxRank)
&& expr.isUnitStride(maxRank); && expr.isUnitStride(maxRank);
#ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE #ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE
int commonStride = expr.suggestStride(maxRank); int commonStride = expr.suggestStride(maxRank);
if (iter.suggestStride(maxRank) > commonStride) if (iter.suggestStride(maxRank) > commonStride)
commonStride = iter.suggestStride(maxRank); commonStride = iter.suggestStride(maxRank);
bool useCommonStride = iter.isStride(maxRank,commonStride) bool useCommonStride = iter.isStride(maxRank,commonStride)
&& expr.isStride(maxRank,commonStride); && expr.isStride(maxRank,commonStride);
#else #else
int commonStride = 1; int commonStride = 1;
bool useCommonStride = _bz_false; bool useCommonStride = false;
#endif #endif
int lastLength = length(maxRank); int lastLength = length(maxRank);
for (int i=0; i < order.length(); ++i) for (int i=0; i < order.length(); ++i)
{ {
iter.pop(0); iter.pop(0);
expr.pop(0); expr.pop(0);
#ifdef BZ_DEBUG_TRAVERSE #ifdef BZ_DEBUG_TRAVERSE
skipping to change at line 873 skipping to change at line 833
iter.loadStride(maxRank); iter.loadStride(maxRank);
expr.loadStride(maxRank); expr.loadStride(maxRank);
// Evaluate the expression along the column // Evaluate the expression along the column
if ((useUnitStride) || (useCommonStride)) if ((useUnitStride) || (useCommonStride))
{ {
#ifdef BZ_USE_FAST_READ_ARRAY_EXPR #ifdef BZ_USE_FAST_READ_ARRAY_EXPR
int ubound = lastLength * commonStride; int ubound = lastLength * commonStride;
T_numtype* _bz_restrict data = const_cast<T_numtype*>(iter.data ()); T_numtype* restrict data = const_cast<T_numtype*>(iter.data());
if (commonStride == 1) if (commonStride == 1)
{ {
#ifndef BZ_ARRAY_FAST_TRAVERSAL_UNROLL #ifndef BZ_ARRAY_FAST_TRAVERSAL_UNROLL
for (int i=0; i < ubound; ++i) for (int i=0; i < ubound; ++i)
T_update::update(data[i], expr.fastRead(i)); T_update::update(*data++, expr.fastRead(i));
#else #else
int n1 = ubound & 3; int n1 = ubound & 3;
int i=0; int i=0;
for (; i < n1; ++i) for (; i < n1; ++i)
T_update::update(data[i], expr.fastRead(i)); T_update::update(*data++, expr.fastRead(i));
for (; i < ubound; i += 4) for (; i < ubound; i += 4)
{ {
T_update::update(data[i], expr.fastRead(i)); T_update::update(*data++, expr.fastRead(i));
T_update::update(data[i+1], expr.fastRead(i+1)); T_update::update(*data++, expr.fastRead(i+1));
T_update::update(data[i+2], expr.fastRead(i+2)); T_update::update(*data++, expr.fastRead(i+2));
T_update::update(data[i+3], expr.fastRead(i+3)); T_update::update(*data++, expr.fastRead(i+3));
} }
#endif // BZ_ARRAY_FAST_TRAVERSAL_UNROLL #endif // BZ_ARRAY_FAST_TRAVERSAL_UNROLL
} }
#ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE #ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE
else { else {
for (int i=0; i < ubound; i += commonStride) for (int i=0; i < ubound; i += commonStride)
T_update::update(data[i], expr.fastRead(i)); T_update::update(data[i], expr.fastRead(i));
} }
#endif // BZ_ARRAY_EXPR_USE_COMMON_STRIDE #endif // BZ_ARRAY_EXPR_USE_COMMON_STRIDE
iter.advance(lastLength * commonStride); iter.advance(lastLength * commonStride);
expr.advance(lastLength * commonStride); expr.advance(lastLength * commonStride);
#else // ! BZ_USE_FAST_READ_ARRAY_EXPR #else // ! BZ_USE_FAST_READ_ARRAY_EXPR
T_numtype* _bz_restrict last = const_cast<T_numtype*>(iter.data ()) T_numtype* restrict last = const_cast<T_numtype*>(iter.data())
+ lastLength * commonStride; + lastLength * commonStride;
while (iter.data() != last) while (iter.data() != last)
{ {
T_update::update(*const_cast<T_numtype*>(iter.data()), *exp r); T_update::update(*const_cast<T_numtype*>(iter.data()), *exp r);
iter.advance(commonStride); iter.advance(commonStride);
expr.advance(commonStride); expr.advance(commonStride);
} }
#endif // BZ_USE_FAST_READ_ARRAY_EXPR #endif // BZ_USE_FAST_READ_ARRAY_EXPR
} }
else { else {
// No common stride // No common stride
T_numtype* _bz_restrict last = const_cast<T_numtype*>(iter.data ()) T_numtype* restrict last = const_cast<T_numtype*>(iter.data())
+ lastLength * stride(maxRank); + lastLength * stride(maxRank);
while (iter.data() != last) while (iter.data() != last)
{ {
T_update::update(*const_cast<T_numtype*>(iter.data()), *exp r); T_update::update(*const_cast<T_numtype*>(iter.data()), *exp r);
iter.advance(); iter.advance();
expr.advance(); expr.advance();
} }
} }
} }
skipping to change at line 942 skipping to change at line 902
return *this; return *this;
} }
#endif // BZ_ARRAY_SPACE_FILLING_TRAVERSAL #endif // BZ_ARRAY_SPACE_FILLING_TRAVERSAL
#endif // BZ_HAVE_STD #endif // BZ_HAVE_STD
#ifdef BZ_ARRAY_2D_NEW_STENCIL_TILING #ifdef BZ_ARRAY_2D_NEW_STENCIL_TILING
#ifdef BZ_ARRAY_2D_STENCIL_TILING #ifdef BZ_ARRAY_2D_STENCIL_TILING
template<class T_numtype, int N_rank> template<class T_expr, class T_update > template<typename T_numtype, int N_rank> template<typename T_expr, typename T_update>
inline Array<T_numtype, N_rank>& inline Array<T_numtype, N_rank>&
Array<T_numtype, N_rank>::evaluateWithTiled2DTraversal( Array<T_numtype, N_rank>::evaluateWithTiled2DTraversal(
T_expr expr, T_update) T_expr expr, T_update)
{ {
const int minorRank = ordering(0); const int minorRank = ordering(0);
const int majorRank = ordering(1); const int majorRank = ordering(1);
FastArrayIterator<T_numtype, N_rank> iter(*this); FastArrayIterator<T_numtype, N_rank> iter(*this);
iter.push(0); iter.push(0);
expr.push(0); expr.push(0);
#ifdef BZ_2D_STENCIL_DEBUG #ifdef BZ_2D_STENCIL_DEBUG
int count = 0; int count = 0;
#endif #endif
_bz_bool useUnitStride = iter.isUnitStride(minorRank) bool useUnitStride = iter.isUnitStride(minorRank)
&& expr.isUnitStride(minorRank); && expr.isUnitStride(minorRank);
#ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE #ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE
int commonStride = expr.suggestStride(minorRank); int commonStride = expr.suggestStride(minorRank);
if (iter.suggestStride(minorRank) > commonStride) if (iter.suggestStride(minorRank) > commonStride)
commonStride = iter.suggestStride(minorRank); commonStride = iter.suggestStride(minorRank);
bool useCommonStride = iter.isStride(minorRank,commonStride) bool useCommonStride = iter.isStride(minorRank,commonStride)
&& expr.isStride(minorRank,commonStride); && expr.isStride(minorRank,commonStride);
#else #else
int commonStride = 1; int commonStride = 1;
bool useCommonStride = _bz_false; bool useCommonStride = false;
#endif #endif
// Determine if a common major stride exists // Determine if a common major stride exists
int commonMajorStride = expr.suggestStride(majorRank); int commonMajorStride = expr.suggestStride(majorRank);
if (iter.suggestStride(majorRank) > commonMajorStride) if (iter.suggestStride(majorRank) > commonMajorStride)
commonMajorStride = iter.suggestStride(majorRank); commonMajorStride = iter.suggestStride(majorRank);
bool haveCommonMajorStride = iter.isStride(majorRank,commonMajorStride) bool haveCommonMajorStride = iter.isStride(majorRank,commonMajorStride)
&& expr.isStride(majorRank,commonMajorStride); && expr.isStride(majorRank,commonMajorStride);
int maxi = length(majorRank); int maxi = length(majorRank);
skipping to change at line 1024 skipping to change at line 984
expr.loadStride(minorRank); expr.loadStride(minorRank);
expr.advance(bj); expr.advance(bj);
if (bj + tileWidth <= maxj) if (bj + tileWidth <= maxj)
{ {
// Strip mining // Strip mining
if ((useUnitStride) && (haveCommonMajorStride)) if ((useUnitStride) && (haveCommonMajorStride))
{ {
int offset = 0; int offset = 0;
T_numtype* _bz_restrict data = const_cast<T_numtype*> T_numtype* restrict data = const_cast<T_numtype*>
(iter.data()); (iter.data());
for (int i=bi; i < ni; ++i) for (int i=bi; i < ni; ++i)
{ {
_bz_typename T_expr::T_numtype tmp1, tmp2, tmp3; _bz_typename T_expr::T_numtype tmp1, tmp2, tmp3;
// Common subexpression elimination -- compilers // Common subexpression elimination -- compilers
// won't necessarily do this on their own. // won't necessarily do this on their own.
int t1 = offset+1; int t1 = offset+1;
int t2 = offset+2; int t2 = offset+2;
skipping to change at line 1138 skipping to change at line 1098
return *this; return *this;
} }
#endif // BZ_ARRAY_2D_STENCIL_TILING #endif // BZ_ARRAY_2D_STENCIL_TILING
#endif // BZ_ARRAY_2D_NEW_STENCIL_TILING #endif // BZ_ARRAY_2D_NEW_STENCIL_TILING
#ifndef BZ_ARRAY_2D_NEW_STENCIL_TILING #ifndef BZ_ARRAY_2D_NEW_STENCIL_TILING
#ifdef BZ_ARRAY_2D_STENCIL_TILING #ifdef BZ_ARRAY_2D_STENCIL_TILING
template<class T_numtype, int N_rank> template<class T_expr, class T_update > template<typename T_numtype, int N_rank> template<typename T_expr, typename T_update>
inline Array<T_numtype, N_rank>& inline Array<T_numtype, N_rank>&
Array<T_numtype, N_rank>::evaluateWithTiled2DTraversal( Array<T_numtype, N_rank>::evaluateWithTiled2DTraversal(
T_expr expr, T_update) T_expr expr, T_update)
{ {
const int minorRank = ordering(0); const int minorRank = ordering(0);
const int majorRank = ordering(1); const int majorRank = ordering(1);
const int blockSize = 16; const int blockSize = 16;
FastArrayIterator<T_numtype, N_rank> iter(*this); FastArrayIterator<T_numtype, N_rank> iter(*this);
iter.push(0); iter.push(0);
expr.push(0); expr.push(0);
_bz_bool useUnitStride = iter.isUnitStride(minorRank) bool useUnitStride = iter.isUnitStride(minorRank)
&& expr.isUnitStride(minorRank); && expr.isUnitStride(minorRank);
#ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE #ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE
int commonStride = expr.suggestStride(minorRank); int commonStride = expr.suggestStride(minorRank);
if (iter.suggestStride(minorRank) > commonStride) if (iter.suggestStride(minorRank) > commonStride)
commonStride = iter.suggestStride(minorRank); commonStride = iter.suggestStride(minorRank);
bool useCommonStride = iter.isStride(minorRank,commonStride) bool useCommonStride = iter.isStride(minorRank,commonStride)
&& expr.isStride(minorRank,commonStride); && expr.isStride(minorRank,commonStride);
#else #else
int commonStride = 1; int commonStride = 1;
bool useCommonStride = _bz_false; bool useCommonStride = false;
#endif #endif
int maxi = length(majorRank); int maxi = length(majorRank);
int maxj = length(minorRank); int maxj = length(minorRank);
int bi, bj; int bi, bj;
for (bi=0; bi < maxi; bi += blockSize) for (bi=0; bi < maxi; bi += blockSize)
{ {
int ni = bi + blockSize; int ni = bi + blockSize;
if (ni > maxi) if (ni > maxi)
skipping to change at line 1210 skipping to change at line 1170
// Save the beginning of this tile row // Save the beginning of this tile row
iter.push(1); iter.push(1);
expr.push(1); expr.push(1);
// Load the minor stride // Load the minor stride
iter.loadStride(minorRank); iter.loadStride(minorRank);
expr.loadStride(minorRank); expr.loadStride(minorRank);
if (useUnitStride) if (useUnitStride)
{ {
T_numtype* _bz_restrict data = const_cast<T_numtype*> T_numtype* restrict data = const_cast<T_numtype*>
(iter.data()); (iter.data());
int ubound = (nj-bj); int ubound = (nj-bj);
for (int j=0; j < ubound; ++j) for (int j=0; j < ubound; ++j)
T_update::update(data[j], expr.fastRead(j)); T_update::update(*data++, expr.fastRead(j));
} }
#ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE #ifdef BZ_ARRAY_EXPR_USE_COMMON_STRIDE
else if (useCommonStride) else if (useCommonStride)
{ {
int ubound = (nj-bj) * commonStride; int ubound = (nj-bj) * commonStride;
T_numtype* _bz_restrict data = const_cast<T_numtype*> T_numtype* restrict data = const_cast<T_numtype*>
(iter.data()); (iter.data());
for (int j=0; j < ubound; j += commonStride) for (int j=0; j < ubound; j += commonStride)
T_update::update(data[j], expr.fastRead(j)); T_update::update(data[j], expr.fastRead(j));
} }
#endif #endif
else { else {
for (int j=bj; j < nj; ++j) for (int j=bj; j < nj; ++j)
{ {
// Loop through current row elements // Loop through current row elements
 End of changes. 63 change blocks. 
127 lines changed or deleted 89 lines changed or added


 expr.h   expr.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/arrayexpr.h Array<T,N> expression templates * blitz/array/expr.h Array<T,N> expression templates
*
* $Id: expr.h,v 1.4 2002/07/23 23:14:09 jcumming Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: expr.h,v $
* Revision 1.4 2002/07/23 23:14:09 jcumming
* Added a four-argument templated constructor for _bz_ArrayExpr, which is
* needed when building an Array expression containing a functor that takes
* three arguments. This is needed to support functorExpr.h, which allows
* functors with up to three arguments.
*
* Revision 1.3 2002/03/07 14:36:47 patricg
*
* line 124
* #ifdef BZ_NEW_EXPRESSION_TEMPLATES replaced by
* #if defined(BZ_NEW_EXPRESSION_TEMPLATES) && ! defined(__MWERKS__)
* line 134 added
* #if !defined(__MWERKS__)
* #endif
* for Metrowerks code warrior compiler
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_ARRAYEXPR_H #ifndef BZ_ARRAYEXPR_H
#define BZ_ARRAYEXPR_H #define BZ_ARRAYEXPR_H
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/expr.h> must be included via <blitz/array.h> #error <blitz/array/expr.h> must be included via <blitz/array.h>
#endif #endif
#ifndef BZ_OPS_H #include <blitz/ops.h>
#include <blitz/ops.h> #include <blitz/prettyprint.h>
#endif #include <blitz/shapecheck.h>
#include <blitz/numinquire.h>
#ifndef BZ_PRETTYPRINT_H
#include <blitz/prettyprint.h>
#endif
#ifndef BZ_SHAPECHECK_H
#include <blitz/shapecheck.h>
#endif
#ifndef BZ_NUMINQUIRE_H
#include <blitz/numinquire.h>
#endif
/* /*
* The array expression templates iterator interface is followed by * The array expression templates iterator interface is followed by
* these classes: * these classes:
* *
* FastArrayIterator <blitz/array/fastiter.h> * FastArrayIterator <blitz/array/fastiter.h>
* _bz_ArrayExpr <blitz/array/expr.h> * _bz_ArrayExpr <blitz/array/expr.h>
* _bz_ArrayExprOp "
* _bz_ArrayExprUnaryOp " * _bz_ArrayExprUnaryOp "
* _bz_ArrayExprBinaryOp "
* _bz_ArrayExprTernaryOp "
* _bz_ArrayExprConstant " * _bz_ArrayExprConstant "
* _bz_ArrayMap <blitz/array/map.h> * _bz_ArrayMap <blitz/array/map.h>
* _bz_ArrayExprReduce <blitz/array/reduce.h> * _bz_ArrayExprReduce <blitz/array/reduce.h>
* IndexPlaceholder <blitz/indexexpr.h> * IndexPlaceholder <blitz/indexexpr.h>
*/ */
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T1, class T2> template<typename T1, typename T2>
class _bz_ExprPair { class _bz_ExprPair {
public: public:
_bz_ExprPair(const T1& a, const T2& b) _bz_ExprPair(const T1& a, const T2& b)
: first_(a), second_(b) : first_(a), second_(b)
{ } { }
const T1& first() const const T1& first() const
{ return first_; } { return first_; }
const T2& second() const const T2& second() const
{ return second_; } { return second_; }
protected: protected:
T1 first_; T1 first_;
T2 second_; T2 second_;
}; };
template<class T1, class T2> template<typename T1, typename T2>
inline _bz_ExprPair<T1,T2> makeExprPair(const T1& a, const T2& b) inline _bz_ExprPair<T1,T2> makeExprPair(const T1& a, const T2& b)
{ {
return _bz_ExprPair<T1,T2>(a,b); return _bz_ExprPair<T1,T2>(a,b);
} }
template<class P_expr> template<typename P_expr>
class _bz_ArrayExpr class _bz_ArrayExpr
#ifdef BZ_NEW_EXPRESSION_TEMPLATES #ifdef BZ_NEW_EXPRESSION_TEMPLATES
: public ETBase<_bz_ArrayExpr<P_expr> > : public ETBase<_bz_ArrayExpr<P_expr> >
#endif #endif
{ {
public: public:
typedef P_expr T_expr; typedef P_expr T_expr;
typedef _bz_typename T_expr::T_numtype T_numtype; typedef _bz_typename T_expr::T_numtype T_numtype;
typedef T_expr T_ctorArg1; typedef T_expr T_ctorArg1;
typedef int T_ctorArg2; // dummy typedef int T_ctorArg2; // dummy
enum { numArrayOperands = BZ_ENUM_CAST(P_expr::numArrayOperands), static const int
numIndexPlaceholders = BZ_ENUM_CAST(P_expr::numIndexPlaceholders), numArrayOperands = T_expr::numArrayOperands,
rank = BZ_ENUM_CAST(P_expr::rank) }; numIndexPlaceholders = T_expr::numIndexPlaceholders,
rank = T_expr::rank;
_bz_ArrayExpr(const _bz_ArrayExpr<P_expr>& a) _bz_ArrayExpr(const _bz_ArrayExpr<T_expr>& a)
#ifdef BZ_NEW_EXPRESSION_TEMPLATES
: ETBase< _bz_ArrayExpr<T_expr> >(a), iter_(a.iter_)
#else
: iter_(a.iter_) : iter_(a.iter_)
#endif
{ } { }
#if defined(BZ_NEW_EXPRESSION_TEMPLATES) && ! defined(__MWERKS__) #if defined(BZ_NEW_EXPRESSION_TEMPLATES) && ! defined(__MWERKS__)
template<class T> template<typename T>
_bz_ArrayExpr(const T& a) _bz_ArrayExpr(const T& a)
: iter_(a) : iter_(a)
{ } { }
#else #else
_bz_ArrayExpr(BZ_ETPARM(T_expr) a) _bz_ArrayExpr(BZ_ETPARM(T_expr) a)
: iter_(a) : iter_(a)
{ } { }
#if !defined(__MWERKS__) #if !defined(__MWERKS__)
_bz_ArrayExpr(BZ_ETPARM(_bz_typename T_expr::T_ctorArg1) a) _bz_ArrayExpr(BZ_ETPARM(_bz_typename T_expr::T_ctorArg1) a)
: iter_(a) : iter_(a)
{ } { }
#endif #endif
#endif #endif
template<class T1, class T2> template<typename T1, typename T2>
_bz_ArrayExpr(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b) _bz_ArrayExpr(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b)
: iter_(a, b) : iter_(a, b)
{ } { }
template<class T1, class T2, class T3> template<typename T1, typename T2, typename T3>
_bz_ArrayExpr(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b, BZ_ETPARM(T3) c) _bz_ArrayExpr(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b, BZ_ETPARM(T3) c)
: iter_(a, b, c) : iter_(a, b, c)
{ } { }
template<class T1, class T2, class T3, class T4> template<typename T1, typename T2, typename T3, typename T4>
_bz_ArrayExpr(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b, BZ_ETPARM(T3) c, _bz_ArrayExpr(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b, BZ_ETPARM(T3) c,
BZ_ETPARM(T4) d) : iter_(a, b, c, d) BZ_ETPARM(T4) d) : iter_(a, b, c, d)
{ } { }
template<class T1, class T2> template<typename T1, typename T2>
_bz_ArrayExpr(const _bz_ExprPair<T1,T2>& pair) _bz_ArrayExpr(const _bz_ExprPair<T1,T2>& pair)
: iter_(pair.first(), pair.second()) : iter_(pair.first(), pair.second())
{ } { }
T_numtype operator*() T_numtype operator*()
{ return *iter_; } { return *iter_; }
#ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE #ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE
template<int N_rank> template<int N_rank>
T_numtype operator()(TinyVector<int, N_rank> i) T_numtype operator()(TinyVector<int, N_rank> i)
skipping to change at line 217 skipping to change at line 180
void advance() void advance()
{ iter_.advance(); } { iter_.advance(); }
void advance(int n) void advance(int n)
{ iter_.advance(n); } { iter_.advance(n); }
void loadStride(int rank) void loadStride(int rank)
{ iter_.loadStride(rank); } { iter_.loadStride(rank); }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int rank) const
{ return iter_.isUnitStride(rank); } { return iter_.isUnitStride(rank); }
void advanceUnitStride() void advanceUnitStride()
{ iter_.advanceUnitStride(); } { iter_.advanceUnitStride(); }
_bz_bool canCollapse(int outerLoopRank, int innerLoopRank) const bool canCollapse(int outerLoopRank, int innerLoopRank) const
{ {
// BZ_DEBUG_MESSAGE("_bz_ArrayExpr<>::canCollapse()"); // BZ_DEBUG_MESSAGE("_bz_ArrayExpr<>::canCollapse()");
return iter_.canCollapse(outerLoopRank, innerLoopRank); return iter_.canCollapse(outerLoopRank, innerLoopRank);
} }
T_numtype operator[](int i) T_numtype operator[](int i)
{ return iter_[i]; } { return iter_[i]; }
T_numtype fastRead(int i) T_numtype fastRead(int i)
{ return iter_.fastRead(i); } { return iter_.fastRead(i); }
int suggestStride(int rank) const int suggestStride(int rank) const
{ return iter_.suggestStride(rank); } { return iter_.suggestStride(rank); }
_bz_bool isStride(int rank, int stride) const bool isStride(int rank, int stride) const
{ return iter_.isStride(rank,stride); } { return iter_.isStride(rank,stride); }
void prettyPrint(string& str) const void prettyPrint(BZ_STD_SCOPE(string) &str) const
{ {
prettyPrintFormat format(_bz_true); // Terse formatting by default prettyPrintFormat format(true); // Terse formatting by default
iter_.prettyPrint(str, format); iter_.prettyPrint(str, format);
} }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format) const
{ iter_.prettyPrint(str, format); } { iter_.prettyPrint(str, format); }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) bool shapeCheck(const T_shape& shape)
{ return iter_.shapeCheck(shape); } { return iter_.shapeCheck(shape); }
template<int N_rank> template<int N_rank>
void moveTo(const TinyVector<int,N_rank>& i) void moveTo(const TinyVector<int,N_rank>& i)
{ {
iter_.moveTo(i); iter_.moveTo(i);
} }
protected: protected:
_bz_ArrayExpr() { } _bz_ArrayExpr() { }
T_expr iter_; T_expr iter_;
}; };
struct bounds { struct bounds {
static int compute_ascending(int rank, int ascending1, int ascending2) static int compute_ascending(int BZ_DEBUG_PARAM(rank),
int ascending1, int ascending2)
{ {
// The value INT_MIN indicates that there are no arrays // The value INT_MIN indicates that there are no arrays
// in a subtree of the expression. This logic returns // in a subtree of the expression. This logic returns
// whichever ascending is available. If there are two // whichever ascending is available. If there are two
// conflicting ascending values, this is an error. // conflicting ascending values, this is an error.
if (ascending1 == ascending2) if (ascending1 == ascending2)
return ascending1; return ascending1;
else if (ascending1 == INT_MIN) else if (ascending1 == INT_MIN)
return ascending2; return ascending2;
skipping to change at line 289 skipping to change at line 254
return ascending1; return ascending1;
BZ_DEBUG_MESSAGE("Two array operands have different" BZ_DEBUG_MESSAGE("Two array operands have different"
<< endl << "ascending flags: for rank " << rank << endl << "ascending flags: for rank " << rank
<< ", the flags are " << ascending1 << " and " << ", the flags are " << ascending1 << " and "
<< ascending2 << endl); << ascending2 << endl);
BZ_PRE_FAIL; BZ_PRE_FAIL;
return 0; return 0;
} }
static int compute_ordering(int rank, int order1, int order2) static int compute_ordering(int BZ_DEBUG_PARAM(rank),
int order1, int order2)
{ {
// The value INT_MIN indicates that there are no arrays // The value INT_MIN indicates that there are no arrays
// in a subtree of the expression. This logic returns // in a subtree of the expression. This logic returns
// whichever ordering is available. If there are two // whichever ordering is available. If there are two
// conflicting ordering values, this is an error. // conflicting ordering values, this is an error.
if (order1 == order2) if (order1 == order2)
return order1; return order1;
else if (order1 == INT_MIN) else if (order1 == INT_MIN)
return order2; return order2;
else if (order2 == INT_MIN) else if (order2 == INT_MIN)
return order1; return order1;
BZ_DEBUG_MESSAGE("Two array operands have different" BZ_DEBUG_MESSAGE("Two array operands have different"
<< endl << "orders: for rank " << rank << ", the orders are " << endl << "orders: for rank " << rank << ", the orders are "
<< order1 << " and " << order2 << endl); << order1 << " and " << order2 << endl);
BZ_PRE_FAIL; BZ_PRE_FAIL;
return 0; return 0;
} }
static int compute_lbound(int rank, int lbound1, int lbound2) static int compute_lbound(int BZ_DEBUG_PARAM(rank),
int lbound1, int lbound2)
{ {
// The value INT_MIN indicates that there are no arrays // The value INT_MIN indicates that there are no arrays
// in a subtree of the expression. This logic returns // in a subtree of the expression. This logic returns
// whichever lbound is available. If there are two // whichever lbound is available. If there are two
// conflicting lbound values, this is an error. // conflicting lbound values, this is an error.
if (lbound1 == lbound2) if (lbound1 == lbound2)
return lbound1; return lbound1;
else if (lbound1 == INT_MIN) else if (lbound1 == INT_MIN)
return lbound2; return lbound2;
else if (lbound2 == INT_MIN) else if (lbound2 == INT_MIN)
return lbound1; return lbound1;
BZ_DEBUG_MESSAGE("Two array operands have different" BZ_DEBUG_MESSAGE("Two array operands have different"
<< endl << "lower bounds: in rank " << rank << ", the bounds ar e " << endl << "lower bounds: in rank " << rank << ", the bounds ar e "
<< lbound1 << " and " << lbound2 << endl); << lbound1 << " and " << lbound2 << endl);
BZ_PRE_FAIL; BZ_PRE_FAIL;
return 0; return 0;
} }
static int compute_ubound(int rank, int ubound1, int ubound2) static int compute_ubound(int BZ_DEBUG_PARAM(rank),
int ubound1, int ubound2)
{ {
// The value INT_MAX indicates that there are no arrays // The value INT_MAX indicates that there are no arrays
// in a subtree of the expression. This logic returns // in a subtree of the expression. This logic returns
// whichever ubound is available. If there are two // whichever ubound is available. If there are two
// conflicting ubound values, this is an error. // conflicting ubound values, this is an error.
if (ubound1 == ubound2) if (ubound1 == ubound2)
return ubound1; return ubound1;
else if (ubound1 == INT_MAX) else if (ubound1 == INT_MAX)
return ubound2; return ubound2;
else if (ubound2 == INT_MAX) else if (ubound2 == INT_MAX)
return ubound1; return ubound1;
BZ_DEBUG_MESSAGE("Two array operands have different" BZ_DEBUG_MESSAGE("Two array operands have different"
<< endl << "upper bounds: in rank " << rank << ", the bounds ar e " << endl << "upper bounds: in rank " << rank << ", the bounds ar e "
<< ubound1 << " and " << ubound2 << endl); << ubound1 << " and " << ubound2 << endl);
BZ_PRE_FAIL; BZ_PRE_FAIL;
return 0; return 0;
} }
};
template<typename P_expr, typename P_op>
class _bz_ArrayExprUnaryOp {
public:
typedef P_expr T_expr;
typedef P_op T_op;
typedef _bz_typename T_expr::T_numtype T_numtype1;
typedef _bz_typename T_op::T_numtype T_numtype;
typedef T_expr T_ctorArg1;
typedef int T_ctorArg2; // dummy
static const int
numArrayOperands = T_expr::numArrayOperands,
numIndexPlaceholders = T_expr::numIndexPlaceholders,
rank = T_expr::rank;
_bz_ArrayExprUnaryOp(const _bz_ArrayExprUnaryOp<T_expr, T_op>& a)
: iter_(a.iter_)
{ }
_bz_ArrayExprUnaryOp(BZ_ETPARM(T_expr) a)
: iter_(a)
{ }
_bz_ArrayExprUnaryOp(_bz_typename T_expr::T_ctorArg1 a)
: iter_(a)
{ }
#if BZ_TEMPLATE_CTOR_DOESNT_CAUSE_HAVOC
template<typename T1>
explicit _bz_ArrayExprUnaryOp(BZ_ETPARM(T1) a)
: iter_(a)
{ }
#endif
int ascending(int rank)
{ return iter_.ascending(rank); }
int ordering(int rank)
{ return iter_.ordering(rank); }
int lbound(int rank)
{ return iter_.lbound(rank); }
int ubound(int rank)
{ return iter_.ubound(rank); }
T_numtype operator*()
{ return T_op::apply(*iter_); }
#ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE
template<int N_rank>
T_numtype operator()(TinyVector<int, N_rank> i)
{ return T_op::apply(iter_(i)); }
#else
template<int N_rank>
T_numtype operator()(const TinyVector<int, N_rank>& i)
{ return T_op::apply(iter_(i)); }
#endif
void push(int position)
{
iter_.push(position);
}
void pop(int position)
{
iter_.pop(position);
}
void advance()
{
iter_.advance();
}
void advance(int n)
{
iter_.advance(n);
}
void loadStride(int rank)
{
iter_.loadStride(rank);
}
bool isUnitStride(int rank) const
{ return iter_.isUnitStride(rank); }
void advanceUnitStride()
{
iter_.advanceUnitStride();
}
template<int N_rank>
void moveTo(const TinyVector<int,N_rank>& i)
{
iter_.moveTo(i);
}
bool canCollapse(int outerLoopRank, int innerLoopRank) const
{
// BZ_DEBUG_MESSAGE("_bz_ArrayExprUnaryOp<>::canCollapse");
return iter_.canCollapse(outerLoopRank, innerLoopRank);
}
T_numtype operator[](int i)
{ return T_op::apply(iter_[i]); }
T_numtype fastRead(int i)
{ return T_op::apply(iter_.fastRead(i)); }
int suggestStride(int rank) const
{ return iter_.suggestStride(rank); }
bool isStride(int rank, int stride) const
{ return iter_.isStride(rank,stride); }
void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format) const
{ T_op::prettyPrint(str, format, iter_); }
template<typename T_shape>
bool shapeCheck(const T_shape& shape)
{ return iter_.shapeCheck(shape); }
protected:
_bz_ArrayExprUnaryOp() { }
T_expr iter_;
}; };
template<class P_expr1, class P_expr2, class P_op> template<typename P_expr1, typename P_expr2, typename P_op>
class _bz_ArrayExprOp { class _bz_ArrayExprBinaryOp {
public: public:
typedef P_expr1 T_expr1; typedef P_expr1 T_expr1;
typedef P_expr2 T_expr2; typedef P_expr2 T_expr2;
typedef P_op T_op;
typedef _bz_typename T_expr1::T_numtype T_numtype1; typedef _bz_typename T_expr1::T_numtype T_numtype1;
typedef _bz_typename T_expr2::T_numtype T_numtype2; typedef _bz_typename T_expr2::T_numtype T_numtype2;
typedef _bz_typename P_op::T_numtype T_numtype; typedef _bz_typename T_op::T_numtype T_numtype;
typedef P_op T_op;
typedef T_expr1 T_ctorArg1; typedef T_expr1 T_ctorArg1;
typedef T_expr2 T_ctorArg2; typedef T_expr2 T_ctorArg2;
enum { numArrayOperands = BZ_ENUM_CAST(P_expr1::numArrayOperands) static const int
+ BZ_ENUM_CAST(P_expr2::numArrayOperands), numArrayOperands = T_expr1::numArrayOperands
numIndexPlaceholders = BZ_ENUM_CAST(P_expr1::numIndexPlaceholder + T_expr2::numArrayOperands,
s) numIndexPlaceholders = T_expr1::numIndexPlaceholders
+ BZ_ENUM_CAST(P_expr2::numIndexPlaceholders), + T_expr2::numIndexPlaceholders,
rank = (BZ_ENUM_CAST(P_expr1::rank) > BZ_ENUM_CAST(P_expr2::rank rank = (T_expr1::rank > T_expr2::rank)
)) ? T_expr1::rank : T_expr2::rank;
? BZ_ENUM_CAST(P_expr1::rank) : BZ_ENUM_CAST(P_expr2::rank)
};
_bz_ArrayExprOp(const _bz_ArrayExprOp<P_expr1, P_expr2, P_op>& a) _bz_ArrayExprBinaryOp(
const _bz_ArrayExprBinaryOp<T_expr1, T_expr2, T_op>& a)
: iter1_(a.iter1_), iter2_(a.iter2_) : iter1_(a.iter1_), iter2_(a.iter2_)
{ } { }
template<class T1, class T2> template<typename T1, typename T2>
_bz_ArrayExprOp(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b) _bz_ArrayExprBinaryOp(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b)
: iter1_(a), iter2_(b) : iter1_(a), iter2_(b)
{ } { }
// _bz_ArrayExprOp(T_expr1 a, T_expr2 b)
// : iter1_(a), iter2_(b)
// { }
T_numtype operator*() T_numtype operator*()
{ return T_op::apply(*iter1_, *iter2_); } { return T_op::apply(*iter1_, *iter2_); }
#ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE #ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE
template<int N_rank> template<int N_rank>
T_numtype operator()(TinyVector<int, N_rank> i) T_numtype operator()(TinyVector<int, N_rank> i)
{ return T_op::apply(iter1_(i), iter2_(i)); } { return T_op::apply(iter1_(i), iter2_(i)); }
#else #else
template<int N_rank> template<int N_rank>
T_numtype operator()(const TinyVector<int, N_rank>& i) T_numtype operator()(const TinyVector<int, N_rank>& i)
skipping to change at line 454 skipping to change at line 548
iter1_.advance(n); iter1_.advance(n);
iter2_.advance(n); iter2_.advance(n);
} }
void loadStride(int rank) void loadStride(int rank)
{ {
iter1_.loadStride(rank); iter1_.loadStride(rank);
iter2_.loadStride(rank); iter2_.loadStride(rank);
} }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int rank) const
{ return iter1_.isUnitStride(rank) && iter2_.isUnitStride(rank); } { return iter1_.isUnitStride(rank) && iter2_.isUnitStride(rank); }
void advanceUnitStride() void advanceUnitStride()
{ {
iter1_.advanceUnitStride(); iter1_.advanceUnitStride();
iter2_.advanceUnitStride(); iter2_.advanceUnitStride();
} }
_bz_bool canCollapse(int outerLoopRank, int innerLoopRank) const bool canCollapse(int outerLoopRank, int innerLoopRank) const
{ {
// BZ_DEBUG_MESSAGE("_bz_ArrayExprOp<>::canCollapse"); // BZ_DEBUG_MESSAGE("_bz_ArrayExprBinaryOp<>::canCollapse");
return iter1_.canCollapse(outerLoopRank, innerLoopRank) return iter1_.canCollapse(outerLoopRank, innerLoopRank)
&& iter2_.canCollapse(outerLoopRank, innerLoopRank); && iter2_.canCollapse(outerLoopRank, innerLoopRank);
} }
T_numtype operator[](int i) T_numtype operator[](int i)
{ return T_op::apply(iter1_[i], iter2_[i]); } { return T_op::apply(iter1_[i], iter2_[i]); }
T_numtype fastRead(int i) T_numtype fastRead(int i)
{ return T_op::apply(iter1_.fastRead(i), iter2_.fastRead(i)); } { return T_op::apply(iter1_.fastRead(i), iter2_.fastRead(i)); }
int suggestStride(int rank) const int suggestStride(int rank) const
{ {
int stride1 = iter1_.suggestStride(rank); int stride1 = iter1_.suggestStride(rank);
int stride2 = iter2_.suggestStride(rank); int stride2 = iter2_.suggestStride(rank);
return (stride1 > stride2) ? stride1 : stride2; return (stride1 > stride2) ? stride1 : stride2;
} }
_bz_bool isStride(int rank, int stride) const bool isStride(int rank, int stride) const
{ {
return iter1_.isStride(rank,stride) && iter2_.isStride(rank,stride) ; return iter1_.isStride(rank,stride) && iter2_.isStride(rank,stride) ;
} }
template<int N_rank> template<int N_rank>
void moveTo(const TinyVector<int,N_rank>& i) void moveTo(const TinyVector<int,N_rank>& i)
{ {
iter1_.moveTo(i); iter1_.moveTo(i);
iter2_.moveTo(i); iter2_.moveTo(i);
} }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format) const
{ {
T_op::prettyPrint(str, format, iter1_, iter2_); T_op::prettyPrint(str, format, iter1_, iter2_);
} }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) bool shapeCheck(const T_shape& shape)
{ return iter1_.shapeCheck(shape) && iter2_.shapeCheck(shape); } { return iter1_.shapeCheck(shape) && iter2_.shapeCheck(shape); }
protected: protected:
_bz_ArrayExprOp() { } _bz_ArrayExprBinaryOp() { }
T_expr1 iter1_; T_expr1 iter1_;
T_expr2 iter2_; T_expr2 iter2_;
}; };
template<class P_expr, class P_op> template<typename P_expr1, typename P_expr2, typename P_expr3, typename P_o
class _bz_ArrayExprUnaryOp { p>
class _bz_ArrayExprTernaryOp {
public: public:
typedef P_expr T_expr; typedef P_expr1 T_expr1;
typedef _bz_typename P_expr::T_numtype T_numtype1; typedef P_expr2 T_expr2;
typedef _bz_typename P_op::T_numtype T_numtype; typedef P_expr3 T_expr3;
typedef P_op T_op; typedef P_op T_op;
typedef T_expr T_ctorArg1; typedef _bz_typename T_expr1::T_numtype T_numtype1;
typedef int T_ctorArg2; // dummy typedef _bz_typename T_expr2::T_numtype T_numtype2;
typedef _bz_typename T_expr3::T_numtype T_numtype3;
typedef _bz_typename T_op::T_numtype T_numtype;
typedef T_expr1 T_ctorArg1;
typedef T_expr2 T_ctorArg2;
typedef T_expr3 T_ctorArg3;
enum { numArrayOperands = BZ_ENUM_CAST(T_expr::numArrayOperands), static const int
numIndexPlaceholders = BZ_ENUM_CAST(T_expr::numIndexPlaceholders), numArrayOperands = T_expr1::numArrayOperands
rank = BZ_ENUM_CAST(T_expr::rank) }; + T_expr2::numArrayOperands
+ T_expr3::numArrayOperands,
numIndexPlaceholders = T_expr1::numIndexPlaceholders
+ T_expr2::numIndexPlaceholders
+ T_expr3::numIndexPlaceholders,
rank = (T_expr1::rank > T_expr2::rank)
? ((T_expr1::rank > T_expr3::rank)
? T_expr1::rank : T_expr3::rank)
: ((T_expr2::rank > T_expr3::rank)
? T_expr2::rank : T_expr3::rank);
_bz_ArrayExprUnaryOp(const _bz_ArrayExprUnaryOp<T_expr, P_op>& a) _bz_ArrayExprTernaryOp(
: iter_(a.iter_) const _bz_ArrayExprTernaryOp<T_expr1, T_expr2, T_expr3, T_op>& a)
: iter1_(a.iter1_), iter2_(a.iter2_), iter3_(a.iter3_)
{ } { }
_bz_ArrayExprUnaryOp(BZ_ETPARM(T_expr) a) template<typename T1, typename T2, typename T3>
: iter_(a) _bz_ArrayExprTernaryOp(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b, BZ_ETPARM(T3)
c)
: iter1_(a), iter2_(b), iter3_(c)
{ } { }
_bz_ArrayExprUnaryOp(_bz_typename T_expr::T_ctorArg1 a) T_numtype operator*()
: iter_(a) { return T_op::apply(*iter1_, *iter2_, *iter3_); }
{ }
#if BZ_TEMPLATE_CTOR_DOESNT_CAUSE_HAVOC #ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE
template<class T1> template<int N_rank>
_bz_explicit _bz_ArrayExprUnaryOp(BZ_ETPARM(T1) a) T_numtype operator()(TinyVector<int, N_rank> i)
: iter_(a) { return T_op::apply(iter1_(i), iter2_(i), iter3_(i)); }
{ } #else
template<int N_rank>
T_numtype operator()(const TinyVector<int, N_rank>& i)
{ return T_op::apply(iter1_(i), iter2_(i), iter3_(i)); }
#endif #endif
int ascending(int rank) int ascending(int rank)
{ return iter_.ascending(rank); } {
return bounds::compute_ascending(rank, bounds::compute_ascending(
rank, iter1_.ascending(rank), iter2_.ascending(rank)),
iter3_.ascending(rank));
}
int ordering(int rank) int ordering(int rank)
{ return iter_.ordering(rank); } {
return bounds::compute_ordering(rank, bounds::compute_ordering(
rank, iter1_.ordering(rank), iter2_.ordering(rank)),
iter3_.ordering(rank));
}
int lbound(int rank) int lbound(int rank)
{ return iter_.lbound(rank); } {
return bounds::compute_lbound(rank, bounds::compute_lbound(
rank, iter1_.lbound(rank), iter2_.lbound(rank)),
iter3_.lbound(rank));
}
int ubound(int rank) int ubound(int rank)
{ return iter_.ubound(rank); } {
return bounds::compute_ubound(rank, bounds::compute_ubound(
T_numtype operator*() rank, iter1_.ubound(rank), iter2_.ubound(rank)),
{ return T_op::apply(*iter_); } iter3_.ubound(rank));
}
#ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE
template<int N_rank>
T_numtype operator()(TinyVector<int, N_rank> i)
{ return T_op::apply(iter_(i)); }
#else
template<int N_rank>
T_numtype operator()(const TinyVector<int, N_rank>& i)
{ return T_op::apply(iter_(i)); }
#endif
void push(int position) void push(int position)
{ {
iter_.push(position); iter1_.push(position);
iter2_.push(position);
iter3_.push(position);
} }
void pop(int position) void pop(int position)
{ {
iter_.pop(position); iter1_.pop(position);
iter2_.pop(position);
iter3_.pop(position);
} }
void advance() void advance()
{ {
iter_.advance(); iter1_.advance();
iter2_.advance();
iter3_.advance();
} }
void advance(int n) void advance(int n)
{ {
iter_.advance(n); iter1_.advance(n);
iter2_.advance(n);
iter3_.advance(n);
} }
void loadStride(int rank) void loadStride(int rank)
{ {
iter_.loadStride(rank); iter1_.loadStride(rank);
iter2_.loadStride(rank);
iter3_.loadStride(rank);
} }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int rank) const
{ return iter_.isUnitStride(rank); }
void advanceUnitStride()
{ {
iter_.advanceUnitStride(); return iter1_.isUnitStride(rank)
&& iter2_.isUnitStride(rank)
&& iter3_.isUnitStride(rank);
} }
template<int N_rank> void advanceUnitStride()
void moveTo(const TinyVector<int,N_rank>& i)
{ {
iter_.moveTo(i); iter1_.advanceUnitStride();
iter2_.advanceUnitStride();
iter3_.advanceUnitStride();
} }
_bz_bool canCollapse(int outerLoopRank, int innerLoopRank) const bool canCollapse(int outerLoopRank, int innerLoopRank) const
{ {
// BZ_DEBUG_MESSAGE("_bz_ArrayExprUnaryOp<>::canCollapse"); // BZ_DEBUG_MESSAGE("_bz_ArrayExprTernaryOp<>::canCollapse");
return iter_.canCollapse(outerLoopRank, innerLoopRank); return iter1_.canCollapse(outerLoopRank, innerLoopRank)
&& iter2_.canCollapse(outerLoopRank, innerLoopRank)
&& iter3_.canCollapse(outerLoopRank, innerLoopRank);
} }
T_numtype operator[](int i) T_numtype operator[](int i)
{ return T_op::apply(iter_[i]); } { return T_op::apply(iter1_[i], iter2_[i], iter3_[i]); }
T_numtype fastRead(int i) T_numtype fastRead(int i)
{ return T_op::apply(iter_.fastRead(i)); } {
return T_op::apply(iter1_.fastRead(i),
iter2_.fastRead(i),
iter3_.fastRead(i));
}
int suggestStride(int rank) const int suggestStride(int rank) const
{ return iter_.suggestStride(rank); } {
int stride1 = iter1_.suggestStride(rank);
int stride2 = iter2_.suggestStride(rank);
int stride3 = iter3_.suggestStride(rank);
return stride1 > ( stride2 = (stride2>stride3 ? stride2 : stride3)
) ?
stride1 : stride2;
}
_bz_bool isStride(int rank, int stride) const bool isStride(int rank, int stride) const
{ return iter_.isStride(rank,stride); } {
return iter1_.isStride(rank,stride)
&& iter2_.isStride(rank,stride)
&& iter3_.isStride(rank,stride);
}
void prettyPrint(string& str, prettyPrintFormat& format) const template<int N_rank>
{ T_op::prettyPrint(str, format, iter_); } void moveTo(const TinyVector<int,N_rank>& i)
{
iter1_.moveTo(i);
iter2_.moveTo(i);
iter3_.moveTo(i);
}
template<class T_shape> void prettyPrint(BZ_STD_SCOPE(string) &str,
_bz_bool shapeCheck(const T_shape& shape) prettyPrintFormat& format) const
{ return iter_.shapeCheck(shape); } {
T_op::prettyPrint(str, format, iter1_, iter2_, iter3_);
}
template<typename T_shape>
bool shapeCheck(const T_shape& shape)
{
return iter1_.shapeCheck(shape)
&& iter2_.shapeCheck(shape)
&& iter3_.shapeCheck(shape);
}
protected: protected:
_bz_ArrayExprUnaryOp() { } _bz_ArrayExprTernaryOp() { }
T_expr iter_; T_expr1 iter1_;
T_expr2 iter2_;
T_expr3 iter3_;
}; };
template<class P_numtype> template<typename P_numtype>
class _bz_ArrayExprConstant { class _bz_ArrayExprConstant {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
typedef T_numtype T_ctorArg1; typedef T_numtype T_ctorArg1;
typedef int T_ctorArg2; // dummy typedef int T_ctorArg2; // dummy
enum { numArrayOperands = 0, numIndexPlaceholders = 0, rank = 0 }; static const int
numArrayOperands = 0,
numIndexPlaceholders = 0,
rank = 0;
_bz_ArrayExprConstant(const _bz_ArrayExprConstant<T_numtype>& a) _bz_ArrayExprConstant(const _bz_ArrayExprConstant<T_numtype>& a)
: value_(a.value_) : value_(a.value_)
{ } { }
_bz_ArrayExprConstant(T_numtype value) _bz_ArrayExprConstant(T_numtype value)
: value_(BZ_NO_PROPAGATE(value)) : value_(BZ_NO_PROPAGATE(value))
{ {
} }
skipping to change at line 695 skipping to change at line 857
T_numtype operator()(const TinyVector<int,N_rank>&) T_numtype operator()(const TinyVector<int,N_rank>&)
{ return value_; } { return value_; }
#endif #endif
void push(int) { } void push(int) { }
void pop(int) { } void pop(int) { }
void advance() { } void advance() { }
void advance(int) { } void advance(int) { }
void loadStride(int) { } void loadStride(int) { }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int) const
{ return _bz_true; } { return true; }
void advanceUnitStride() void advanceUnitStride()
{ } { }
_bz_bool canCollapse(int,int) const bool canCollapse(int,int) const
{ return _bz_true; } { return true; }
T_numtype operator[](int) T_numtype operator[](int)
{ return value_; } { return value_; }
T_numtype fastRead(int) T_numtype fastRead(int)
{ return value_; } { return value_; }
int suggestStride(int) const int suggestStride(int) const
{ return 1; } { return 1; }
_bz_bool isStride(int,int) const bool isStride(int,int) const
{ return _bz_true; } { return true; }
template<int N_rank> template<int N_rank>
void moveTo(const TinyVector<int,N_rank>& i) void moveTo(const TinyVector<int,N_rank>&)
{ {
} }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format) const
{ {
if (format.tersePrintingSelected()) if (format.tersePrintingSelected())
str += format.nextScalarOperandSymbol(); str += format.nextScalarOperandSymbol();
else else
str += BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype); str += BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype);
} }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape&) bool shapeCheck(const T_shape&)
{ return _bz_true; } { return true; }
protected: protected:
_bz_ArrayExprConstant() { } _bz_ArrayExprConstant() { }
T_numtype value_; T_numtype value_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#include <blitz/array/asexpr.h> #include <blitz/array/asexpr.h>
 End of changes. 83 change blocks. 
184 lines changed or deleted 348 lines changed or added


 extremum.h   extremum.h 
/************************************************************************** * /************************************************************************** *
* blitz/extremum.h Declaration of the Extremum<T_numtype, T_index> cl ass * blitz/extremum.h Declaration of the Extremum<T_numtype, T_index> cl ass
* *
* $Id: extremum.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: extremum.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: extremum.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_EXTREMUM_H #ifndef BZ_EXTREMUM_H
#define BZ_EXTREMUM_H #define BZ_EXTREMUM_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// The Extremum class is used for returning extreme values and their // The Extremum class is used for returning extreme values and their
// locations in a numeric container. It's a simple 2-tuple, with the // locations in a numeric container. It's a simple 2-tuple, with the
// first element being the extreme value, and the send its location. // first element being the extreme value, and the send its location.
// An object of type Extremum can be automatically converted to // An object of type Extremum can be automatically converted to
// the numeric type via operator T_numtype(). // the numeric type via operator T_numtype().
template<class P_numtype, class P_index> template<typename P_numtype, typename P_index>
class Extremum { class Extremum {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
typedef P_index T_index; typedef P_index T_index;
Extremum(T_numtype value, T_index index) Extremum(T_numtype value, T_index index)
: value_(value), index_(index) : value_(value), index_(index)
{ } { }
T_numtype value() const T_numtype value() const
 End of changes. 3 change blocks. 
25 lines changed or deleted 4 lines changed or added


 fastiter.h   fastiter.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/iter.h Declaration of FastArrayIterator<P_numtype,N_rank > * blitz/array/iter.h Declaration of FastArrayIterator<P_numtype,N_rank >
* *
* $Id: fastiter.h,v 1.5 2002/09/20 01:10:32 jcumming Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: fastiter.h,v $
* Revision 1.5 2002/09/20 01:10:32 jcumming
* Removed meaningless restrict qualifier inside const_cast that generates
* compiler warnings under SGI and KCC compilers.
*
* Revision 1.4 2002/06/28 01:39:47 jcumming
* Changed order of ctor initializers to match order of member data declara
tions,
* eliminating warning from gcc compiler.
*
* Revision 1.3 2002/03/06 17:45:07 patricg
*
* for BZ_HAVE_STD only
* #include <strstream> replaced by #include <sstream>
* ostrstream ostr replaced by ostringstream ostr
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:15 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_ARRAY_FASTITER_H #ifndef BZ_ARRAY_FASTITER_H
#define BZ_ARRAY_FASTITER_H #define BZ_ARRAY_FASTITER_H
#ifdef BZ_HAVE_STD #ifdef BZ_HAVE_STD
#include <sstream> #include <sstream>
#else #else
#include <strstream.h> #include <strstream.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/iter.h> must be included via <blitz/array.h> #error <blitz/array/iter.h> must be included via <blitz/array.h>
#endif #endif
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
class FastArrayIterator { class FastArrayIterator {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
typedef Array<T_numtype, N_rank> T_array; typedef Array<T_numtype, N_rank> T_array;
typedef FastArrayIterator<P_numtype, N_rank> T_iterator; typedef FastArrayIterator<P_numtype, N_rank> T_iterator;
typedef const T_array& T_ctorArg1; typedef const T_array& T_ctorArg1;
typedef int T_ctorArg2; // dummy typedef int T_ctorArg2; // dummy
enum { numArrayOperands = 1, numIndexPlaceholders = 0, static const int
rank = N_rank }; numArrayOperands = 1,
numIndexPlaceholders = 0,
rank = N_rank;
// NB: this ctor does NOT preserve stack and stride // NB: this ctor does NOT preserve stack and stride
// parameters. This is for speed purposes. // parameters. This is for speed purposes.
FastArrayIterator(const FastArrayIterator<P_numtype, N_rank>& x) FastArrayIterator(const FastArrayIterator<P_numtype, N_rank>& x)
: data_(x.data_), array_(x.array_) : data_(x.data_), array_(x.array_)
{ } { }
void operator=(const FastArrayIterator<P_numtype, N_rank>& x) void operator=(const FastArrayIterator<P_numtype, N_rank>& x)
{ {
array_ = x.array_; array_ = x.array_;
skipping to change at line 156 skipping to change at line 128
T_numtype operator[](int i) T_numtype operator[](int i)
{ return data_[i * stride_]; } { return data_[i * stride_]; }
T_numtype fastRead(int i) T_numtype fastRead(int i)
{ return data_[i]; } { return data_[i]; }
int suggestStride(int rank) const int suggestStride(int rank) const
{ return array_.stride(rank); } { return array_.stride(rank); }
_bz_bool isStride(int rank, int stride) const bool isStride(int rank, int stride) const
{ return array_.stride(rank) == stride; } { return array_.stride(rank) == stride; }
void push(int position) void push(int position)
{ {
stack_[position] = data_; stack_[position] = data_;
} }
void pop(int position) void pop(int position)
{ {
data_ = stack_[position]; data_ = stack_[position];
skipping to change at line 184 skipping to change at line 156
void advance(int n) void advance(int n)
{ {
data_ += n * stride_; data_ += n * stride_;
} }
void loadStride(int rank) void loadStride(int rank)
{ {
stride_ = array_.stride(rank); stride_ = array_.stride(rank);
} }
const T_numtype * _bz_restrict data() const const T_numtype * restrict data() const
{ return data_; } { return data_; }
void _bz_setData(const T_numtype* ptr) void _bz_setData(const T_numtype* ptr)
{ data_ = ptr; } { data_ = ptr; }
int stride() const int stride() const
{ return stride_; } { return stride_; }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int rank) const
{ return array_.stride(rank) == 1; } { return array_.stride(rank) == 1; }
void advanceUnitStride() void advanceUnitStride()
{ ++data_; } { ++data_; }
_bz_bool canCollapse(int outerLoopRank, int innerLoopRank) const bool canCollapse(int outerLoopRank, int innerLoopRank) const
{ return array_.canCollapse(outerLoopRank, innerLoopRank); } { return array_.canCollapse(outerLoopRank, innerLoopRank); }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format) const
{ {
if (format.tersePrintingSelected()) if (format.tersePrintingSelected())
str += format.nextArrayOperandSymbol(); str += format.nextArrayOperandSymbol();
else if (format.dumpArrayShapesMode()) else if (format.dumpArrayShapesMode())
{ {
#ifdef BZ_HAVE_STD #ifdef BZ_HAVE_STD
ostringstream ostr; BZ_STD_SCOPE(ostringstream) ostr;
#else #else
ostrstream ostr; ostrstream ostr;
#endif #endif
ostr << array_.shape(); ostr << array_.shape();
str += ostr.str(); str += ostr.str();
} }
else { else {
str += "Array<"; str += "Array<";
str += BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype); str += BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype);
str += ","; str += ",";
char tmpBuf[10]; char tmpBuf[10];
sprintf(tmpBuf, "%d", N_rank); sprintf(tmpBuf, "%d", N_rank);
str += tmpBuf; str += tmpBuf;
str += ">"; str += ">";
} }
} }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) bool shapeCheck(const T_shape& shape)
{ return areShapesConformable(shape, array_.length()); } { return areShapesConformable(shape, array_.length()); }
// Experimental // Experimental
T_numtype& operator()(int i) T_numtype& operator()(int i)
{ {
return (T_numtype&)data_[i*array_.stride(0)]; return (T_numtype&)data_[i*array_.stride(0)];
} }
// Experimental // Experimental
T_numtype& operator()(int i, int j) T_numtype& operator()(int i, int j)
skipping to change at line 274 skipping to change at line 247
void moveTo(const TinyVector<int,N_rank>& i) void moveTo(const TinyVector<int,N_rank>& i)
{ {
data_ = &const_cast<T_array&>(array_)(i); data_ = &const_cast<T_array&>(array_)(i);
} }
// Experimental // Experimental
void operator=(T_numtype x) void operator=(T_numtype x)
{ *const_cast<T_numtype*>(data_) = x; } { *const_cast<T_numtype*>(data_) = x; }
// Experimental // Experimental
template<class T_value> template<typename T_value>
void operator=(T_value x) void operator=(T_value x)
{ *const_cast<T_numtype*>(data_) = x; } { *const_cast<T_numtype*>(data_) = x; }
// Experimental // Experimental
template<class T_value> template<typename T_value>
void operator+=(T_value x) void operator+=(T_value x)
{ *const_cast<T_numtype*>(data_) += x; } { *const_cast<T_numtype*>(data_) += x; }
// NEEDS_WORK: other operators // NEEDS_WORK: other operators
// Experimental // Experimental
operator T_numtype() const operator T_numtype() const
{ return *data_; } { return *data_; }
// Experimental // Experimental
skipping to change at line 303 skipping to change at line 276
} }
// Experimental // Experimental
T_numtype shift(int offset1, int dim1, int offset2, int dim2) T_numtype shift(int offset1, int dim1, int offset2, int dim2)
{ {
return data_[offset1*array_.stride(dim1) return data_[offset1*array_.stride(dim1)
+ offset2*array_.stride(dim2)]; + offset2*array_.stride(dim2)];
} }
private: private:
const T_numtype * _bz_restrict data_; const T_numtype * restrict data_;
const T_array& array_; const T_array& array_;
const T_numtype * stack_[N_rank]; ConstPointerStack<T_numtype,N_rank> stack_;
int stride_; int stride_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ARRAY_FASTITER_H #endif // BZ_ARRAY_FASTITER_H
 End of changes. 16 change blocks. 
49 lines changed or deleted 21 lines changed or added


 funcs.h   funcs.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/funcs.h Math functions on arrays * blitz/array/funcs.h Math functions on arrays
* *
* $Id: funcs.h,v 1.5 2002/07/16 22:05:54 jcumming Exp $ * $Id: funcs.h,v 1.10 2004/10/07 00:26:59 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: funcs.h,v $
* Revision 1.5 2002/07/16 22:05:54 jcumming
* Removed ET support for Array expressions involving ldexp(), jn() and yn(
)
* functions. These functions require specialized macros that allow one of
* the function arguments to be an ordinary int. Such macros have not yet
* been added to <blitz/funcs.h>.
*
* Revision 1.4 2002/07/02 19:14:01 jcumming
* Use new style of Array ET macros to declare unary and binary math functi
ons
* that act on Array types.
*
* Revision 1.3 2001/01/26 20:11:25 tveldhui
* Changed isnan to blitz_isnan, to avoid conflicts with implementations
* that define isnan as a preprocessor macro.
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_FUNCS_H #ifndef BZ_ARRAY_FUNCS_H
#define BZ_ARRAY_FUNCS_H #define BZ_ARRAY_FUNCS_H
#ifndef BZ_FUNCS_H #include <blitz/funcs.h>
#include <blitz/funcs.h> #include <blitz/array/newet-macros.h>
#endif
#ifndef BZ_NEWET_MACROS_H
#include <blitz/array/newet-macros.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// unary functions // unary functions
BZ_DECLARE_ARRAY_ET_UNARY(abs, Fn_abs) BZ_DECLARE_ARRAY_ET_UNARY(abs, Fn_abs)
BZ_DECLARE_ARRAY_ET_UNARY(acos, Fn_acos) BZ_DECLARE_ARRAY_ET_UNARY(acos, Fn_acos)
BZ_DECLARE_ARRAY_ET_UNARY(asin, Fn_asin) BZ_DECLARE_ARRAY_ET_UNARY(asin, Fn_asin)
BZ_DECLARE_ARRAY_ET_UNARY(atan, Fn_atan) BZ_DECLARE_ARRAY_ET_UNARY(atan, Fn_atan)
BZ_DECLARE_ARRAY_ET_UNARY(ceil, Fn_ceil) BZ_DECLARE_ARRAY_ET_UNARY(ceil, Fn_ceil)
skipping to change at line 89 skipping to change at line 65
BZ_DECLARE_ARRAY_ET_UNARY(pow6, Fn_pow6) BZ_DECLARE_ARRAY_ET_UNARY(pow6, Fn_pow6)
BZ_DECLARE_ARRAY_ET_UNARY(pow7, Fn_pow7) BZ_DECLARE_ARRAY_ET_UNARY(pow7, Fn_pow7)
BZ_DECLARE_ARRAY_ET_UNARY(pow8, Fn_pow8) BZ_DECLARE_ARRAY_ET_UNARY(pow8, Fn_pow8)
BZ_DECLARE_ARRAY_ET_UNARY(sin, Fn_sin) BZ_DECLARE_ARRAY_ET_UNARY(sin, Fn_sin)
BZ_DECLARE_ARRAY_ET_UNARY(sinh, Fn_sinh) BZ_DECLARE_ARRAY_ET_UNARY(sinh, Fn_sinh)
BZ_DECLARE_ARRAY_ET_UNARY(sqr, Fn_sqr) BZ_DECLARE_ARRAY_ET_UNARY(sqr, Fn_sqr)
BZ_DECLARE_ARRAY_ET_UNARY(sqrt, Fn_sqrt) BZ_DECLARE_ARRAY_ET_UNARY(sqrt, Fn_sqrt)
BZ_DECLARE_ARRAY_ET_UNARY(tan, Fn_tan) BZ_DECLARE_ARRAY_ET_UNARY(tan, Fn_tan)
BZ_DECLARE_ARRAY_ET_UNARY(tanh, Fn_tanh) BZ_DECLARE_ARRAY_ET_UNARY(tanh, Fn_tanh)
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
BZ_DECLARE_ARRAY_ET_UNARY(arg, Fn_arg) BZ_DECLARE_ARRAY_ET_UNARY(arg, Fn_arg)
BZ_DECLARE_ARRAY_ET_UNARY(conj, Fn_conj) BZ_DECLARE_ARRAY_ET_UNARY(conj, Fn_conj)
BZ_DECLARE_ARRAY_ET_UNARY(imag, Fn_imag) BZ_DECLARE_ARRAY_ET_UNARY(imag, Fn_imag)
BZ_DECLARE_ARRAY_ET_UNARY(norm, Fn_norm) BZ_DECLARE_ARRAY_ET_UNARY(norm, Fn_norm)
BZ_DECLARE_ARRAY_ET_UNARY(real, Fn_real) BZ_DECLARE_ARRAY_ET_UNARY(real, Fn_real)
#endif #endif
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
// finite and trunc omitted: blitz-bugs/archive/0189.html // finite and trunc omitted: blitz-bugs/archive/0189.html
BZ_DECLARE_ARRAY_ET_UNARY(acosh, Fn_acosh) BZ_DECLARE_ARRAY_ET_UNARY(acosh, Fn_acosh)
skipping to change at line 130 skipping to change at line 106
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
BZ_DECLARE_ARRAY_ET_UNARY(_class, Fn__class) BZ_DECLARE_ARRAY_ET_UNARY(_class, Fn__class)
BZ_DECLARE_ARRAY_ET_UNARY(itrunc, Fn_itrunc) BZ_DECLARE_ARRAY_ET_UNARY(itrunc, Fn_itrunc)
BZ_DECLARE_ARRAY_ET_UNARY(nearest, Fn_nearest) BZ_DECLARE_ARRAY_ET_UNARY(nearest, Fn_nearest)
BZ_DECLARE_ARRAY_ET_UNARY(rsqrt, Fn_rsqrt) BZ_DECLARE_ARRAY_ET_UNARY(rsqrt, Fn_rsqrt)
BZ_DECLARE_ARRAY_ET_UNARY(uitrunc, Fn_uitrunc) BZ_DECLARE_ARRAY_ET_UNARY(uitrunc, Fn_uitrunc)
#endif #endif
// cast() function // cast() function
template<class T_cast, class T1> template<typename T_cast, typename T1>
_bz_inline_et _bz_inline_et
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_typename asExpr<T1>::T_expr, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_typename asExpr<T1>::T_expr,
Cast<_bz_typename asExpr<T1>::T_expr::T_numtype, T_cast> > > Cast<_bz_typename asExpr<T1>::T_expr::T_numtype, T_cast> > >
cast(const ETBase<T1>& expr) cast(const ETBase<T1>& expr)
{ {
return _bz_ArrayExpr<_bz_ArrayExprUnaryOp< return _bz_ArrayExpr<_bz_ArrayExprUnaryOp<
_bz_typename asExpr<T1>::T_expr, _bz_typename asExpr<T1>::T_expr,
Cast<_bz_typename asExpr<T1>::T_expr::T_numtype,T_cast> > > Cast<_bz_typename asExpr<T1>::T_expr::T_numtype,T_cast> > >
(static_cast<const T1&>(expr)); (expr.unwrap());
} }
// binary functions // binary functions
BZ_DECLARE_ARRAY_ET_BINARY(atan2, Fn_atan2) BZ_DECLARE_ARRAY_ET_BINARY(atan2, Fn_atan2)
BZ_DECLARE_ARRAY_ET_BINARY(fmod, Fn_fmod) BZ_DECLARE_ARRAY_ET_BINARY(fmod, Fn_fmod)
BZ_DECLARE_ARRAY_ET_BINARY(pow, Fn_pow) BZ_DECLARE_ARRAY_ET_BINARY(pow, Fn_pow)
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
BZ_DECLARE_ARRAY_ET_BINARY(polar, Fn_polar) BZ_DECLARE_ARRAY_ET_BINARY(polar, Fn_polar)
#endif #endif
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
BZ_DECLARE_ARRAY_ET_BINARY(copysign, Fn_copysign) BZ_DECLARE_ARRAY_ET_BINARY(copysign, Fn_copysign)
BZ_DECLARE_ARRAY_ET_BINARY(drem, Fn_drem) BZ_DECLARE_ARRAY_ET_BINARY(drem, Fn_drem)
BZ_DECLARE_ARRAY_ET_BINARY(hypot, Fn_hypot) BZ_DECLARE_ARRAY_ET_BINARY(hypot, Fn_hypot)
BZ_DECLARE_ARRAY_ET_BINARY(nextafter, Fn_nextafter) BZ_DECLARE_ARRAY_ET_BINARY(nextafter, Fn_nextafter)
BZ_DECLARE_ARRAY_ET_BINARY(remainder, Fn_remainder) BZ_DECLARE_ARRAY_ET_BINARY(remainder, Fn_remainder)
BZ_DECLARE_ARRAY_ET_BINARY(scalb, Fn_scalb) BZ_DECLARE_ARRAY_ET_BINARY(scalb, Fn_scalb)
BZ_DECLARE_ARRAY_ET_BINARY(unordered, Fn_unordered) BZ_DECLARE_ARRAY_ET_BINARY(unordered, Fn_unordered)
#endif #endif
#ifdef BZ_HAVE_SYSTEM_V_MATH
#define BZ_DECLARE_ARRAY_ET_SCALAR_FUNCS(sca) \
\
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(atan2, Fn_atan2, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(fmod, Fn_fmod, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(pow, Fn_pow, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(copysign, Fn_copysign, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(drem, Fn_drem, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(hypot, Fn_hypot, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(nextafter, Fn_nextafter, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(remainder, Fn_remainder, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(scalb, Fn_scalb, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(unordered, Fn_unordered, sca) \
#else
#define BZ_DECLARE_ARRAY_ET_SCALAR_FUNCS(sca) \
\
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(atan2, Fn_atan2, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(fmod, Fn_fmod, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(pow, Fn_pow, sca) \
#endif
BZ_DECLARE_ARRAY_ET_SCALAR_FUNCS(int)
BZ_DECLARE_ARRAY_ET_SCALAR_FUNCS(float)
BZ_DECLARE_ARRAY_ET_SCALAR_FUNCS(double)
BZ_DECLARE_ARRAY_ET_SCALAR_FUNCS(long double)
#ifdef BZ_HAVE_COMPLEX_FCNS
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(polar, Fn_polar, int)
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(polar, Fn_polar, float)
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(polar, Fn_polar, double)
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(polar, Fn_polar, long double)
template<typename T1, typename T2>
inline _bz_ArrayExprBinaryOp<
typename asExpr<complex<T1> >::T_expr,
typename asExpr<T2>::T_expr,
Fn_pow<complex<T1>,typename asExpr<T2>::T_expr::T_numtype> >
pow(const complex<T1> d1, const ETBase<T2>& d2)
{
return _bz_ArrayExprBinaryOp<
typename asExpr<complex<T1> >::T_expr,
typename asExpr<T2>::T_expr,
Fn_pow<complex<T1>,typename asExpr<T2>::T_expr::T_numtype> >
(asExpr<complex<T1> >::getExpr(d1),
asExpr<T2>::getExpr(d2.unwrap()));
}
#endif
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ARRAY_FUNCS_H #endif // BZ_ARRAY_FUNCS_H
 End of changes. 9 change blocks. 
36 lines changed or deleted 63 lines changed or added


 functorExpr.h   functorExpr.h 
// -*- C++ -*-
/**************************************************************************
*
* blitz/array/functorExpr.h User-defined functors for arrays
*
* $Id: functorExpr.h,v 1.8 2005/05/07 04:17:57 julianc Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org
*
* For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/
*
**************************************************************************
**/
/* This header file is designed to allow the use of Blitz++ with /* This header file is designed to allow the use of Blitz++ with
functors (classes defining an operator()) and more general member functors (classes defining an operator()) and more general member
functions. It works best if you have access to the class source code; functions. It works best if you have access to the class source code;
there is limited support for classes that cannot be modified. The best there is limited support for classes that cannot be modified. The best
approach in that case is usually to write an adapter class. approach in that case is usually to write an adapter class.
This works with class methods that take one, two or three arguments. This works with class methods that take one, two or three arguments.
If you have a functor, add the following to your (public) class declarat ion: If you have a functor, add the following to your (public) class declarat ion:
skipping to change at line 70 skipping to change at line 95
*/ */
#ifndef BZ_ARRAY_FUNCTOREXPR_H #ifndef BZ_ARRAY_FUNCTOREXPR_H
#define BZ_ARRAY_FUNCTOREXPR_H #define BZ_ARRAY_FUNCTOREXPR_H
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/functorExpr.h> must be included via <blitz/array.h> #error <blitz/array/functorExpr.h> must be included via <blitz/array.h>
#endif #endif
#ifndef BZ_PRETTYPRINT_H #include <blitz/prettyprint.h>
#include <blitz/prettyprint.h> #include <blitz/shapecheck.h>
#endif #include <blitz/tinyvec.h>
#ifndef BZ_SHAPECHECK_H
#include <blitz/shapecheck.h>
#endif
#ifndef BZ_TINYVEC_H
#include <blitz/tinyvec.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_functor, class P_expr, class P_result> template<typename P_functor, typename P_expr, typename P_result>
class _bz_FunctorExpr { class _bz_FunctorExpr {
public: public:
typedef P_functor T_functor; typedef P_functor T_functor;
typedef P_expr T_expr; typedef P_expr T_expr;
typedef _bz_typename T_expr::T_numtype T_numtype1; typedef _bz_typename T_expr::T_numtype T_numtype1;
typedef P_result T_numtype; typedef P_result T_numtype;
typedef T_expr T_ctorArg1; typedef T_expr T_ctorArg1;
typedef int T_ctorArg2; // dummy typedef int T_ctorArg2; // dummy
typedef int T_ctorArg3; // dummy typedef int T_ctorArg3; // dummy
enum { numArrayOperands = BZ_ENUM_CAST(T_expr::numArrayOperands), static const int
numIndexPlaceholders = BZ_ENUM_CAST(T_expr::numIndexPlaceholders) numArrayOperands = T_expr::numArrayOperands,
, numIndexPlaceholders = T_expr::numIndexPlaceholders,
rank = BZ_ENUM_CAST(T_expr::rank) rank = T_expr::rank;
};
_bz_FunctorExpr(const _bz_FunctorExpr<P_functor,P_expr,P_result>& a) _bz_FunctorExpr(const _bz_FunctorExpr<P_functor,P_expr,P_result>& a)
: f_(a.f_), iter_(a.iter_) : f_(a.f_), iter_(a.iter_)
{ } { }
_bz_FunctorExpr(BZ_ETPARM(T_functor) f, BZ_ETPARM(T_expr) a) _bz_FunctorExpr(BZ_ETPARM(T_functor) f, BZ_ETPARM(T_expr) a)
: f_(f), iter_(a) : f_(f), iter_(a)
{ } { }
_bz_FunctorExpr(BZ_ETPARM(T_functor) f, _bz_typename T_expr::T_ctorArg1 a) _bz_FunctorExpr(BZ_ETPARM(T_functor) f, _bz_typename T_expr::T_ctorArg1 a)
: f_(f), iter_(a) : f_(f), iter_(a)
{ } { }
#if BZ_TEMPLATE_CTOR_DOESNT_CAUSE_HAVOC #if BZ_TEMPLATE_CTOR_DOESNT_CAUSE_HAVOC
template<class T1> template<typename T1>
_bz_explicit _bz_FunctorExpr(BZ_ETPARM(T_functor) f, BZ_ETPARM(T1) a) explicit _bz_FunctorExpr(BZ_ETPARM(T_functor) f, BZ_ETPARM(T1) a)
: f_(f), iter_(a) : f_(f), iter_(a)
{ } { }
#endif #endif
T_numtype operator*() T_numtype operator*()
{ return f_(*iter_); } { return f_(*iter_); }
#ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE #ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE
template<int N_rank> template<int N_rank>
T_numtype operator()(TinyVector<int,N_rank> i) T_numtype operator()(TinyVector<int,N_rank> i)
skipping to change at line 159 skipping to change at line 176
void advance() void advance()
{ iter_.advance(); } { iter_.advance(); }
void advance(int n) void advance(int n)
{ iter_.advance(n); } { iter_.advance(n); }
void loadStride(int rank) void loadStride(int rank)
{ iter_.loadStride(rank); } { iter_.loadStride(rank); }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int rank) const
{ return iter_.isUnitStride(rank); } { return iter_.isUnitStride(rank); }
void advanceUnitStride() void advanceUnitStride()
{ iter_.advanceUnitStride(); } { iter_.advanceUnitStride(); }
_bz_bool canCollapse(int outerLoopRank, int innerLoopRank) const bool canCollapse(int outerLoopRank, int innerLoopRank) const
{ {
return iter_.canCollapse(outerLoopRank, innerLoopRank); return iter_.canCollapse(outerLoopRank, innerLoopRank);
} }
T_numtype operator[](int i) T_numtype operator[](int i)
{ return f_(iter_[i]); } { return f_(iter_[i]); }
T_numtype fastRead(int i) T_numtype fastRead(int i)
{ return f_(iter_.fastRead(i)); } { return f_(iter_.fastRead(i)); }
int suggestStride(int rank) const int suggestStride(int rank) const
{ return iter_.suggestStride(rank); } { return iter_.suggestStride(rank); }
_bz_bool isStride(int rank, int stride) const bool isStride(int rank, int stride) const
{ return iter_.isStride(rank,stride); } { return iter_.isStride(rank,stride); }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format) const
{ {
str += BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_functor); str += BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_functor);
str += "("; str += "(";
iter_.prettyPrint(str, format); iter_.prettyPrint(str, format);
str += ")"; str += ")";
} }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) bool shapeCheck(const T_shape& shape)
{ return iter_.shapeCheck(shape); } { return iter_.shapeCheck(shape); }
template<int N_rank> template<int N_rank>
void moveTo(const TinyVector<int,N_rank>& i) void moveTo(const TinyVector<int,N_rank>& i)
{ {
iter_.moveTo(i); iter_.moveTo(i);
} }
protected: protected:
_bz_FunctorExpr() { } _bz_FunctorExpr() { }
T_functor f_; T_functor f_;
T_expr iter_; T_expr iter_;
}; };
template<class P_functor, class P_expr1, class P_expr2, class P_result> template<typename P_functor, typename P_expr1, typename P_expr2, typename P _result>
class _bz_FunctorExpr2 class _bz_FunctorExpr2
{ {
public: public:
typedef P_functor T_functor; typedef P_functor T_functor;
typedef P_expr1 T_expr1; typedef P_expr1 T_expr1;
typedef P_expr2 T_expr2; typedef P_expr2 T_expr2;
typedef _bz_typename T_expr1::T_numtype T_numtype1; typedef _bz_typename T_expr1::T_numtype T_numtype1;
typedef _bz_typename T_expr2::T_numtype T_numtype2; typedef _bz_typename T_expr2::T_numtype T_numtype2;
typedef P_result T_numtype; typedef P_result T_numtype;
typedef T_expr1 T_ctorArg1; typedef T_expr1 T_ctorArg1;
typedef T_expr1 T_ctorArg2; typedef T_expr1 T_ctorArg2;
typedef int T_ctorArg3; // dummy typedef int T_ctorArg3; // dummy
enum { numArrayOperands = BZ_ENUM_CAST(T_expr1::numArrayOperands) + static const int
BZ_ENUM_CAST(T_expr2::numArrayOperands), numArrayOperands = T_expr1::numArrayOperands
numIndexPlaceholders = BZ_ENUM_CAST(T_expr1::numIndexPlaceholders + T_expr2::numArrayOperands,
) + numIndexPlaceholders = T_expr1::numIndexPlaceholders
BZ_ENUM_CAST(T_expr2::numIndexPlaceholders + T_expr2::numIndexPlaceholders,
), rank = T_expr1::rank > T_expr2::rank
rank = BZ_ENUM_CAST(T_expr1::rank) > BZ_ENUM_CAST(T_expr2::rank) ? T_expr1::rank : T_expr2::rank;
?
BZ_ENUM_CAST(T_expr1::rank) : BZ_ENUM_CAST(T_expr2::rank)
};
_bz_FunctorExpr2(const _bz_FunctorExpr2<P_functor, P_expr1, P_expr2, _bz_FunctorExpr2(const _bz_FunctorExpr2<P_functor, P_expr1, P_expr2,
P_result>& a) P_result>& a)
: f_(a.f_), iter1_(a.iter1_), iter2_(a.iter2_) : f_(a.f_), iter1_(a.iter1_), iter2_(a.iter2_)
{ } { }
_bz_FunctorExpr2(BZ_ETPARM(T_functor) f, BZ_ETPARM(T_expr1) a, _bz_FunctorExpr2(BZ_ETPARM(T_functor) f, BZ_ETPARM(T_expr1) a,
BZ_ETPARM(T_expr2) b) BZ_ETPARM(T_expr2) b)
: f_(f), iter1_(a), iter2_(b) : f_(f), iter1_(a), iter2_(b)
{ } { }
template<class T1, class T2> template<typename T1, typename T2>
_bz_FunctorExpr2(BZ_ETPARM(T_functor) f, BZ_ETPARM(T1) a, BZ_ETPARM(T2) b) _bz_FunctorExpr2(BZ_ETPARM(T_functor) f, BZ_ETPARM(T1) a, BZ_ETPARM(T2) b)
: f_(f), iter1_(a), iter2_(b) : f_(f), iter1_(a), iter2_(b)
{ } { }
T_numtype operator*() T_numtype operator*()
{ return f_(*iter1_, *iter2_); } { return f_(*iter1_, *iter2_); }
#ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE #ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE
template<int N_rank> template<int N_rank>
T_numtype operator()(TinyVector<int, N_rank> i) T_numtype operator()(TinyVector<int, N_rank> i)
skipping to change at line 311 skipping to change at line 329
iter1_.advance(n); iter1_.advance(n);
iter2_.advance(n); iter2_.advance(n);
} }
void loadStride(int rank) void loadStride(int rank)
{ {
iter1_.loadStride(rank); iter1_.loadStride(rank);
iter2_.loadStride(rank); iter2_.loadStride(rank);
} }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int rank) const
{ return iter1_.isUnitStride(rank) && iter2_.isUnitStride(rank); } { return iter1_.isUnitStride(rank) && iter2_.isUnitStride(rank); }
void advanceUnitStride() void advanceUnitStride()
{ {
iter1_.advanceUnitStride(); iter1_.advanceUnitStride();
iter2_.advanceUnitStride(); iter2_.advanceUnitStride();
} }
_bz_bool canCollapse(int outerLoopRank, int innerLoopRank) const bool canCollapse(int outerLoopRank, int innerLoopRank) const
{ {
return iter1_.canCollapse(outerLoopRank, innerLoopRank) return iter1_.canCollapse(outerLoopRank, innerLoopRank)
&& iter2_.canCollapse(outerLoopRank, innerLoopRank); && iter2_.canCollapse(outerLoopRank, innerLoopRank);
} }
T_numtype operator[](int i) T_numtype operator[](int i)
{ return f_(iter1_[i], iter2_[i]); } { return f_(iter1_[i], iter2_[i]); }
T_numtype fastRead(int i) T_numtype fastRead(int i)
{ return f_(iter1_.fastRead(i), iter2_.fastRead(i)); } { return f_(iter1_.fastRead(i), iter2_.fastRead(i)); }
int suggestStride(int rank) const int suggestStride(int rank) const
{ {
int stride1 = iter1_.suggestStride(rank); int stride1 = iter1_.suggestStride(rank);
int stride2 = iter2_.suggestStride(rank); int stride2 = iter2_.suggestStride(rank);
return ( stride1>stride2 ? stride1 : stride2 ); return ( stride1>stride2 ? stride1 : stride2 );
} }
_bz_bool isStride(int rank, int stride) const bool isStride(int rank, int stride) const
{ {
return iter1_.isStride(rank,stride) && iter2_.isStride(rank,stride) ; return iter1_.isStride(rank,stride) && iter2_.isStride(rank,stride) ;
} }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format) const
{ {
str += BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_functor); str += BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_functor);
str += "("; str += "(";
iter1_.prettyPrint(str, format); iter1_.prettyPrint(str, format);
str += ","; str += ",";
iter2_.prettyPrint(str, format); iter2_.prettyPrint(str, format);
str += ")"; str += ")";
} }
template<int N_rank> template<int N_rank>
void moveTo(const TinyVector<int,N_rank>& i) void moveTo(const TinyVector<int,N_rank>& i)
{ {
iter1_.moveTo(i); iter1_.moveTo(i);
iter2_.moveTo(i); iter2_.moveTo(i);
} }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) bool shapeCheck(const T_shape& shape)
{ return iter1_.shapeCheck(shape) && iter2_.shapeCheck(shape); } { return iter1_.shapeCheck(shape) && iter2_.shapeCheck(shape); }
protected: protected:
_bz_FunctorExpr2() { } _bz_FunctorExpr2() { }
T_functor f_; T_functor f_;
T_expr1 iter1_; T_expr1 iter1_;
T_expr2 iter2_; T_expr2 iter2_;
}; };
template<class P_functor, class P_expr1, class P_expr2, class P_expr3, template<typename P_functor, typename P_expr1, typename P_expr2, typename P _expr3,
class P_result> class P_result>
class _bz_FunctorExpr3 class _bz_FunctorExpr3
{ {
public: public:
typedef P_functor T_functor; typedef P_functor T_functor;
typedef P_expr1 T_expr1; typedef P_expr1 T_expr1;
typedef P_expr2 T_expr2; typedef P_expr2 T_expr2;
typedef P_expr3 T_expr3; typedef P_expr3 T_expr3;
typedef _bz_typename T_expr1::T_numtype T_numtype1; typedef _bz_typename T_expr1::T_numtype T_numtype1;
typedef _bz_typename T_expr2::T_numtype T_numtype2; typedef _bz_typename T_expr2::T_numtype T_numtype2;
typedef _bz_typename T_expr3::T_numtype T_numtype3; typedef _bz_typename T_expr3::T_numtype T_numtype3;
typedef P_result T_numtype; typedef P_result T_numtype;
typedef T_expr1 T_ctorArg1; typedef T_expr1 T_ctorArg1;
typedef T_expr2 T_ctorArg2; typedef T_expr2 T_ctorArg2;
typedef T_expr3 T_ctorArg3; typedef T_expr3 T_ctorArg3;
enum { numArrayOperands = BZ_ENUM_CAST(T_expr1::numArrayOperands) + static const int
BZ_ENUM_CAST(T_expr2::numArrayOperands) + numArrayOperands = T_expr1::numArrayOperands
BZ_ENUM_CAST(T_expr3::numArrayOperands), + T_expr2::numArrayOperands
numIndexPlaceholders = BZ_ENUM_CAST(T_expr1::numIndexPlaceholders + T_expr3::numArrayOperands,
) + numIndexPlaceholders = T_expr1::numIndexPlaceholders
BZ_ENUM_CAST(T_expr2::numIndexPlaceholders + T_expr2::numIndexPlaceholders
) + + T_expr3::numIndexPlaceholders,
BZ_ENUM_CAST(T_expr3::numIndexPlaceholders rank12 = T_expr1::rank > T_expr2::rank
), ? T_expr1::rank : T_expr2::rank,
rank12 = BZ_ENUM_CAST(T_expr1::rank) > BZ_ENUM_CAST(T_expr2::rank rank = rank12 > T_expr3::rank ? rank12 : T_expr3::rank;
) ?
BZ_ENUM_CAST(T_expr1::rank) : BZ_ENUM_CAST(T_expr2::rank
),
rank = rank12 > BZ_ENUM_CAST(T_expr3::rank) ?
rank12 : BZ_ENUM_CAST(T_expr3::rank)
};
_bz_FunctorExpr3(const _bz_FunctorExpr3<P_functor, P_expr1, P_expr2, _bz_FunctorExpr3(const _bz_FunctorExpr3<P_functor, P_expr1, P_expr2,
P_expr3, P_result>& a) P_expr3, P_result>& a)
: f_(a.f_), iter1_(a.iter1_), iter2_(a.iter2_), iter3_(a.iter3_) : f_(a.f_), iter1_(a.iter1_), iter2_(a.iter2_), iter3_(a.iter3_)
{ } { }
_bz_FunctorExpr3(BZ_ETPARM(T_functor) f, BZ_ETPARM(T_expr1) a, _bz_FunctorExpr3(BZ_ETPARM(T_functor) f, BZ_ETPARM(T_expr1) a,
BZ_ETPARM(T_expr2) b, BZ_ETPARM(T_expr3) c) BZ_ETPARM(T_expr2) b, BZ_ETPARM(T_expr3) c)
: f_(f), iter1_(a), iter2_(b), iter3_(c) : f_(f), iter1_(a), iter2_(b), iter3_(c)
{ } { }
template<class T1, class T2, class T3> template<typename T1, typename T2, typename T3>
_bz_FunctorExpr3(BZ_ETPARM(T_functor) f, BZ_ETPARM(T1) a, BZ_ETPARM(T2) b, _bz_FunctorExpr3(BZ_ETPARM(T_functor) f, BZ_ETPARM(T1) a, BZ_ETPARM(T2) b,
BZ_ETPARM(T3) c) BZ_ETPARM(T3) c)
: f_(f), iter1_(a), iter2_(b), iter3_(c) : f_(f), iter1_(a), iter2_(b), iter3_(c)
{ } { }
T_numtype operator*() T_numtype operator*()
{ return f_(*iter1_, *iter2_, *iter3_); } { return f_(*iter1_, *iter2_, *iter3_); }
#ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE #ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE
template<int N_rank> template<int N_rank>
skipping to change at line 494 skipping to change at line 512
iter3_.advance(n); iter3_.advance(n);
} }
void loadStride(int rank) void loadStride(int rank)
{ {
iter1_.loadStride(rank); iter1_.loadStride(rank);
iter2_.loadStride(rank); iter2_.loadStride(rank);
iter3_.loadStride(rank); iter3_.loadStride(rank);
} }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int rank) const
{ {
return iter1_.isUnitStride(rank) && iter2_.isUnitStride(rank) return iter1_.isUnitStride(rank) && iter2_.isUnitStride(rank)
&& iter3_.isUnitStride(rank); && iter3_.isUnitStride(rank);
} }
void advanceUnitStride() void advanceUnitStride()
{ {
iter1_.advanceUnitStride(); iter1_.advanceUnitStride();
iter2_.advanceUnitStride(); iter2_.advanceUnitStride();
iter3_.advanceUnitStride(); iter3_.advanceUnitStride();
} }
_bz_bool canCollapse(int outerLoopRank, int innerLoopRank) const bool canCollapse(int outerLoopRank, int innerLoopRank) const
{ {
return iter1_.canCollapse(outerLoopRank, innerLoopRank) return iter1_.canCollapse(outerLoopRank, innerLoopRank)
&& iter2_.canCollapse(outerLoopRank, innerLoopRank) && iter2_.canCollapse(outerLoopRank, innerLoopRank)
&& iter3_.canCollapse(outerLoopRank, innerLoopRank); && iter3_.canCollapse(outerLoopRank, innerLoopRank);
} }
T_numtype operator[](int i) T_numtype operator[](int i)
{ return f_(iter1_[i], iter2_[i], iter3_[i]); } { return f_(iter1_[i], iter2_[i], iter3_[i]); }
T_numtype fastRead(int i) T_numtype fastRead(int i)
skipping to change at line 529 skipping to change at line 547
int suggestStride(int rank) const int suggestStride(int rank) const
{ {
int stride1 = iter1_.suggestStride(rank); int stride1 = iter1_.suggestStride(rank);
int stride2 = iter2_.suggestStride(rank); int stride2 = iter2_.suggestStride(rank);
int stride3 = iter3_.suggestStride(rank); int stride3 = iter3_.suggestStride(rank);
return ( stride1 > (stride2 = (stride2>stride3 ? stride2 : stride3)) ? return ( stride1 > (stride2 = (stride2>stride3 ? stride2 : stride3)) ?
stride1 : stride2 ); stride1 : stride2 );
} }
_bz_bool isStride(int rank, int stride) const bool isStride(int rank, int stride) const
{ {
return iter1_.isStride(rank,stride) && iter2_.isStride(rank,stride) return iter1_.isStride(rank,stride) && iter2_.isStride(rank,stride)
&& iter3_.isStride(rank,stride); && iter3_.isStride(rank,stride);
} }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format) const
{ {
str += BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_functor); str += BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_functor);
str += "("; str += "(";
iter1_.prettyPrint(str, format); iter1_.prettyPrint(str, format);
str += ","; str += ",";
iter2_.prettyPrint(str, format); iter2_.prettyPrint(str, format);
str += ","; str += ",";
iter3_.prettyPrint(str, format); iter3_.prettyPrint(str, format);
str += ")"; str += ")";
} }
template<int N_rank> template<int N_rank>
void moveTo(const TinyVector<int,N_rank>& i) void moveTo(const TinyVector<int,N_rank>& i)
{ {
iter1_.moveTo(i); iter1_.moveTo(i);
iter2_.moveTo(i); iter2_.moveTo(i);
iter3_.moveTo(i); iter3_.moveTo(i);
} }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) bool shapeCheck(const T_shape& shape)
{ {
return iter1_.shapeCheck(shape) && iter2_.shapeCheck(shape) return iter1_.shapeCheck(shape) && iter2_.shapeCheck(shape)
&& iter3_.shapeCheck(shape); && iter3_.shapeCheck(shape);
} }
protected: protected:
_bz_FunctorExpr3() { } _bz_FunctorExpr3() { }
T_functor f_; T_functor f_;
T_expr1 iter1_; T_expr1 iter1_;
T_expr2 iter2_; T_expr2 iter2_;
T_expr3 iter3_; T_expr3 iter3_;
}; };
template<class P_functor, class P_expr> template<typename P_functor, typename P_expr>
_bz_inline_et _bz_inline_et
_bz_ArrayExpr<_bz_FunctorExpr<P_functor, _bz_typename asExpr<P_expr>::T_exp r, _bz_ArrayExpr<_bz_FunctorExpr<P_functor, _bz_typename asExpr<P_expr>::T_exp r,
_bz_typename asExpr<P_expr>::T_expr::T_numtype> > _bz_typename asExpr<P_expr>::T_expr::T_numtype> >
applyFunctor(const P_functor& f, const ETBase<P_expr>& a) applyFunctor(const P_functor& f, const ETBase<P_expr>& a)
{ {
return _bz_ArrayExpr<_bz_FunctorExpr<P_functor, typedef _bz_FunctorExpr<P_functor,
_bz_typename asExpr<P_expr>::T_expr, _bz_typename asExpr<P_expr>::T_expr,
_bz_typename asExpr<P_expr>::T_expr::T_numtype> > _bz_typename asExpr<P_expr>::T_expr::T_numtype> f1;
(f, static_cast<const P_expr&>(a)); return _bz_ArrayExpr<f1>(f, a.unwrap());
} }
template<class P_functor, class P_expr1, class P_expr2> template<typename P_functor, typename P_expr1, typename P_expr2>
_bz_inline_et _bz_inline_et
_bz_ArrayExpr<_bz_FunctorExpr2<P_functor, _bz_ArrayExpr<_bz_FunctorExpr2<P_functor,
_bz_typename asExpr<P_expr1>::T_expr, _bz_typename asExpr<P_expr2>::T_e _bz_typename asExpr<P_expr1>::T_expr,
xpr, _bz_typename asExpr<P_expr2>::T_expr,
BZ_PROMOTE(_bz_typename asExpr<P_expr1>::T_expr::T_numtype, BZ_PROMOTE(_bz_typename asExpr<P_expr1>::T_expr::T_numtype,
_bz_typename asExpr<P_expr2>::T_expr::T_numtype)> > _bz_typename asExpr<P_expr2>::T_expr::T_numtype)> >
applyFunctor(const P_functor& f, applyFunctor(const P_functor& f,
const ETBase<P_expr1>& a, const ETBase<P_expr2>& b) const ETBase<P_expr1>& a, const ETBase<P_expr2>& b)
{ {
return _bz_ArrayExpr<_bz_FunctorExpr2<P_functor, typedef _bz_FunctorExpr2<P_functor,
_bz_typename asExpr<P_expr1>::T_expr, _bz_typename asExpr<P_expr1>::T_expr,
_bz_typename asExpr<P_expr2>::T_expr, _bz_typename asExpr<P_expr2>::T_expr,
BZ_PROMOTE(_bz_typename asExpr<P_expr1>::T_expr::T_numtype, BZ_PROMOTE(_bz_typename asExpr<P_expr1>::T_expr::T_numtype,
_bz_typename asExpr<P_expr2>::T_expr::T_numtype)> > _bz_typename asExpr<P_expr2>::T_expr::T_numtype)> f2;
(f, static_cast<const P_expr1&>(a), static_cast<const P_expr2&>(b)) return _bz_ArrayExpr<f2>(f, a.unwrap(), b.unwrap());
;
} }
template<class P_functor, class P_expr1, class P_expr2, class P_expr3> template<typename P_functor, typename P_expr1, typename P_expr2, typename P _expr3>
_bz_inline_et _bz_inline_et
_bz_ArrayExpr<_bz_FunctorExpr3<P_functor, _bz_typename asExpr<P_expr1>::T_e _bz_ArrayExpr<_bz_FunctorExpr3<P_functor,
xpr, _bz_typename asExpr<P_expr1>::T_expr,
_bz_typename asExpr<P_expr2>::T_expr, _bz_typename asExpr<P_expr3>::T_e _bz_typename asExpr<P_expr2>::T_expr,
xpr, _bz_typename asExpr<P_expr3>::T_expr,
BZ_PROMOTE(_bz_typename asExpr<P_expr1>::T_expr::T_numtype, BZ_PROMOTE(_bz_typename asExpr<P_expr1>::T_expr::T_numtype,
BZ_PROMOTE(_bz_typename asExpr<P_expr2>::T_expr::T_numtype, BZ_PROMOTE(_bz_typename asExpr<P_expr2>::T_expr::T_numtype,
_bz_typename asExpr<P_expr3>::T_expr::T_numtype))> > _bz_typename asExpr<P_expr3>::T_expr::T_numtype))> >
applyFunctor(const P_functor& f, const ETBase<P_expr1>& a, applyFunctor(const P_functor& f, const ETBase<P_expr1>& a,
const ETBase<P_expr2>& b, const ETBase<P_expr3>& c) const ETBase<P_expr2>& b, const ETBase<P_expr3>& c)
{ {
typedef _bz_FunctorExpr3<P_functor, typedef _bz_FunctorExpr3<P_functor,
_bz_typename asExpr<P_expr1>::T_expr, _bz_typename asExpr<P_expr1>::T_expr,
_bz_typename asExpr<P_expr2>::T_expr, _bz_typename asExpr<P_expr2>::T_expr,
_bz_typename asExpr<P_expr3>::T_expr, _bz_typename asExpr<P_expr3>::T_expr,
BZ_PROMOTE(_bz_typename asExpr<P_expr1>::T_expr::T_numtype, BZ_PROMOTE(_bz_typename asExpr<P_expr1>::T_expr::T_numtype,
BZ_PROMOTE(_bz_typename asExpr<P_expr2>::T_expr::T_numtype, BZ_PROMOTE(_bz_typename asExpr<P_expr2>::T_expr::T_numtype,
_bz_typename asExpr<P_expr3>::T_expr::T_numtype))> f3 ; _bz_typename asExpr<P_expr3>::T_expr::T_numtype))> f3 ;
return _bz_ArrayExpr<f3>(f, a.unwrap(), b.unwrap(), c.unwrap());
return _bz_ArrayExpr< f3 >(
f3(f, static_cast<const P_expr1&>(a),
static_cast<const P_expr2&>(b), static_cast<const P_expr3&>(c)));
} }
BZ_NAMESPACE_END // End of stuff in namespace BZ_NAMESPACE_END // End of stuff in namespace
#define _BZ_MAKE_FUNCTOR(classname, funcname) \ #define _BZ_MAKE_FUNCTOR(classname, funcname) \
class _bz_Functor ## classname ## funcname \ class _bz_Functor ## classname ## funcname \
{ \ { \
public: \ public: \
_bz_Functor ## classname ## funcname (const classname& c) \ _bz_Functor ## classname ## funcname (const classname& c) \
: c_(c) \ : c_(c) \
{ } \ { } \
template<class T_numtype1> \ template<typename T_numtype1> \
inline T_numtype1 operator()(T_numtype1 x) const \ inline T_numtype1 operator()(T_numtype1 x) const \
{ return c_.funcname(x); } \ { return c_.funcname(x); } \
private: \ private: \
const classname& c_; \ const classname& c_; \
}; };
#define _BZ_MAKE_FUNCTOR2(classname, funcname) \ #define _BZ_MAKE_FUNCTOR2(classname, funcname) \
class _bz_Functor ## classname ## funcname \ class _bz_Functor ## classname ## funcname \
{ \ { \
public: \ public: \
_bz_Functor ## classname ## funcname (const classname& c) \ _bz_Functor ## classname ## funcname (const classname& c) \
: c_(c) \ : c_(c) \
{ } \ { } \
template<class T_numtype1, class T_numtype2> \ template<typename T_numtype1, typename T_numtype2> \
inline BZ_PROMOTE(T_numtype1, T_numtype2) \ inline BZ_PROMOTE(T_numtype1, T_numtype2) \
operator()(T_numtype1 x, T_numtype2 y) const \ operator()(T_numtype1 x, T_numtype2 y) const \
{ return c_.funcname(x,y); } \ { return c_.funcname(x,y); } \
private: \ private: \
const classname& c_; \ const classname& c_; \
}; };
#define _BZ_MAKE_FUNCTOR3(classname, funcname) \ #define _BZ_MAKE_FUNCTOR3(classname, funcname) \
class _bz_Functor ## classname ## funcname \ class _bz_Functor ## classname ## funcname \
{ \ { \
public: \ public: \
_bz_Functor ## classname ## funcname (const classname& c) \ _bz_Functor ## classname ## funcname (const classname& c) \
: c_(c) \ : c_(c) \
{ } \ { } \
template<class T_numtype1, class T_numtype2, class T_numtype3> \ template<typename T_numtype1, typename T_numtype2, typename T_numtype3> \
inline BZ_PROMOTE(BZ_PROMOTE(T_numtype1, T_numtype2), T_numtype3) \ inline BZ_PROMOTE(BZ_PROMOTE(T_numtype1, T_numtype2), T_numtype3) \
operator()(T_numtype1 x, T_numtype2 y, T_numtype3 z) const \ operator()(T_numtype1 x, T_numtype2 y, T_numtype3 z) const \
{ return c_.funcname(x,y,z); } \ { return c_.funcname(x,y,z); } \
private: \ private: \
const classname& c_; \ const classname& c_; \
}; };
#define _BZ_MAKE_FUNCTOR_RET(classname, funcname, ret) \ #define _BZ_MAKE_FUNCTOR_RET(classname, funcname, ret) \
class _bz_Functor ## classname ## funcname \ class _bz_Functor ## classname ## funcname \
{ \ { \
public: \ public: \
_bz_Functor ## classname ## funcname (const classname& c) \ _bz_Functor ## classname ## funcname (const classname& c) \
: c_(c) \ : c_(c) \
{ } \ { } \
template<class T_numtype1> \ template<typename T_numtype1> \
inline ret operator()(T_numtype1 x) const \ inline ret operator()(T_numtype1 x) const \
{ return c_.funcname(x); } \ { return c_.funcname(x); } \
private: \ private: \
const classname& c_; \ const classname& c_; \
}; };
#define _BZ_MAKE_FUNCTOR2_RET(classname, funcname, ret) \ #define _BZ_MAKE_FUNCTOR2_RET(classname, funcname, ret) \
class _bz_Functor ## classname ## funcname \ class _bz_Functor ## classname ## funcname \
{ \ { \
public: \ public: \
_bz_Functor ## classname ## funcname (const classname& c) \ _bz_Functor ## classname ## funcname (const classname& c) \
: c_(c) \ : c_(c) \
{ } \ { } \
template<class T_numtype1, class T_numtype2> \ template<typename T_numtype1, typename T_numtype2> \
inline ret operator()(T_numtype1 x, T_numtype2 y) const \ inline ret operator()(T_numtype1 x, T_numtype2 y) const \
{ return c_.funcname(x,y); } \ { return c_.funcname(x,y); } \
private: \ private: \
const classname& c_; \ const classname& c_; \
}; };
#define _BZ_MAKE_FUNCTOR3_RET(classname, funcname, ret) \ #define _BZ_MAKE_FUNCTOR3_RET(classname, funcname, ret) \
class _bz_Functor ## classname ## funcname \ class _bz_Functor ## classname ## funcname \
{ \ { \
public: \ public: \
_bz_Functor ## classname ## funcname (const classname& c) \ _bz_Functor ## classname ## funcname (const classname& c) \
: c_(c) \ : c_(c) \
{ } \ { } \
template<class T_numtype1, class T_numtype2, class T_numtype3> \ template<typename T_numtype1, typename T_numtype2, typename T_numtype3> \
inline ret operator()(T_numtype1 x, T_numtype2 y, T_numtype3 z) const \ inline ret operator()(T_numtype1 x, T_numtype2 y, T_numtype3 z) const \
{ return c_.funcname(x,y,z); } \ { return c_.funcname(x,y,z); } \
private: \ private: \
const classname& c_; \ const classname& c_; \
}; };
#define BZ_DECLARE_FUNCTOR(classname) \ #define BZ_DECLARE_FUNCTOR(classname) \
template<class P_expr> \ template<typename P_expr> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \
classname, \ classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr::T_numtype> > \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr::T_numtype> > \
operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr>& a) const \ operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr>& a) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr)<classname, \ BZ_BLITZ_SCOPE(_bz_FunctorExpr)<classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr::T_numtype> > \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr::T_numtype> > \
(*this, static_cast<const P_expr&>(a)); \ (*this, a.unwrap()); \
} }
#define BZ_DECLARE_FUNCTOR2(classname) \ #define BZ_DECLARE_FUNCTOR2(classname) \
template<class P_expr1, class P_expr2> \ template<typename P_expr1, typename P_expr2> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \
classname, \ classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
BZ_PROMOTE(BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \ BZ_PROMOTE(_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \
_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype)> > \ BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype)> > \
operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \ operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b) const \ const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr2)<classname, \ BZ_BLITZ_SCOPE(_bz_FunctorExpr2)<classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
BZ_PROMOTE(BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \ BZ_PROMOTE(_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \
_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype)> > \ BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype)> > \
(*this, static_cast<const P_expr1&>(a), \ (*this, a.unwrap(), b.unwrap()); \
static_cast<const P_expr2&>(b)); \
} }
#define BZ_DECLARE_FUNCTOR3(classname) \ #define BZ_DECLARE_FUNCTOR3(classname) \
template<class P_expr1, class P_expr2, class P_expr3> \ template<typename P_expr1, typename P_expr2, typename P_expr3> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \
classname, \ classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \
BZ_PROMOTE(BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \ BZ_PROMOTE(_bz_typename \
BZ_PROMOTE(BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype, \ BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \
BZ_PROMOTE(_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype, \
_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr::T_numtype))> > \ BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr::T_numtype))> > \
operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \ operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b, \ const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr3>& c) const \ const BZ_BLITZ_SCOPE(ETBase)<P_expr3>& c) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr3)<classname, \ BZ_BLITZ_SCOPE(_bz_FunctorExpr3)<classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \
BZ_PROMOTE(BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \ BZ_PROMOTE(_bz_typename \
BZ_PROMOTE(BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype, \ BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \
BZ_PROMOTE(_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype, \
_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr::T_numtype))> >\ BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr::T_numtype))> >\
(*this, static_cast<const P_expr1&>(a), \ (*this, a.unwrap(), b.unwrap(), c.unwrap()); \
static_cast<const P_expr2&>(b), \
static_cast<const P_expr3&>(c)); \
} }
#define BZ_DECLARE_FUNCTOR_RET(classname, ret) \ #define BZ_DECLARE_FUNCTOR_RET(classname, ret) \
template<class P_expr> \ template<typename P_expr> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \
classname, \ classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \
ret> > \ ret> > \
operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr>& a) const \ operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr>& a) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr)<classname, \ BZ_BLITZ_SCOPE(_bz_FunctorExpr)<classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \
ret> > \ ret> > \
(*this, static_cast<const P_expr&>(a)); \ (*this, a.unwrap()); \
} }
#define BZ_DECLARE_FUNCTOR2_RET(classname, ret) \ #define BZ_DECLARE_FUNCTOR2_RET(classname, ret) \
template<class P_expr1, class P_expr2> \ template<typename P_expr1, typename P_expr2> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \
classname, \ classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
ret> > \ ret> > \
operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \ operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b) const \ const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr2)<classname, \ BZ_BLITZ_SCOPE(_bz_FunctorExpr2)<classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
ret> > \ ret> > \
(*this, static_cast<const P_expr1&>(a), \ (*this, a.unwrap(), b.unwrap()); \
static_cast<const P_expr2&>(b)); \
} }
#define BZ_DECLARE_FUNCTOR3_RET(classname, ret) \ #define BZ_DECLARE_FUNCTOR3_RET(classname, ret) \
template<class P_expr1, class P_expr2, class P_expr3> \ template<typename P_expr1, typename P_expr2, typename P_expr3> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \
classname, \ classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \
ret> > \ ret> > \
operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \ operator()(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b, \ const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr3>& c) const \ const BZ_BLITZ_SCOPE(ETBase)<P_expr3>& c) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr3)<classname, \ BZ_BLITZ_SCOPE(_bz_FunctorExpr3)<classname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \
ret> > \ ret> > \
(*this, static_cast<const P_expr1&>(a), \ (*this, a.unwrap(), b.unwrap(), c.unwrap()); \
static_cast<const P_expr2&>(b), \
static_cast<const P_expr3&>(c)); \
} }
#define BZ_DECLARE_MEMBER_FUNCTION(classname, funcname) \ #define BZ_DECLARE_MEMBER_FUNCTION(classname, funcname) \
_BZ_MAKE_FUNCTOR(classname, funcname) \ _BZ_MAKE_FUNCTOR(classname, funcname) \
template<class P_expr> \ template<typename P_expr> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr::T_numtype> > \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr::T_numtype> > \
funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr>& a) const \ funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr>& a) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \ BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr::T_numtype> > \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr::T_numtype> > \
(*this, static_cast<const P_expr&>(a)); \ (*this, a.unwrap()); \
} }
#define BZ_DECLARE_MEMBER_FUNCTION2(classname, funcname) \ #define BZ_DECLARE_MEMBER_FUNCTION2(classname, funcname) \
_BZ_MAKE_FUNCTOR2(classname, funcname) \ _BZ_MAKE_FUNCTOR2(classname, funcname) \
template<class P_expr1, class P_expr2> \ template<typename P_expr1, typename P_expr2> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
BZ_PROMOTE(BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \ BZ_PROMOTE(_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \
_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype)> > \ BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype)> > \
funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \ funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b) const \ const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \ BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
BZ_PROMOTE( \ BZ_PROMOTE(_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \ BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \
BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype)> > \ _bz_typename \
(*this, static_cast<const P_expr1&>(a), \ BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype)> > \
static_cast<const P_expr2&>(b)); \ (*this, a.unwrap(), b.unwrap()); \
} }
#define BZ_DECLARE_MEMBER_FUNCTION3(classname, funcname) \ #define BZ_DECLARE_MEMBER_FUNCTION3(classname, funcname) \
_BZ_MAKE_FUNCTOR3(classname, funcname) \ _BZ_MAKE_FUNCTOR3(classname, funcname) \
template<class P_expr1, class P_expr2, class P_expr3> \ template<typename P_expr1, typename P_expr2, typename P_expr3> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \
BZ_PROMOTE(BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \ BZ_PROMOTE(_bz_typename \
BZ_PROMOTE(BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype, \ BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \
BZ_PROMOTE(_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype, \
_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr::T_numtype))> > \ BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr::T_numtype))> > \
funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \ funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b, \ const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr3>& c) const \ const BZ_BLITZ_SCOPE(ETBase)<P_expr3>& c) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \ BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \
BZ_PROMOTE( \ BZ_PROMOTE(_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \ BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr::T_numtype, \
BZ_PROMOTE( \ BZ_PROMOTE(_bz_typename \
BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype, \ BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr::T_numtype, \
BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr::T_numtype))> > \ _bz_typename \
(*this, static_cast<const P_expr1&>(a), \ BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr::T_numtype))> >\
static_cast<const P_expr2&>(b), \ (*this, a.unwrap(), b.unwrap(), c.unwrap()); \
static_cast<const P_expr3&>(c)); \
} }
#define BZ_DECLARE_MEMBER_FUNCTION_RET(classname, funcname, ret) \ #define BZ_DECLARE_MEMBER_FUNCTION_RET(classname, funcname, ret) \
_BZ_MAKE_FUNCTOR_RET(classname, funcname, ret) \ _BZ_MAKE_FUNCTOR_RET(classname, funcname, ret) \
template<class P_expr> \ template<typename P_expr> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \
ret> > \ ret> > \
funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr>& a) const \ funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr>& a) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \ BZ_BLITZ_SCOPE(_bz_FunctorExpr)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr>::T_expr, \
ret> > \ ret> > \
(*this, static_cast<const P_expr&>(a)); \ (*this, a.unwrap()); \
} }
#define BZ_DECLARE_MEMBER_FUNCTION2_RET(classname, funcname, ret) \ #define BZ_DECLARE_MEMBER_FUNCTION2_RET(classname, funcname, ret) \
_BZ_MAKE_FUNCTOR2_RET(classname, funcname, ret) \ _BZ_MAKE_FUNCTOR2_RET(classname, funcname, ret) \
template<class P_expr1, class P_expr2> \ template<typename P_expr1, typename P_expr2> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
ret> > \ ret> > \
funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \ funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b) const \ const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \ BZ_BLITZ_SCOPE(_bz_FunctorExpr2)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
ret> > \ ret> > \
(*this, static_cast<const P_expr1&>(a), \ (*this, a.unwrap(), b.unwrap()); \
static_cast<const P_expr2&>(b)); \
} }
#define BZ_DECLARE_MEMBER_FUNCTION3_RET(classname, funcname, ret) \ #define BZ_DECLARE_MEMBER_FUNCTION3_RET(classname, funcname, ret) \
_BZ_MAKE_FUNCTOR3_RET(classname, funcname, ret) \ _BZ_MAKE_FUNCTOR3_RET(classname, funcname, ret) \
template<class P_expr1, class P_expr2, class P_expr3> \ template<typename P_expr1, typename P_expr2, typename P_expr3> \
BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \ BZ_BLITZ_SCOPE(_bz_ArrayExpr)<BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \
ret> > \ ret> > \
funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \ funcname(const BZ_BLITZ_SCOPE(ETBase)<P_expr1>& a, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b, \ const BZ_BLITZ_SCOPE(ETBase)<P_expr2>& b, \
const BZ_BLITZ_SCOPE(ETBase)<P_expr3>& c) const \ const BZ_BLITZ_SCOPE(ETBase)<P_expr3>& c) const \
{ \ { \
return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \ return BZ_BLITZ_SCOPE(_bz_ArrayExpr)< \
BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \ BZ_BLITZ_SCOPE(_bz_FunctorExpr3)< \
_bz_Functor ## classname ## funcname, \ _bz_Functor ## classname ## funcname, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr1>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr2>::T_expr, \
_bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \ _bz_typename BZ_BLITZ_SCOPE(asExpr)<P_expr3>::T_expr, \
ret> > \ ret> > \
(*this, static_cast<const P_expr1&>(a), \ (*this, a.unwrap(), b.unwrap(), c.unwrap()); \
static_cast<const P_expr2&>(b), \
static_cast<const P_expr3&>(c)); \
} }
#endif // BZ_ARRAY_FUNCTOREXPR_H #endif // BZ_ARRAY_FUNCTOREXPR_H
 End of changes. 72 change blocks. 
146 lines changed or deleted 159 lines changed or added


 geometry.h   geometry.h 
/************************************************************************** * /************************************************************************** *
* blitz/array/geometry.h Basic mapping from Array to physical geometry, * blitz/array/geometry.h Basic mapping from Array to physical geometry,
* used for some stencil operations. * used for some stencil operations.
* *
* $Id: geometry.h,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: geometry.h,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_GEOMETRY_H #ifndef BZ_GEOMETRY_H
#define BZ_GEOMETRY_H #define BZ_GEOMETRY_H
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/geometry.h> must be included after <blitz/array.h> #error <blitz/array/geometry.h> must be included after <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
typedef double T_defaultSpatialCoordinate; typedef double T_defaultSpatialCoordinate;
template<int N_dim, class T = T_defaultSpatialCoordinate> template<int N_dim, typename T = T_defaultSpatialCoordinate>
class UniformOrthoGeometry { class UniformOrthoGeometry {
public: public:
}; };
template<int N_dim, class T = T_defaultSpatialCoordinate> template<int N_dim, typename T = T_defaultSpatialCoordinate>
class UniformCubicGeometry { class UniformCubicGeometry {
T h_; T h_;
T recip_h_; T recip_h_;
T recip2_h_; T recip2_h_;
T recip3_h_; T recip3_h_;
TinyVector<T,N_dim> zero_; TinyVector<T,N_dim> zero_;
public: public:
typedef T T_coord; typedef T T_coord;
skipping to change at line 105 skipping to change at line 97
private: private:
void setup() void setup()
{ {
recip_h_ = 1.0 / h_; recip_h_ = 1.0 / h_;
recip2_h_ = 1.0 / pow2(h_); recip2_h_ = 1.0 / pow2(h_);
recip3_h_ = 1.0 / pow3(h_); recip3_h_ = 1.0 / pow3(h_);
} }
}; };
template<int N_dim, class T = T_defaultSpatialCoordinate> template<int N_dim, typename T = T_defaultSpatialCoordinate>
class TensorProductGeometry { class TensorProductGeometry {
public: public:
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_GEOMETRY_H #endif // BZ_GEOMETRY_H
 End of changes. 5 change blocks. 
13 lines changed or deleted 5 lines changed or added


 indexexpr.h   indexexpr.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/indexexpr.h Declaration of the IndexPlaceholder<N> class * blitz/indexexpr.h Declaration of the IndexPlaceholder<N> class
* *
* $Id: indexexpr.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: indexexpr.h,v 1.7 2005/05/07 04:17:56 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* p://seurat.uhttwaterloo.ca/blitz/ * p://seurat.uhttwaterloo.ca/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: indexexpr.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_INDEXEXPR_H #ifndef BZ_INDEXEXPR_H
#define BZ_INDEXEXPR_H #define BZ_INDEXEXPR_H
#ifndef BZ_TINYVEC_H #include <blitz/tinyvec.h>
#include <blitz/tinyvec.h> #include <blitz/prettyprint.h>
#endif #include <blitz/etbase.h>
#ifndef BZ_PRETTYPRINT_H
#include <blitz/prettyprint.h>
#endif
#ifndef BZ_ETBASE_H
#include <blitz/etbase.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<int N> template<int N>
class IndexPlaceholder class IndexPlaceholder
#ifdef BZ_NEW_EXPRESSION_TEMPLATES #ifdef BZ_NEW_EXPRESSION_TEMPLATES
: public ETBase<IndexPlaceholder<N> > : public ETBase<IndexPlaceholder<N> >
#endif #endif
{ {
public: public:
IndexPlaceholder() IndexPlaceholder()
{ } { }
#ifdef BZ_NEW_EXPRESSION_TEMPLATES
IndexPlaceholder(const IndexPlaceholder<N>& x)
: ETBase< IndexPlaceholder<N> >(x)
{ }
#else
IndexPlaceholder(const IndexPlaceholder<N>&) IndexPlaceholder(const IndexPlaceholder<N>&)
{ } { }
#endif
~IndexPlaceholder() ~IndexPlaceholder()
{ } { }
void operator=(const IndexPlaceholder<N>&) void operator=(const IndexPlaceholder<N>&)
{ } { }
typedef int T_numtype; typedef int T_numtype;
typedef int T_ctorArg1; // Dummy; not used typedef int T_ctorArg1; // Dummy; not used
typedef int T_ctorArg2; // Ditto typedef int T_ctorArg2; // Ditto
enum { numArrayOperands = 0, numIndexPlaceholders = 1, static const int
rank = N+1 }; numArrayOperands = 0,
numIndexPlaceholders = 1,
rank = N+1;
// If you have a precondition failure on this routine, it means // If you have a precondition failure on this routine, it means
// you are trying to use stack iteration mode on an expression // you are trying to use stack iteration mode on an expression
// which contains an index placeholder. You must use index // which contains an index placeholder. You must use index
// iteration mode instead. // iteration mode instead.
int operator*() int operator*() {
{
BZPRECONDITION(0); BZPRECONDITION(0);
return 0; return 0;
} }
#ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE #ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE
template<int N_rank> template<int N_rank>
T_numtype operator()(TinyVector<int, N_rank> i) T_numtype operator()(TinyVector<int, N_rank> i) { return i[N]; }
{ return i[N]; }
#else #else
template<int N_rank> template<int N_rank>
T_numtype operator()(const TinyVector<int, N_rank>& i) T_numtype operator()(const TinyVector<int, N_rank>& i) { return i[N]; }
{ return i[N]; }
#endif #endif
int ascending(int) const int ascending(int) const { return INT_MIN; }
{ return INT_MIN; } int ordering(int) const { return INT_MIN; }
int lbound(int) const { return INT_MIN; } // tiny(int());
int ordering(int) const int ubound(int) const { return INT_MAX; } // huge(int());
{ return INT_MIN; }
int lbound(int) const
{ return INT_MIN; } // tiny(int());
int ubound(int) const
{ return INT_MAX; } // huge(int());
// See operator*() note
void push(int)
{
BZPRECONDITION(0);
}
// See operator*() note
void pop(int)
{
BZPRECONDITION(0);
}
// See operator*() note // See operator*() note
void advance()
{
BZPRECONDITION(0);
}
// See operator*() note void push(int) { BZPRECONDITION(0); }
void advance(int) void pop(int) { BZPRECONDITION(0); }
{ void advance() { BZPRECONDITION(0); }
BZPRECONDITION(0); void advance(int) { BZPRECONDITION(0); }
} void loadStride(int) { BZPRECONDITION(0); }
// See operator*() note
void loadStride(int)
{
BZPRECONDITION(0);
}
_bz_bool isUnitStride(int rank) const bool isUnitStride(int) const {
{
BZPRECONDITION(0); BZPRECONDITION(0);
return false; return false;
} }
void advanceUnitStride() void advanceUnitStride() { BZPRECONDITION(0); }
{
BZPRECONDITION(0);
}
_bz_bool canCollapse(int,int) const bool canCollapse(int,int) const {
{
BZPRECONDITION(0); BZPRECONDITION(0);
return _bz_false; return false;
} }
T_numtype operator[](int) T_numtype operator[](int) {
{
BZPRECONDITION(0); BZPRECONDITION(0);
return T_numtype(); return T_numtype();
} }
T_numtype fastRead(int) T_numtype fastRead(int) {
{
BZPRECONDITION(0); BZPRECONDITION(0);
return T_numtype(); return T_numtype();
} }
int suggestStride(int) const int suggestStride(int) const {
{
BZPRECONDITION(0); BZPRECONDITION(0);
return 0; return 0;
} }
_bz_bool isStride(int,int) const bool isStride(int,int) const {
{
BZPRECONDITION(0); BZPRECONDITION(0);
return _bz_true; return true;
} }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat&) const {
{
// NEEDS_WORK-- do real formatting for reductions // NEEDS_WORK-- do real formatting for reductions
str += "index-expr[NEEDS_WORK]"; str += "index-expr[NEEDS_WORK]";
} }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) const bool shapeCheck(const T_shape&) const { return true; }
{
return _bz_true;
}
}; };
typedef IndexPlaceholder<0> firstIndex; typedef IndexPlaceholder<0> firstIndex;
typedef IndexPlaceholder<1> secondIndex; typedef IndexPlaceholder<1> secondIndex;
typedef IndexPlaceholder<2> thirdIndex; typedef IndexPlaceholder<2> thirdIndex;
typedef IndexPlaceholder<3> fourthIndex; typedef IndexPlaceholder<3> fourthIndex;
typedef IndexPlaceholder<4> fifthIndex; typedef IndexPlaceholder<4> fifthIndex;
typedef IndexPlaceholder<5> sixthIndex; typedef IndexPlaceholder<5> sixthIndex;
typedef IndexPlaceholder<6> seventhIndex; typedef IndexPlaceholder<6> seventhIndex;
typedef IndexPlaceholder<7> eighthIndex; typedef IndexPlaceholder<7> eighthIndex;
 End of changes. 24 change blocks. 
99 lines changed or deleted 41 lines changed or added


 indirect.h   indirect.h 
/************************************************************************** * /************************************************************************** *
* blitz/array/indirect.h Array indirection * blitz/array/indirect.h Array indirection
* *
* $Id: indirect.h,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: indirect.h,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_INDIRECT_H #ifndef BZ_ARRAY_INDIRECT_H
#define BZ_ARRAY_INDIRECT_H #define BZ_ARRAY_INDIRECT_H
#include <blitz/array/asexpr.h> #include <blitz/array/asexpr.h>
#include <blitz/array/cartesian.h> #include <blitz/array/cartesian.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T_array, class T_index> template<typename T_array, typename T_index>
class IndirectArray { class IndirectArray {
public: public:
IndirectArray(T_array& array, T_index& index) IndirectArray(T_array& array, T_index& index)
: array_(array), index_(index) : array_(array), index_(index)
{ } { }
template<class T_expr> template<typename T_expr>
void operator=(T_expr expr); void operator=(T_expr expr);
protected: protected:
T_array& array_; T_array& array_;
T_index& index_; T_index& index_;
}; };
// Forward declarations // Forward declarations
template<class T_array, class T_arrayiter, class T_subdomain, class T_expr> template<typename T_array, typename T_arrayiter, typename T_subdomain, type name T_expr>
inline void applyOverSubdomain(const T_array& array, T_arrayiter& arrayIter , inline void applyOverSubdomain(const T_array& array, T_arrayiter& arrayIter ,
T_subdomain subdomain, T_expr expr); T_subdomain subdomain, T_expr expr);
template<class T_array, class T_arrayiter, int N_rank, class T_expr> template<typename T_array, typename T_arrayiter, int N_rank, typename T_exp r>
inline void applyOverSubdomain(const T_array& array, T_arrayiter& arrayIter , inline void applyOverSubdomain(const T_array& array, T_arrayiter& arrayIter ,
RectDomain<N_rank> subdomain, RectDomain<N_rank> subdomain,
T_expr expr); T_expr expr);
template<class T_array, class T_index> template<class T_rhs> template<typename T_array, typename T_index> template<typename T_rhs>
void IndirectArray<T_array, T_index>::operator=(T_rhs rhs) void IndirectArray<T_array, T_index>::operator=(T_rhs rhs)
{ {
typedef _bz_typename asExpr<T_rhs>::T_expr T_expr; typedef _bz_typename asExpr<T_rhs>::T_expr T_expr;
T_expr expr(rhs); T_expr expr(rhs);
_bz_typename T_array::T_iterator arrayIter(array_); _bz_typename T_array::T_iterator arrayIter(array_);
_bz_typename T_index::iterator iter = index_.begin(), _bz_typename T_index::iterator iter = index_.begin(),
end = index_.end(); end = index_.end();
for (; iter != end; ++iter) for (; iter != end; ++iter)
{ {
_bz_typename T_index::value_type subdomain = *iter; _bz_typename T_index::value_type subdomain = *iter;
applyOverSubdomain(array_, arrayIter, subdomain, expr); applyOverSubdomain(array_, arrayIter, subdomain, expr);
} }
} }
template<class T_array, class T_arrayiter, class T_subdomain, class T_expr> template<typename T_array, typename T_arrayiter, typename T_subdomain, type
inline void applyOverSubdomain(const T_array& array, T_arrayiter& arrayIter name T_expr>
, inline void applyOverSubdomain(const T_array& BZ_DEBUG_PARAM(array), T_arra
yiter& arrayIter,
T_subdomain subdomain, T_expr expr) T_subdomain subdomain, T_expr expr)
{ {
BZPRECHECK(array.isInRange(subdomain), BZPRECHECK(array.isInRange(subdomain),
"In indirection using an STL container of TinyVector<int," "In indirection using an STL container of TinyVector<int,"
<< array.rank() << ">, one of the" << endl << "positions is out of" << array.rank() << ">, one of the" << endl << "positions is out of"
" range: " << endl << subdomain << endl " range: " << endl << subdomain << endl
<< "Array lower bounds: " << array.lbound() << endl << "Array lower bounds: " << array.lbound() << endl
<< "Array upper bounds: " << array.ubound() << endl) << "Array upper bounds: " << array.ubound() << endl)
arrayIter.moveTo(subdomain); arrayIter.moveTo(subdomain);
expr.moveTo(subdomain); expr.moveTo(subdomain);
*const_cast<_bz_typename T_arrayiter::T_numtype*>(arrayIter.data()) = * expr; *const_cast<_bz_typename T_arrayiter::T_numtype*>(arrayIter.data()) = * expr;
} }
// Specialization for RectDomain<N> // Specialization for RectDomain<N>
template<class T_array, class T_arrayiter, int N_rank, class T_expr> template<typename T_array, typename T_arrayiter, int N_rank, typename T_exp
inline void applyOverSubdomain(const T_array& array, T_arrayiter& arrayIter r>
, inline void applyOverSubdomain(const T_array& BZ_DEBUG_PARAM(array), T_arra
yiter& arrayIter,
RectDomain<N_rank> subdomain, RectDomain<N_rank> subdomain,
T_expr expr) T_expr expr)
{ {
typedef _bz_typename T_array::T_numtype T_numtype; typedef _bz_typename T_array::T_numtype T_numtype;
// Assume that the RectDomain<N_rank> is a 1-D strip. // Assume that the RectDomain<N_rank> is a 1-D strip.
// Find the dimension in which the strip is oriented. This // Find the dimension in which the strip is oriented. This
// variable is static so that we cache the value; likely to be // variable is static so that we cache the value; likely to be
// the same for all strips within a container. // the same for all strips within a container.
skipping to change at line 162 skipping to change at line 155
<< "Array upper bounds: " << array.ubound() << endl) << "Array upper bounds: " << array.ubound() << endl)
// Position at the beginning of the strip // Position at the beginning of the strip
arrayIter.moveTo(subdomain.lbound()); arrayIter.moveTo(subdomain.lbound());
expr.moveTo(subdomain.lbound()); expr.moveTo(subdomain.lbound());
// Loop through the strip // Loop through the strip
#ifdef BZ_USE_FAST_READ_ARRAY_EXPR #ifdef BZ_USE_FAST_READ_ARRAY_EXPR
_bz_bool useUnitStride = arrayIter.isUnitStride(stripDim) bool useUnitStride = arrayIter.isUnitStride(stripDim)
&& expr.isUnitStride(stripDim); && expr.isUnitStride(stripDim);
int lbound = subdomain.lbound(stripDim); int lbound = subdomain.lbound(stripDim);
int ubound = subdomain.ubound(stripDim); int ubound = subdomain.ubound(stripDim);
if (useUnitStride) if (useUnitStride)
{ {
T_numtype* _bz_restrict data = const_cast<T_numtype*>(arrayIter.dat a()); T_numtype* restrict data = const_cast<T_numtype*>(arrayIter.data()) ;
int length = ubound - lbound + 1; int length = ubound - lbound + 1;
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
data[i] = expr.fastRead(i); *data++ = expr.fastRead(i);
} }
else { else {
#endif #endif
arrayIter.loadStride(stripDim); arrayIter.loadStride(stripDim);
expr.loadStride(stripDim); expr.loadStride(stripDim);
for (int i=lbound; i <= ubound; ++i) for (int i=lbound; i <= ubound; ++i)
{ {
*const_cast<_bz_typename T_arrayiter::T_numtype*>(arrayIter.data()) *const_cast<_bz_typename T_arrayiter::T_numtype*>(arrayIter.data())
skipping to change at line 196 skipping to change at line 189
expr.advance(); expr.advance();
arrayIter.advance(); arrayIter.advance();
} }
#ifdef BZ_USE_FAST_READ_ARRAY_EXPR #ifdef BZ_USE_FAST_READ_ARRAY_EXPR
} }
#endif #endif
} }
// Global functions for cartesian product of index sets // Global functions for cartesian product of index sets
template<class T_container> template<typename T_container>
CartesianProduct<TinyVector<int,2>,T_container,2> CartesianProduct<TinyVector<int,2>,T_container,2>
indexSet(const T_container& container0, const T_container& container1) indexSet(const T_container& container0, const T_container& container1)
{ {
return CartesianProduct<TinyVector<int,2>,T_container,2>( return CartesianProduct<TinyVector<int,2>,T_container,2>(
const_cast<T_container&>(container0), const_cast<T_container&>(container0),
const_cast<T_container&>(container1)); const_cast<T_container&>(container1));
} }
template<class T_container> template<typename T_container>
CartesianProduct<TinyVector<int,3>,T_container,3> CartesianProduct<TinyVector<int,3>,T_container,3>
indexSet(const T_container& container0, const T_container& container1, indexSet(const T_container& container0, const T_container& container1,
const T_container& container2) const T_container& container2)
{ {
return CartesianProduct<TinyVector<int,3>,T_container,3>( return CartesianProduct<TinyVector<int,3>,T_container,3>(
const_cast<T_container&>(container0), const_cast<T_container&>(container0),
const_cast<T_container&>(container1), const_cast<T_container&>(container1),
const_cast<T_container&>(container2)); const_cast<T_container&>(container2));
} }
template<typename T_container>
CartesianProduct<TinyVector<int,4>,T_container,4>
indexSet(const T_container& container0, const T_container& container1,
const T_container& container2, const T_container& container3)
{
return CartesianProduct<TinyVector<int,4>,T_container,4>(
const_cast<T_container&>(container0),
const_cast<T_container&>(container1),
const_cast<T_container&>(container2),
const_cast<T_container&>(container3));
}
template<typename T_container>
CartesianProduct<TinyVector<int,5>,T_container,5>
indexSet(const T_container& container0, const T_container& container1,
const T_container& container2, const T_container& container3,
const T_container& container4)
{
return CartesianProduct<TinyVector<int,5>,T_container,5>(
const_cast<T_container&>(container0),
const_cast<T_container&>(container1),
const_cast<T_container&>(container2),
const_cast<T_container&>(container3),
const_cast<T_container&>(container4));
}
template<typename T_container>
CartesianProduct<TinyVector<int,6>,T_container,6>
indexSet(const T_container& container0, const T_container& container1,
const T_container& container2, const T_container& container3,
const T_container& container4, const T_container& container5)
{
return CartesianProduct<TinyVector<int,6>,T_container,6>(
const_cast<T_container&>(container0),
const_cast<T_container&>(container1),
const_cast<T_container&>(container2),
const_cast<T_container&>(container3),
const_cast<T_container&>(container4),
const_cast<T_container&>(container5));
}
template<typename T_container>
CartesianProduct<TinyVector<int,7>,T_container,7>
indexSet(const T_container& container0, const T_container& container1,
const T_container& container2, const T_container& container3,
const T_container& container4, const T_container& container5,
const T_container& container6)
{
return CartesianProduct<TinyVector<int,7>,T_container,7>(
const_cast<T_container&>(container0),
const_cast<T_container&>(container1),
const_cast<T_container&>(container2),
const_cast<T_container&>(container3),
const_cast<T_container&>(container4),
const_cast<T_container&>(container5),
const_cast<T_container&>(container6));
}
template<typename T_container>
CartesianProduct<TinyVector<int,8>,T_container,8>
indexSet(const T_container& container0, const T_container& container1,
const T_container& container2, const T_container& container3,
const T_container& container4, const T_container& container5,
const T_container& container6, const T_container& container7)
{
return CartesianProduct<TinyVector<int,8>,T_container,8>(
const_cast<T_container&>(container0),
const_cast<T_container&>(container1),
const_cast<T_container&>(container2),
const_cast<T_container&>(container3),
const_cast<T_container&>(container4),
const_cast<T_container&>(container5),
const_cast<T_container&>(container6),
const_cast<T_container&>(container7));
}
template<typename T_container>
CartesianProduct<TinyVector<int,9>,T_container,9>
indexSet(const T_container& container0, const T_container& container1,
const T_container& container2, const T_container& container3,
const T_container& container4, const T_container& container5,
const T_container& container6, const T_container& container7,
const T_container& container8)
{
return CartesianProduct<TinyVector<int,9>,T_container,9>(
const_cast<T_container&>(container0),
const_cast<T_container&>(container1),
const_cast<T_container&>(container2),
const_cast<T_container&>(container3),
const_cast<T_container&>(container4),
const_cast<T_container&>(container5),
const_cast<T_container&>(container6),
const_cast<T_container&>(container7),
const_cast<T_container&>(container8));
}
template<typename T_container>
CartesianProduct<TinyVector<int,10>,T_container,10>
indexSet(const T_container& container0, const T_container& container1,
const T_container& container2, const T_container& container3,
const T_container& container4, const T_container& container5,
const T_container& container6, const T_container& container7,
const T_container& container8, const T_container& container9)
{
return CartesianProduct<TinyVector<int,10>,T_container,10>(
const_cast<T_container&>(container0),
const_cast<T_container&>(container1),
const_cast<T_container&>(container2),
const_cast<T_container&>(container3),
const_cast<T_container&>(container4),
const_cast<T_container&>(container5),
const_cast<T_container&>(container6),
const_cast<T_container&>(container7),
const_cast<T_container&>(container8),
const_cast<T_container&>(container9));
}
template<typename T_container>
CartesianProduct<TinyVector<int,11>,T_container,11>
indexSet(const T_container& container0, const T_container& container1,
const T_container& container2, const T_container& container3,
const T_container& container4, const T_container& container5,
const T_container& container6, const T_container& container7,
const T_container& container8, const T_container& container9,
const T_container& container10)
{
return CartesianProduct<TinyVector<int,11>,T_container,11>(
const_cast<T_container&>(container0),
const_cast<T_container&>(container1),
const_cast<T_container&>(container2),
const_cast<T_container&>(container3),
const_cast<T_container&>(container4),
const_cast<T_container&>(container5),
const_cast<T_container&>(container6),
const_cast<T_container&>(container7),
const_cast<T_container&>(container8),
const_cast<T_container&>(container9),
const_cast<T_container&>(container10));
}
// Mixture of singletons and containers, e.g. A[indexSet(I,3,K)] // Mixture of singletons and containers, e.g. A[indexSet(I,3,K)]
// cp_findContainerType<T1,T2,T3,...,Tn>::T_container // cp_findContainerType<T1,T2,T3,...,Tn>::T_container
// The set of parameters T1, T2, T3, ... Tn is a mixture of // The set of parameters T1, T2, T3, ... Tn is a mixture of
// int and T_container. This traits class finds the container // int and T_container. This traits class finds the container
// type, and sets T_container. // type, and sets T_container.
// //
// e.g. cp_findContainerType<int,int,list<int>,int>::T_container is list<in t> // e.g. cp_findContainerType<int,int,list<int>,int>::T_container is list<in t>
// cp_findContainerType<int,deque<int>,deque<int>>::T_container // cp_findContainerType<int,deque<int>,deque<int>>::T_container
// is deque<int> // is deque<int>
template<class T1, class T2, class T3=int, class T4=int> template<typename T1, typename T2, typename T3=int, typename T4=int,
typename T5=int, typename T6=int, typename T7=int, typename T8=int
,
typename T9=int, typename T10=int, typename T11=int>
struct cp_findContainerType { struct cp_findContainerType {
typedef T1 T_container; typedef T1 T_container;
}; };
template<class T2, class T3, class T4> template<typename T2, typename T3, typename T4, typename T5, typename T6,
struct cp_findContainerType<int,T2,T3,T4> { typename T7, typename T8, typename T9, typename T10, typename T11>
typedef _bz_typename cp_findContainerType<T2,T3,T4>::T_container T_cont struct cp_findContainerType<int,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> {
ainer; typedef _bz_typename
cp_findContainerType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::T_container
T_container;
}; };
// The cp_traits class handles promotion of singleton integers to // The cp_traits class handles promotion of singleton integers to
// containers. It takes two template parameters: // containers. It takes two template parameters:
// T = argument type // T = argument type
// T2 = container type // T2 = container type
// If T is an integer, then a container of type T2 is created and the // If T is an integer, then a container of type T2 is created and the
// integer is inserted. This container is returned. // integer is inserted. This container is returned.
// Otherwise, T is assumed to be the same type as T2, and the original // Otherwise, T is assumed to be the same type as T2, and the original
// container is returned. // container is returned.
template<class T, class T2> template<typename T, typename T2>
struct cp_traits { struct cp_traits {
typedef T T_container; typedef T T_container;
static const T_container& make(const T& x) static const T_container& make(const T& x)
{ return x; } { return x; }
}; };
template<class T2> template<typename T2>
struct cp_traits<int,T2> { struct cp_traits<int,T2> {
typedef T2 T_container; typedef T2 T_container;
static T2 make(int x) static T2 make(int x)
{ {
T2 singleton; T2 singleton;
singleton.push_back(x); singleton.push_back(x);
return singleton; return singleton;
} }
}; };
// These versions of indexSet() allow mixtures of integer // These versions of indexSet() allow mixtures of integer
// and container arguments. At least one integer must be // and container arguments. At least one integer must be
// specified. // specified.
template<class T1, class T2> template<typename T1, typename T2>
CartesianProduct<TinyVector<int,2>, _bz_typename CartesianProduct<TinyVector<int,2>, _bz_typename
cp_findContainerType<T1,T2>::T_container,2> cp_findContainerType<T1,T2>::T_container,2>
indexSet(const T1& c1, const T2& c2) indexSet(const T1& c1, const T2& c2)
{ {
typedef _bz_typename cp_findContainerType<T1,T2>::T_container typedef _bz_typename cp_findContainerType<T1,T2>::T_container
T_container; T_container;
return CartesianProduct<TinyVector<int,2>, T_container, 2>( return CartesianProduct<TinyVector<int,2>, T_container, 2>(
cp_traits<T1,T_container>::make(c1), cp_traits<T1,T_container>::make(c1),
cp_traits<T2,T_container>::make(c2)); cp_traits<T2,T_container>::make(c2));
} }
template<class T1, class T2, class T3> template<typename T1, typename T2, typename T3>
CartesianProduct<TinyVector<int,3>, _bz_typename CartesianProduct<TinyVector<int,3>, _bz_typename
cp_findContainerType<T1,T2,T3>::T_container, 3> cp_findContainerType<T1,T2,T3>::T_container, 3>
indexSet(const T1& c1, const T2& c2, const T3& c3) indexSet(const T1& c1, const T2& c2, const T3& c3)
{ {
typedef _bz_typename cp_findContainerType<T1,T2,T3>::T_container typedef _bz_typename cp_findContainerType<T1,T2,T3>::T_container
T_container; T_container;
return CartesianProduct<TinyVector<int,3>, T_container, 3>( return CartesianProduct<TinyVector<int,3>, T_container, 3>(
cp_traits<T1,T_container>::make(c1), cp_traits<T1,T_container>::make(c1),
cp_traits<T2,T_container>::make(c2), cp_traits<T2,T_container>::make(c2),
cp_traits<T3,T_container>::make(c3)); cp_traits<T3,T_container>::make(c3));
} }
template<typename T1, typename T2, typename T3, typename T4>
CartesianProduct<TinyVector<int,4>, _bz_typename
cp_findContainerType<T1,T2,T3,T4>::T_container, 4>
indexSet(const T1& c1, const T2& c2, const T3& c3, const T4& c4)
{
typedef _bz_typename cp_findContainerType<T1,T2,T3,T4>::T_container
T_container;
return CartesianProduct<TinyVector<int,4>, T_container, 4>(
cp_traits<T1,T_container>::make(c1),
cp_traits<T2,T_container>::make(c2),
cp_traits<T3,T_container>::make(c3),
cp_traits<T4,T_container>::make(c4));
}
template<typename T1, typename T2, typename T3, typename T4, typename T5>
CartesianProduct<TinyVector<int,5>, _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5>::T_container, 5>
indexSet(const T1& c1, const T2& c2, const T3& c3, const T4& c4, const T5&
c5)
{
typedef _bz_typename cp_findContainerType<T1,T2,T3,T4,T5>::T_container
T_container;
return CartesianProduct<TinyVector<int,5>, T_container, 5>(
cp_traits<T1,T_container>::make(c1),
cp_traits<T2,T_container>::make(c2),
cp_traits<T3,T_container>::make(c3),
cp_traits<T4,T_container>::make(c4),
cp_traits<T5,T_container>::make(c5));
}
template<typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6>
CartesianProduct<TinyVector<int,6>, _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6>::T_container, 6>
indexSet(const T1& c1, const T2& c2, const T3& c3, const T4& c4, const T5&
c5,
const T6& c6)
{
typedef _bz_typename cp_findContainerType<T1,T2,T3,T4,T5,T6>::T_contain
er
T_container;
return CartesianProduct<TinyVector<int,6>, T_container, 6>(
cp_traits<T1,T_container>::make(c1),
cp_traits<T2,T_container>::make(c2),
cp_traits<T3,T_container>::make(c3),
cp_traits<T4,T_container>::make(c4),
cp_traits<T5,T_container>::make(c5),
cp_traits<T6,T_container>::make(c6));
}
template<typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7>
CartesianProduct<TinyVector<int,7>, _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6,T7>::T_container, 7>
indexSet(const T1& c1, const T2& c2, const T3& c3, const T4& c4, const T5&
c5,
const T6& c6, const T7& c7)
{
typedef _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6,T7>::T_container
T_container;
return CartesianProduct<TinyVector<int,7>, T_container, 7>(
cp_traits<T1,T_container>::make(c1),
cp_traits<T2,T_container>::make(c2),
cp_traits<T3,T_container>::make(c3),
cp_traits<T4,T_container>::make(c4),
cp_traits<T5,T_container>::make(c5),
cp_traits<T6,T_container>::make(c6),
cp_traits<T7,T_container>::make(c7));
}
template<typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8>
CartesianProduct<TinyVector<int,8>, _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6,T7,T8>::T_container, 8>
indexSet(const T1& c1, const T2& c2, const T3& c3, const T4& c4, const T5&
c5,
const T6& c6, const T7& c7, const T8& c8)
{
typedef _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6,T7,T8>::T_container
T_container;
return CartesianProduct<TinyVector<int,8>, T_container, 8>(
cp_traits<T1,T_container>::make(c1),
cp_traits<T2,T_container>::make(c2),
cp_traits<T3,T_container>::make(c3),
cp_traits<T4,T_container>::make(c4),
cp_traits<T5,T_container>::make(c5),
cp_traits<T6,T_container>::make(c6),
cp_traits<T7,T_container>::make(c7),
cp_traits<T8,T_container>::make(c8));
}
template<typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9>
CartesianProduct<TinyVector<int,9>, _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6,T7,T8,T9>::T_container, 9>
indexSet(const T1& c1, const T2& c2, const T3& c3, const T4& c4, const T5&
c5,
const T6& c6, const T7& c7, const T8& c8, const T9& c9)
{
typedef _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6,T7,T8,T9>::T_container
T_container;
return CartesianProduct<TinyVector<int,9>, T_container, 9>(
cp_traits<T1,T_container>::make(c1),
cp_traits<T2,T_container>::make(c2),
cp_traits<T3,T_container>::make(c3),
cp_traits<T4,T_container>::make(c4),
cp_traits<T5,T_container>::make(c5),
cp_traits<T6,T_container>::make(c6),
cp_traits<T7,T_container>::make(c7),
cp_traits<T8,T_container>::make(c8),
cp_traits<T9,T_container>::make(c9));
}
template<typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10>
CartesianProduct<TinyVector<int,10>, _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::T_container, 10>
indexSet(const T1& c1, const T2& c2, const T3& c3, const T4& c4, const T5&
c5,
const T6& c6, const T7& c7, const T8& c8, const T9& c9, const T10& c10)
{
typedef _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::T_container
T_container;
return CartesianProduct<TinyVector<int,10>, T_container, 10>(
cp_traits<T1,T_container>::make(c1),
cp_traits<T2,T_container>::make(c2),
cp_traits<T3,T_container>::make(c3),
cp_traits<T4,T_container>::make(c4),
cp_traits<T5,T_container>::make(c5),
cp_traits<T6,T_container>::make(c6),
cp_traits<T7,T_container>::make(c7),
cp_traits<T8,T_container>::make(c8),
cp_traits<T9,T_container>::make(c9),
cp_traits<T10,T_container>::make(c10));
}
template<typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11>
CartesianProduct<TinyVector<int,11>, _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::T_container,
11>
indexSet(const T1& c1, const T2& c2, const T3& c3, const T4& c4, const T5&
c5,
const T6& c6, const T7& c7, const T8& c8, const T9& c9, const T10& c10,
const T11& c11)
{
typedef _bz_typename
cp_findContainerType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::T_contain
er
T_container;
return CartesianProduct<TinyVector<int,11>, T_container, 11>(
cp_traits<T1,T_container>::make(c1),
cp_traits<T2,T_container>::make(c2),
cp_traits<T3,T_container>::make(c3),
cp_traits<T4,T_container>::make(c4),
cp_traits<T5,T_container>::make(c5),
cp_traits<T6,T_container>::make(c6),
cp_traits<T7,T_container>::make(c7),
cp_traits<T8,T_container>::make(c8),
cp_traits<T9,T_container>::make(c9),
cp_traits<T10,T_container>::make(c10),
cp_traits<T11,T_container>::make(c11));
}
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ARRAY_INDIRECT_H #endif // BZ_ARRAY_INDIRECT_H
 End of changes. 22 change blocks. 
34 lines changed or deleted 351 lines changed or added


 interlace.cc   interlace.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/interlace.cc * blitz/array/interlace.cc
* *
* $Id: interlace.cc,v 1.2 2001/01/24 20:22:50 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: interlace.cc,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
*
*/
#ifndef BZ_ARRAYINTERLACE_CC #ifndef BZ_ARRAYINTERLACE_CC
#define BZ_ARRAYINTERLACE_CC #define BZ_ARRAYINTERLACE_CC
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/interlace.cc> must be included via <blitz/array.h> #error <blitz/array/interlace.cc> must be included via <blitz/array.h>
#endif #endif
#ifndef BZ_ARRAYSHAPE_H #ifndef BZ_ARRAYSHAPE_H
#include <blitz/array/shape.h> #include <blitz/array/shape.h>
#endif #endif
skipping to change at line 79 skipping to change at line 67
// Warning: Can't instantiate TinyVector<Range,N> because causes // Warning: Can't instantiate TinyVector<Range,N> because causes
// conflict between TinyVector<T,N>::operator=(T) and // conflict between TinyVector<T,N>::operator=(T) and
// TinyVector<T,N>::operator=(Range) // TinyVector<T,N>::operator=(Range)
// NEEDS_WORK -- also shape for up to N=11 // NEEDS_WORK -- also shape for up to N=11
// NEEDS_WORK -- shape(Range r1, Range r2, ...) (return TinyVector<Range,n> ) // NEEDS_WORK -- shape(Range r1, Range r2, ...) (return TinyVector<Range,n> )
// maybe use Domain objects // maybe use Domain objects
// NEEDS_WORK -- doesn't make a lot of sense for user to provide a // NEEDS_WORK -- doesn't make a lot of sense for user to provide a
// GeneralArrayStorage<N_rank+1> // GeneralArrayStorage<N_rank+1>
template<class T_numtype> template<typename T_numtype>
void makeInterlacedArray(Array<T_numtype,2>& mainArray, void makeInterlacedArray(Array<T_numtype,2>& mainArray,
Array<T_numtype,1>& subarray, int slice) Array<T_numtype,1>& subarray, int slice)
{ {
Array<T_numtype,1> tmp = mainArray(Range::all(), slice); Array<T_numtype,1> tmp = mainArray(Range::all(), slice);
subarray.reference(tmp); subarray.reference(tmp);
} }
template<class T_numtype> template<typename T_numtype>
void makeInterlacedArray(Array<T_numtype,3>& mainArray, void makeInterlacedArray(Array<T_numtype,3>& mainArray,
Array<T_numtype,2>& subarray, int slice) Array<T_numtype,2>& subarray, int slice)
{ {
Array<T_numtype,2> tmp = mainArray(Range::all(), Range::all(), Array<T_numtype,2> tmp = mainArray(Range::all(), Range::all(),
slice); slice);
subarray.reference(tmp); subarray.reference(tmp);
} }
template<class T_numtype> template<typename T_numtype>
void makeInterlacedArray(Array<T_numtype,4>& mainArray, void makeInterlacedArray(Array<T_numtype,4>& mainArray,
Array<T_numtype,3>& subarray, int slice) Array<T_numtype,3>& subarray, int slice)
{ {
Array<T_numtype,3> tmp = mainArray(Range::all(), Range::all(), Array<T_numtype,3> tmp = mainArray(Range::all(), Range::all(),
Range::all(), slice); Range::all(), slice);
subarray.reference(tmp); subarray.reference(tmp);
} }
// These routines always allocate interlaced arrays // These routines always allocate interlaced arrays
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void interlaceArrays(const TinyVector<int,N_rank>& shape, void interlaceArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2) Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2)
{ {
GeneralArrayStorage<N_rank+1> storage; GeneralArrayStorage<N_rank+1> storage;
Array<T_numtype, N_rank+1> array(shape, 2, storage); Array<T_numtype, N_rank+1> array(shape, 2, storage);
makeInterlacedArray(array, a1, 0); makeInterlacedArray(array, a1, 0);
makeInterlacedArray(array, a2, 1); makeInterlacedArray(array, a2, 1);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void interlaceArrays(const TinyVector<int,N_rank>& shape, void interlaceArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3) Array<T_numtype,N_rank>& a3)
{ {
GeneralArrayStorage<N_rank+1> storage; GeneralArrayStorage<N_rank+1> storage;
Array<T_numtype, N_rank+1> array(shape, 3, storage); Array<T_numtype, N_rank+1> array(shape, 3, storage);
makeInterlacedArray(array, a1, 0); makeInterlacedArray(array, a1, 0);
makeInterlacedArray(array, a2, 1); makeInterlacedArray(array, a2, 1);
makeInterlacedArray(array, a3, 2); makeInterlacedArray(array, a3, 2);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void interlaceArrays(const TinyVector<int,N_rank>& shape, void interlaceArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4) Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4)
{ {
GeneralArrayStorage<N_rank+1> storage; GeneralArrayStorage<N_rank+1> storage;
Array<T_numtype, N_rank+1> array(shape, 4, storage); Array<T_numtype, N_rank+1> array(shape, 4, storage);
makeInterlacedArray(array, a1, 0); makeInterlacedArray(array, a1, 0);
makeInterlacedArray(array, a2, 1); makeInterlacedArray(array, a2, 1);
makeInterlacedArray(array, a3, 2); makeInterlacedArray(array, a3, 2);
makeInterlacedArray(array, a4, 3); makeInterlacedArray(array, a4, 3);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void interlaceArrays(const TinyVector<int,N_rank>& shape, void interlaceArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5) Array<T_numtype,N_rank>& a5)
{ {
GeneralArrayStorage<N_rank+1> storage; GeneralArrayStorage<N_rank+1> storage;
Array<T_numtype, N_rank+1> array(shape, 5, storage); Array<T_numtype, N_rank+1> array(shape, 5, storage);
makeInterlacedArray(array, a1, 0); makeInterlacedArray(array, a1, 0);
makeInterlacedArray(array, a2, 1); makeInterlacedArray(array, a2, 1);
makeInterlacedArray(array, a3, 2); makeInterlacedArray(array, a3, 2);
makeInterlacedArray(array, a4, 3); makeInterlacedArray(array, a4, 3);
makeInterlacedArray(array, a5, 4); makeInterlacedArray(array, a5, 4);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void interlaceArrays(const TinyVector<int,N_rank>& shape, void interlaceArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6) Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6)
{ {
GeneralArrayStorage<N_rank+1> storage; GeneralArrayStorage<N_rank+1> storage;
Array<T_numtype, N_rank+1> array(shape, 6, storage); Array<T_numtype, N_rank+1> array(shape, 6, storage);
makeInterlacedArray(array, a1, 0); makeInterlacedArray(array, a1, 0);
makeInterlacedArray(array, a2, 1); makeInterlacedArray(array, a2, 1);
makeInterlacedArray(array, a3, 2); makeInterlacedArray(array, a3, 2);
makeInterlacedArray(array, a4, 3); makeInterlacedArray(array, a4, 3);
makeInterlacedArray(array, a5, 4); makeInterlacedArray(array, a5, 4);
makeInterlacedArray(array, a6, 5); makeInterlacedArray(array, a6, 5);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void interlaceArrays(const TinyVector<int,N_rank>& shape, void interlaceArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6, Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6,
Array<T_numtype,N_rank>& a7) Array<T_numtype,N_rank>& a7)
{ {
GeneralArrayStorage<N_rank+1> storage; GeneralArrayStorage<N_rank+1> storage;
Array<T_numtype, N_rank+1> array(shape, 7, storage); Array<T_numtype, N_rank+1> array(shape, 7, storage);
makeInterlacedArray(array, a1, 0); makeInterlacedArray(array, a1, 0);
makeInterlacedArray(array, a2, 1); makeInterlacedArray(array, a2, 1);
makeInterlacedArray(array, a3, 2); makeInterlacedArray(array, a3, 2);
makeInterlacedArray(array, a4, 3); makeInterlacedArray(array, a4, 3);
makeInterlacedArray(array, a5, 4); makeInterlacedArray(array, a5, 4);
makeInterlacedArray(array, a6, 5); makeInterlacedArray(array, a6, 5);
makeInterlacedArray(array, a7, 6); makeInterlacedArray(array, a7, 6);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void interlaceArrays(const TinyVector<int,N_rank>& shape, void interlaceArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6, Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6,
Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8) Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8)
{ {
GeneralArrayStorage<N_rank+1> storage; GeneralArrayStorage<N_rank+1> storage;
Array<T_numtype, N_rank+1> array(shape, 8, storage); Array<T_numtype, N_rank+1> array(shape, 8, storage);
makeInterlacedArray(array, a1, 0); makeInterlacedArray(array, a1, 0);
makeInterlacedArray(array, a2, 1); makeInterlacedArray(array, a2, 1);
makeInterlacedArray(array, a3, 2); makeInterlacedArray(array, a3, 2);
makeInterlacedArray(array, a4, 3); makeInterlacedArray(array, a4, 3);
makeInterlacedArray(array, a5, 4); makeInterlacedArray(array, a5, 4);
makeInterlacedArray(array, a6, 5); makeInterlacedArray(array, a6, 5);
makeInterlacedArray(array, a7, 6); makeInterlacedArray(array, a7, 6);
makeInterlacedArray(array, a8, 7); makeInterlacedArray(array, a8, 7);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void interlaceArrays(const TinyVector<int,N_rank>& shape, void interlaceArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6, Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6,
Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8, Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8,
Array<T_numtype,N_rank>& a9) Array<T_numtype,N_rank>& a9)
{ {
GeneralArrayStorage<N_rank+1> storage; GeneralArrayStorage<N_rank+1> storage;
Array<T_numtype, N_rank+1> array(shape, 9, storage); Array<T_numtype, N_rank+1> array(shape, 9, storage);
makeInterlacedArray(array, a1, 0); makeInterlacedArray(array, a1, 0);
makeInterlacedArray(array, a2, 1); makeInterlacedArray(array, a2, 1);
makeInterlacedArray(array, a3, 2); makeInterlacedArray(array, a3, 2);
makeInterlacedArray(array, a4, 3); makeInterlacedArray(array, a4, 3);
makeInterlacedArray(array, a5, 4); makeInterlacedArray(array, a5, 4);
makeInterlacedArray(array, a6, 5); makeInterlacedArray(array, a6, 5);
makeInterlacedArray(array, a7, 6); makeInterlacedArray(array, a7, 6);
makeInterlacedArray(array, a8, 7); makeInterlacedArray(array, a8, 7);
makeInterlacedArray(array, a9, 8); makeInterlacedArray(array, a9, 8);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void interlaceArrays(const TinyVector<int,N_rank>& shape, void interlaceArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6, Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6,
Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8, Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8,
Array<T_numtype,N_rank>& a9, Array<T_numtype,N_rank>& a10) Array<T_numtype,N_rank>& a9, Array<T_numtype,N_rank>& a10)
{ {
GeneralArrayStorage<N_rank+1> storage; GeneralArrayStorage<N_rank+1> storage;
Array<T_numtype, N_rank+1> array(shape, 10, storage); Array<T_numtype, N_rank+1> array(shape, 10, storage);
makeInterlacedArray(array, a1, 0); makeInterlacedArray(array, a1, 0);
skipping to change at line 252 skipping to change at line 240
makeInterlacedArray(array, a3, 2); makeInterlacedArray(array, a3, 2);
makeInterlacedArray(array, a4, 3); makeInterlacedArray(array, a4, 3);
makeInterlacedArray(array, a5, 4); makeInterlacedArray(array, a5, 4);
makeInterlacedArray(array, a6, 5); makeInterlacedArray(array, a6, 5);
makeInterlacedArray(array, a7, 6); makeInterlacedArray(array, a7, 6);
makeInterlacedArray(array, a8, 7); makeInterlacedArray(array, a8, 7);
makeInterlacedArray(array, a9, 8); makeInterlacedArray(array, a9, 8);
makeInterlacedArray(array, a10, 9); makeInterlacedArray(array, a10, 9);
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void interlaceArrays(const TinyVector<int,N_rank>& shape, void interlaceArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6, Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6,
Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8, Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8,
Array<T_numtype,N_rank>& a9, Array<T_numtype,N_rank>& a10, Array<T_numtype,N_rank>& a9, Array<T_numtype,N_rank>& a10,
Array<T_numtype,N_rank>& a11) Array<T_numtype,N_rank>& a11)
{ {
GeneralArrayStorage<N_rank+1> storage; GeneralArrayStorage<N_rank+1> storage;
Array<T_numtype, N_rank+1> array(shape, 11, storage); Array<T_numtype, N_rank+1> array(shape, 11, storage);
skipping to change at line 283 skipping to change at line 271
makeInterlacedArray(array, a11, 10); makeInterlacedArray(array, a11, 10);
} }
// NEEDS_WORK -- make `storage' a parameter in these routines // NEEDS_WORK -- make `storage' a parameter in these routines
// Will be tricky: have to convert GeneralArrayStorage<N_rank> to // Will be tricky: have to convert GeneralArrayStorage<N_rank> to
// GeneralArrayStorage<N_rank+1> // GeneralArrayStorage<N_rank+1>
// These routines may or may not interlace arrays, depending on // These routines may or may not interlace arrays, depending on
// whether it is advantageous for this platform. // whether it is advantageous for this platform.
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void allocateArrays(const TinyVector<int,N_rank>& shape, void allocateArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2) Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2)
{ {
#ifdef BZ_INTERLACE_ARRAYS #ifdef BZ_INTERLACE_ARRAYS
interlaceArrays(shape, a1, a2); interlaceArrays(shape, a1, a2);
#else #else
a1.resize(shape); a1.resize(shape);
a2.resize(shape); a2.resize(shape);
#endif #endif
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void allocateArrays(const TinyVector<int,N_rank>& shape, void allocateArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3) Array<T_numtype,N_rank>& a3)
{ {
#ifdef BZ_INTERLACE_ARRAYS #ifdef BZ_INTERLACE_ARRAYS
interlaceArrays(shape, a1, a2, a3); interlaceArrays(shape, a1, a2, a3);
#else #else
a1.resize(shape); a1.resize(shape);
a2.resize(shape); a2.resize(shape);
a3.resize(shape); a3.resize(shape);
#endif #endif
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void allocateArrays(const TinyVector<int,N_rank>& shape, void allocateArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4) Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4)
{ {
#ifdef BZ_INTERLACE_ARRAYS #ifdef BZ_INTERLACE_ARRAYS
interlaceArrays(shape, a1, a2, a3, a4); interlaceArrays(shape, a1, a2, a3, a4);
#else #else
a1.resize(shape); a1.resize(shape);
a2.resize(shape); a2.resize(shape);
a3.resize(shape); a3.resize(shape);
a4.resize(shape); a4.resize(shape);
#endif #endif
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void allocateArrays(const TinyVector<int,N_rank>& shape, void allocateArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5) Array<T_numtype,N_rank>& a5)
{ {
#ifdef BZ_INTERLACE_ARRAYS #ifdef BZ_INTERLACE_ARRAYS
interlaceArrays(shape, a1, a2, a3, a4, a5); interlaceArrays(shape, a1, a2, a3, a4, a5);
#else #else
a1.resize(shape); a1.resize(shape);
a2.resize(shape); a2.resize(shape);
a3.resize(shape); a3.resize(shape);
a4.resize(shape); a4.resize(shape);
a5.resize(shape); a5.resize(shape);
#endif #endif
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void allocateArrays(const TinyVector<int,N_rank>& shape, void allocateArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6) Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6)
{ {
#ifdef BZ_INTERLACE_ARRAYS #ifdef BZ_INTERLACE_ARRAYS
interlaceArrays(shape, a1, a2, a3, a4, a5, a6); interlaceArrays(shape, a1, a2, a3, a4, a5, a6);
#else #else
a1.resize(shape); a1.resize(shape);
a2.resize(shape); a2.resize(shape);
a3.resize(shape); a3.resize(shape);
a4.resize(shape); a4.resize(shape);
a5.resize(shape); a5.resize(shape);
a6.resize(shape); a6.resize(shape);
#endif #endif
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void allocateArrays(const TinyVector<int,N_rank>& shape, void allocateArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6, Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6,
Array<T_numtype,N_rank>& a7) Array<T_numtype,N_rank>& a7)
{ {
#ifdef BZ_INTERLACE_ARRAYS #ifdef BZ_INTERLACE_ARRAYS
interlaceArrays(shape, a1, a2, a3, a4, a5, a6, a7); interlaceArrays(shape, a1, a2, a3, a4, a5, a6, a7);
#else #else
a1.resize(shape); a1.resize(shape);
a2.resize(shape); a2.resize(shape);
a3.resize(shape); a3.resize(shape);
a4.resize(shape); a4.resize(shape);
a5.resize(shape); a5.resize(shape);
a6.resize(shape); a6.resize(shape);
a7.resize(shape); a7.resize(shape);
#endif #endif
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void allocateArrays(const TinyVector<int,N_rank>& shape, void allocateArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6, Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6,
Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8) Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8)
{ {
#ifdef BZ_INTERLACE_ARRAYS #ifdef BZ_INTERLACE_ARRAYS
interlaceArrays(shape, a1, a2, a3, a4, a5, a6, a7, a8); interlaceArrays(shape, a1, a2, a3, a4, a5, a6, a7, a8);
#else #else
a1.resize(shape); a1.resize(shape);
a2.resize(shape); a2.resize(shape);
a3.resize(shape); a3.resize(shape);
a4.resize(shape); a4.resize(shape);
a5.resize(shape); a5.resize(shape);
a6.resize(shape); a6.resize(shape);
a7.resize(shape); a7.resize(shape);
a8.resize(shape); a8.resize(shape);
#endif #endif
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void allocateArrays(const TinyVector<int,N_rank>& shape, void allocateArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6, Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6,
Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8, Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8,
Array<T_numtype,N_rank>& a9) Array<T_numtype,N_rank>& a9)
{ {
#ifdef BZ_INTERLACE_ARRAYS #ifdef BZ_INTERLACE_ARRAYS
interlaceArrays(shape, a1, a2, a3, a4, a5, a6, a7, a8, a9); interlaceArrays(shape, a1, a2, a3, a4, a5, a6, a7, a8, a9);
#else #else
skipping to change at line 423 skipping to change at line 411
a3.resize(shape); a3.resize(shape);
a4.resize(shape); a4.resize(shape);
a5.resize(shape); a5.resize(shape);
a6.resize(shape); a6.resize(shape);
a7.resize(shape); a7.resize(shape);
a8.resize(shape); a8.resize(shape);
a9.resize(shape); a9.resize(shape);
#endif #endif
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void allocateArrays(const TinyVector<int,N_rank>& shape, void allocateArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6, Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6,
Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8, Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8,
Array<T_numtype,N_rank>& a9, Array<T_numtype,N_rank>& a10) Array<T_numtype,N_rank>& a9, Array<T_numtype,N_rank>& a10)
{ {
#ifdef BZ_INTERLACE_ARRAYS #ifdef BZ_INTERLACE_ARRAYS
interlaceArrays(shape, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); interlaceArrays(shape, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
#else #else
skipping to change at line 447 skipping to change at line 435
a4.resize(shape); a4.resize(shape);
a5.resize(shape); a5.resize(shape);
a6.resize(shape); a6.resize(shape);
a7.resize(shape); a7.resize(shape);
a8.resize(shape); a8.resize(shape);
a9.resize(shape); a9.resize(shape);
a10.resize(shape); a10.resize(shape);
#endif #endif
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void allocateArrays(const TinyVector<int,N_rank>& shape, void allocateArrays(const TinyVector<int,N_rank>& shape,
Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2, Array<T_numtype,N_rank>& a1, Array<T_numtype,N_rank>& a2,
Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4, Array<T_numtype,N_rank>& a3, Array<T_numtype,N_rank>& a4,
Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6, Array<T_numtype,N_rank>& a5, Array<T_numtype,N_rank>& a6,
Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8, Array<T_numtype,N_rank>& a7, Array<T_numtype,N_rank>& a8,
Array<T_numtype,N_rank>& a9, Array<T_numtype,N_rank>& a10, Array<T_numtype,N_rank>& a9, Array<T_numtype,N_rank>& a10,
Array<T_numtype,N_rank>& a11) Array<T_numtype,N_rank>& a11)
{ {
#ifdef BZ_INTERLACE_ARRAYS #ifdef BZ_INTERLACE_ARRAYS
interlaceArrays(shape, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); interlaceArrays(shape, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
skipping to change at line 476 skipping to change at line 464
a8.resize(shape); a8.resize(shape);
a9.resize(shape); a9.resize(shape);
a10.resize(shape); a10.resize(shape);
a11.resize(shape); a11.resize(shape);
#endif #endif
} }
// NEEDS_WORK -- allocateArrays for TinyVector<Range,N_rank> // NEEDS_WORK -- allocateArrays for TinyVector<Range,N_rank>
// This constructor is used to create interlaced arrays. // This constructor is used to create interlaced arrays.
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
Array<T_numtype,N_rank>::Array(const TinyVector<int,N_rank-1>& shape, Array<T_numtype,N_rank>::Array(const TinyVector<int,N_rank-1>& shape,
int lastExtent, const GeneralArrayStorage<N_rank>& storage) int lastExtent, const GeneralArrayStorage<N_rank>& storage)
: storage_(storage) : storage_(storage)
{ {
// Create an array with the given shape, plus an extra dimension // Create an array with the given shape, plus an extra dimension
// for the number of arrays being allocated. This extra dimension // for the number of arrays being allocated. This extra dimension
// must have minor storage order. // must have minor storage order.
if (ordering(0) == 0) if (ordering(0) == 0)
{ {
skipping to change at line 510 skipping to change at line 498
} }
else { else {
BZPRECHECK(0, "Used allocateArrays() with a peculiar storage format "); BZPRECHECK(0, "Used allocateArrays() with a peculiar storage format ");
} }
setupStorage(N_rank-1); setupStorage(N_rank-1);
} }
// NEEDS_WORK -- see note about TinyVector<Range,N> in <blitz/arrayshape.h> // NEEDS_WORK -- see note about TinyVector<Range,N> in <blitz/arrayshape.h>
#if 0 #if 0
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
Array<T_numtype,N_rank>::Array(const TinyVector<Range,N_rank-1>& shape, Array<T_numtype,N_rank>::Array(const TinyVector<Range,N_rank-1>& shape,
int lastExtent, const GeneralArrayStorage<N_rank>& storage) int lastExtent, const GeneralArrayStorage<N_rank>& storage)
: storage_(storage) : storage_(storage)
{ {
#ifdef BZ_DEBUG #ifdef BZ_DEBUG
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
BZPRECHECK(shape[i].isAscendingContiguous(), BZPRECHECK(shape[i].isAscendingContiguous(),
"In call to allocateArrays(), a Range object is not ascending" << e ndl "In call to allocateArrays(), a Range object is not ascending" << e ndl
<< "contiguous: " << shape[i] << endl); << "contiguous: " << shape[i] << endl);
#endif #endif
 End of changes. 27 change blocks. 
39 lines changed or deleted 27 lines changed or added


 io.cc   io.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/io.cc Input/output of arrays. * blitz/array/io.cc Input/output of arrays.
* *
* $Id: io.cc,v 1.4 2002/03/07 08:37:26 patricg Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: io.cc,v $ #ifndef BZ_ARRAYIO_CC
* Revision 1.4 2002/03/07 08:37:26 patricg #define BZ_ARRAYIO_CC
*
* cosmetic change
*
* Revision 1.3 2002/03/06 16:03:02 patricg
*
* added typename (_bz_typename) qualifier to the iterator and const_iterat
or
* of Array<T_numtype,N_rank>
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/io.cc> must be included via <blitz/array.h> #error <blitz/array/io.cc> must be included via <blitz/array.h>
#endif #endif
#ifndef BZ_ARRAYIO_CC
#define BZ_ARRAYIO_CC
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T_numtype> template<typename T_numtype>
ostream& operator<<(ostream& os, const Array<T_numtype,1>& x) ostream& operator<<(ostream& os, const Array<T_numtype,1>& x)
{ {
os << x.extent(firstRank) << endl; os << x.extent(firstRank) << endl;
os << " [ "; os << " [ ";
for (int i=x.lbound(firstRank); i <= x.ubound(firstRank); ++i) for (int i=x.lbound(firstRank); i <= x.ubound(firstRank); ++i)
{ {
os << setw(9) << x(i) << " "; os << setw(9) << x(i) << " ";
if (!((i+1-x.lbound(firstRank))%7)) if (!((i+1-x.lbound(firstRank))%7))
os << endl << " "; os << endl << " ";
} }
os << " ]"; os << " ]";
return os; return os;
} }
template<class T_numtype> template<typename T_numtype>
ostream& operator<<(ostream& os, const Array<T_numtype,2>& x) ostream& operator<<(ostream& os, const Array<T_numtype,2>& x)
{ {
os << x.rows() << " x " << x.columns() << endl; os << x.rows() << " x " << x.columns() << endl;
os << "[ "; os << "[ ";
for (int i=x.lbound(firstRank); i <= x.ubound(firstRank); ++i) for (int i=x.lbound(firstRank); i <= x.ubound(firstRank); ++i)
{ {
for (int j=x.lbound(secondRank); j <= x.ubound(secondRank); ++j) for (int j=x.lbound(secondRank); j <= x.ubound(secondRank); ++j)
{ {
os << setw(9) << x(i,j) << " "; os << setw(9) << x(i,j) << " ";
if (!((j+1-x.lbound(secondRank)) % 7)) if (!((j+1-x.lbound(secondRank)) % 7))
skipping to change at line 87 skipping to change at line 70
if (i != x.ubound(firstRank)) if (i != x.ubound(firstRank))
os << endl << " "; os << endl << " ";
} }
os << "]" << endl; os << "]" << endl;
return os; return os;
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
ostream& operator<<(ostream& os, const Array<T_numtype,N_rank>& x) ostream& operator<<(ostream& os, const Array<T_numtype,N_rank>& x)
{ {
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
{ {
os << x.extent(i); os << x.extent(i);
if (i != N_rank - 1) if (i != N_rank - 1)
os << " x "; os << " x ";
} }
os << endl << "[ "; os << endl << "[ ";
skipping to change at line 121 skipping to change at line 104
} }
os << "]" << endl; os << "]" << endl;
return os; return os;
} }
/* /*
* Input * Input
*/ */
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
istream& operator>>(istream& is, Array<T_numtype,N_rank>& x) istream& operator>>(istream& is, Array<T_numtype,N_rank>& x)
{ {
TinyVector<int,N_rank> extent; TinyVector<int,N_rank> extent;
char sep; char sep;
// Read the extent vector: this is separated by 'x's, e.g. // Read the extent vector: this is separated by 'x's, e.g.
// 3 x 4 x 5 // 3 x 4 x 5
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
{ {
 End of changes. 7 change blocks. 
26 lines changed or deleted 8 lines changed or added


 iter.h   iter.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/iter.h Basic iterator for arrays. * blitz/array/iter.h Basic iterator for arrays.
* *
* $Id: iter.h,v 1.4 2002/05/27 19:41:24 jcumming Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: iter.h,v $
* Revision 1.4 2002/05/27 19:41:24 jcumming
* Removed use of this->. data_ is now declared in scope of class definiti
on.
*
* Revision 1.3 2002/03/06 15:56:43 patricg
*
* data_ replaced by this->data_ in
* template<class T, int N>
* class ArrayIterator : public ConstArrayIterator<T,N> {},
* removed struct _bz_endTag { }; declaration
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/iter.h> must be included via <blitz/array.h> #error <blitz/array/iter.h> must be included via <blitz/array.h>
#endif #endif
#ifndef BZ_ARRAY_ITER_H #ifndef BZ_ARRAY_ITER_H
#define BZ_ARRAY_ITER_H #define BZ_ARRAY_ITER_H
#ifdef BZ_HAVE_STL
#include <iterator>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T, int N> // helper class ConstPointerStack
class ConstArrayIterator { template<typename P_numtype, int N_rank>
class ConstPointerStack {
public:
typedef P_numtype T_numtype;
void operator=(const ConstPointerStack<P_numtype,N_rank>& rhs)
{
for (int i=0; i<N_rank; ++i)
stack_[i] = rhs.stack_[i];
}
const T_numtype*& operator[](int position)
{
return stack_[position];
}
private:
const T_numtype * stack_[N_rank];
};
template<typename T, int N>
class ConstArrayIterator {
public: public:
ConstArrayIterator() : data_(0) { }
ConstArrayIterator(const Array<T,N>& array) ConstArrayIterator(const Array<T,N>& array)
{ {
// Making internal copies of these avoids keeping // Making internal copies of these avoids keeping
// a pointer to the array and doing indirection. // a pointer to the array and doing indirection.
strides_ = array.stride(); strides_ = array.stride();
lbound_ = array.lbound(); lbound_ = array.lbound();
extent_ = array.extent(); extent_ = array.extent();
order_ = array.ordering(); order_ = array.ordering();
first_ = const_cast<T*>(array.dataFirst()); data_ = const_cast<T*>(array.dataFirst());
data_ = first_;
maxRank_ = order_(0); maxRank_ = order_(0);
stride_ = strides_(maxRank_); stride_ = strides_(maxRank_);
for (int i=0; i < N; ++i) for (int i=0; i < N; ++i)
{ {
stack_[i] = data_; stack_[i] = data_;
last_[i] = data_ + array.extent(order_(i)) last_[i] = data_ + extent_(order_(i)) * strides_(order_(i));
* strides_(order_(i));
} }
pos_ = lbound_; pos_ = lbound_;
} }
ConstArrayIterator(const Array<T,N>& array, _bz_endTag) bool operator==(const ConstArrayIterator<T,N>& x) const
{ {
// The _bz_endTag type is provided by the end() method return data_ == x.data_;
// in Array<T,N>, and indicates that an end iterator }
// is to be constructed.
// Use 0 pointer to mark end of array. bool operator!=(const ConstArrayIterator<T,N>& x) const
// This also handles the case of empty arrays, which {
// have their data pointer set to 0. return data_ != x.data_;
data_ = 0;
} }
T operator*() const const T& operator*() const
{ {
BZPRECHECK(data_ != 0, "Attempted to dereference invalid iterator " BZPRECHECK(data_ != 0, "Attempted to dereference invalid iterator "
<< "(empty array or past end of array)"); << "(empty array or past end of array)");
return *data_; return *data_;
} }
const T* _bz_restrict operator->() const const T* restrict operator->() const
{ {
BZPRECHECK(data_ != 0, "Attempted to dereference invalid iterator " BZPRECHECK(data_ != 0, "Attempted to dereference invalid iterator "
<< "(empty array or past end of array)"); << "(empty array or past end of array)");
return data_; return data_;
} }
ConstArrayIterator<T,N>& operator++(); ConstArrayIterator<T,N>& operator++();
// This operator returns void, which breaks the STL forward ConstArrayIterator<T,N> operator++(int)
// iterator requirements. Unfortunately many people have {
// gotten into the habit of writing iter++ when they really ConstArrayIterator<T,N> tmp = *this;
// mean ++iter. iter++ implemented the proper way requires ++(*this);
// returning a copy of the original state of the iterator, return tmp;
// before increment. This would be very inefficient, since }
// the iterator contains a lot of data. Hence the void
// return: it will be efficient even if you write iter++.
// Maybe this is a bad idea, let me know if this causes
// you problems.
void operator++(int)
{ ++(*this); }
// get the current position of the Array iterator in index space
const TinyVector<int,N>& position() const const TinyVector<int,N>& position() const
{ {
BZPRECHECK(data_ != 0, "Array<T,N>::iterator::position() called on" BZPRECHECK(data_ != 0, "Array<T,N>::iterator::position() called on"
<< " invalid iterator"); << " invalid iterator");
return pos_; return pos_;
} }
bool operator==(const ConstArrayIterator<T,N>& x) const
{
return data_ == x.data_;
}
bool operator!=(const ConstArrayIterator<T,N>& x) const
{
return data_ != x.data_;
}
private:
ConstArrayIterator() { }
private: private:
TinyVector<int,N> strides_, lbound_, extent_, order_; TinyVector<int,N> strides_, lbound_, extent_, order_;
T * stack_[N]; ConstPointerStack<T,N> stack_;
T * last_[N]; ConstPointerStack<T,N> last_;
int stride_; int stride_;
int maxRank_; int maxRank_;
protected: protected:
TinyVector<int,N> pos_; TinyVector<int,N> pos_;
T * _bz_restrict data_; T * restrict data_;
T * _bz_restrict first_;
}; };
template<class T, int N> template<typename T, int N>
class ArrayIterator : public ConstArrayIterator<T,N> { class ArrayIterator : public ConstArrayIterator<T,N> {
private: private:
typedef ConstArrayIterator<T,N> T_base; typedef ConstArrayIterator<T,N> T_base;
using T_base::data_; using T_base::data_;
public:
ArrayIterator(Array<T,N>& x)
: ConstArrayIterator<T,N>(x)
{ }
ArrayIterator(Array<T,N>& x, _bz_endTag y) public:
: ConstArrayIterator<T,N>(x,y) ArrayIterator() { }
{ }
ArrayIterator<T,N>& operator++() ArrayIterator(Array<T,N>& x) : T_base(x) { }
{
ConstArrayIterator<T,N>::operator++();
return *this;
}
T& operator*() T& operator*() const
{ {
BZPRECHECK(data_ != 0, "Attempted to dereference invalid iterator "
<< "(empty array or past end of array)");
return *data_; return *data_;
} }
T* _bz_restrict operator->() T* restrict operator->() const
{ {
BZPRECHECK(data_ != 0, "Attempted to dereference invalid iterator "
<< "(empty array or past end of array)");
return data_; return data_;
} }
ArrayIterator<T,N>& operator++()
{
T_base::operator++();
return *this;
}
ArrayIterator<T,N> operator++(int)
{
ArrayIterator<T,N> tmp = *this;
++(*this);
return tmp;
}
}; };
template<class T, int N> template<typename T, int N>
ConstArrayIterator<T,N>& ConstArrayIterator<T,N>::operator++() ConstArrayIterator<T,N>& ConstArrayIterator<T,N>::operator++()
{ {
BZPRECHECK(data_ != 0, "Attempted to iterate past the end of an array." ); BZPRECHECK(data_ != 0, "Attempted to iterate past the end of an array." );
data_ += stride_; data_ += stride_;
if (data_ != last_[0]) if (data_ != last_[0])
{ {
// We hit this case almost all the time. // We hit this case almost all the time.
++pos_[maxRank_]; ++pos_[maxRank_];
return *this; return *this;
} }
// We've hit the end of a row/column/whatever. Need to // We've hit the end of a row/column/whatever. Need to
// increment one of the loops over another dimension. // increment one of the loops over another dimension.
int j = 1; int j = 1;
for (; j < N; ++j) for (; j < N; ++j)
{ {
int r = order_(j); int r = order_(j);
data_ = stack_[j]; data_ = const_cast<T*>(stack_[j]);
data_ += strides_[r]; data_ += strides_[r];
++pos_(r); ++pos_(r);
if (data_ != last_[j]) if (data_ != last_[j])
break; break;
} }
// All done? // All done?
if (j == N) if (j == N)
{ {
skipping to change at line 237 skipping to change at line 231
stack_[j] = data_; stack_[j] = data_;
last_[j] = data_ + extent_(r2) * strides_(r2); last_[j] = data_ + extent_(r2) * strides_(r2);
pos_(r2) = lbound_(r2); pos_(r2) = lbound_(r2);
} }
return *this; return *this;
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#ifdef BZ_HAVE_STL
// support for std::iterator_traits
BZ_NAMESPACE(std)
template <typename T, int N>
struct iterator_traits< BZ_BLITZ_SCOPE(ConstArrayIterator)<T,N> >
{
typedef forward_iterator_tag iterator_category;
typedef T value_type;
typedef ptrdiff_t difference_type;
typedef const T* pointer;
typedef const T& reference;
};
template <typename T, int N>
struct iterator_traits< BZ_BLITZ_SCOPE(ArrayIterator)<T,N> >
{
typedef forward_iterator_tag iterator_category;
typedef T value_type;
typedef ptrdiff_t difference_type;
typedef T* pointer;
typedef T& reference;
};
BZ_NAMESPACE_END
#endif // BZ_HAVE_STL
#endif // BZ_ARRAY_ITER_H #endif // BZ_ARRAY_ITER_H
 End of changes. 32 change blocks. 
84 lines changed or deleted 105 lines changed or added


 limits-hack.h   limits-hack.h 
/* /*
* Severely hacked-up version of SGI/libstdc++ limits, for use with Blitz.
* $Log: limits-hack.h,v $
* Revision 1.2 2001/01/25 00:25:54 tveldhui
* Ensured that source files have cvs logs.
*
*/
/*
* Copyright (c) 1997 * Copyright (c) 1997
* Silicon Graphics Computer Systems, Inc. * Silicon Graphics Computer Systems, Inc.
* *
* Permission to use, copy, modify, distribute and sell this software * Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee, * and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and * provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear * that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no * in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any * representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty. * purpose. It is provided "as is" without express or implied warranty.
skipping to change at line 50 skipping to change at line 42
}; };
enum float_denorm_style { enum float_denorm_style {
denorm_indeterminate = -1, denorm_indeterminate = -1,
denorm_absent = 0, denorm_absent = 0,
denorm_present = 1 denorm_present = 1
}; };
// Base class for all specializations of numeric_limits. // Base class for all specializations of numeric_limits.
template <class __number> template <typename __number>
class _Numeric_limits_base { class _Numeric_limits_base {
public: public:
static const bool is_specialized = false; static const bool is_specialized = false;
static __number min() { return __number(); } static __number min() { return __number(); }
static __number max() { return __number(); } static __number max() { return __number(); }
static const int digits = 0; static const int digits = 0;
static const int digits10 = 0; static const int digits10 = 0;
skipping to change at line 96 skipping to change at line 88
static const bool is_iec559 = false; static const bool is_iec559 = false;
static const bool is_bounded = false; static const bool is_bounded = false;
static const bool is_modulo = false; static const bool is_modulo = false;
static const bool traps = false; static const bool traps = false;
static const bool tinyness_before = false; static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero; static const float_round_style round_style = round_toward_zero;
}; };
#define __declare_numeric_base_member(__type, __mem) \ #define __declare_numeric_base_member(__type, __mem) \
template <class __number> \ template <typename __number> \
const __type _Numeric_limits_base<__number>:: __mem const __type _Numeric_limits_base<__number>:: __mem
__declare_numeric_base_member(bool, is_specialized); __declare_numeric_base_member(bool, is_specialized);
__declare_numeric_base_member(int, digits); __declare_numeric_base_member(int, digits);
__declare_numeric_base_member(int, digits10); __declare_numeric_base_member(int, digits10);
__declare_numeric_base_member(bool, is_signed); __declare_numeric_base_member(bool, is_signed);
__declare_numeric_base_member(bool, is_integer); __declare_numeric_base_member(bool, is_integer);
__declare_numeric_base_member(bool, is_exact); __declare_numeric_base_member(bool, is_exact);
__declare_numeric_base_member(int, radix); __declare_numeric_base_member(int, radix);
__declare_numeric_base_member(int, min_exponent); __declare_numeric_base_member(int, min_exponent);
skipping to change at line 126 skipping to change at line 118
__declare_numeric_base_member(bool, is_bounded); __declare_numeric_base_member(bool, is_bounded);
__declare_numeric_base_member(bool, is_modulo); __declare_numeric_base_member(bool, is_modulo);
__declare_numeric_base_member(bool, traps); __declare_numeric_base_member(bool, traps);
__declare_numeric_base_member(bool, tinyness_before); __declare_numeric_base_member(bool, tinyness_before);
__declare_numeric_base_member(float_round_style, round_style); __declare_numeric_base_member(float_round_style, round_style);
#undef __declare_numeric_base_member #undef __declare_numeric_base_member
// Base class for integers. // Base class for integers.
template <class _Int, template <typename _Int,
_Int __imin, _Int __imin,
_Int __imax, _Int __imax,
int __idigits = -1> int __idigits = -1>
class _Integer_limits : public _Numeric_limits_base<_Int> class _Integer_limits : public _Numeric_limits_base<_Int> {
{
public: public:
static const bool is_specialized = true; static const bool is_specialized = true;
static _Int min() { return __imin; } static _Int min() { return __imin; }
static _Int max() { return __imax; } static _Int max() { return __imax; }
static const int digits = static const int digits =
(__idigits < 0) ? sizeof(_Int) * CHAR_BIT - (__imin == 0 ? 0 : 1) (__idigits < 0) ? sizeof(_Int) * CHAR_BIT - (__imin == 0 ? 0 : 1)
: __idigits; : __idigits;
static const int digits10 = (digits * 301) / 1000; static const int digits10 = (digits * 301) / 1000;
skipping to change at line 154 skipping to change at line 145
static const bool is_signed = __imin != 0; static const bool is_signed = __imin != 0;
static const bool is_integer = true; static const bool is_integer = true;
static const bool is_exact = true; static const bool is_exact = true;
static const int radix = 2; static const int radix = 2;
static const bool is_bounded = true; static const bool is_bounded = true;
static const bool is_modulo = true; static const bool is_modulo = true;
}; };
#define __declare_integer_limits_member(__type, __mem) \ #define __declare_integer_limits_member(__type, __mem) \
template <class _Int, _Int __imin, _Int __imax, int __idigits> \ template <typename _Int, _Int __imin, _Int __imax, int __idigits> \
const __type _Integer_limits<_Int, __imin, __imax, __idigits>:: __mem const __type _Integer_limits<_Int, __imin, __imax, __idigits>:: __mem
__declare_integer_limits_member(bool, is_specialized); __declare_integer_limits_member(bool, is_specialized);
__declare_integer_limits_member(int, digits); __declare_integer_limits_member(int, digits);
__declare_integer_limits_member(int, digits10); __declare_integer_limits_member(int, digits10);
__declare_integer_limits_member(bool, is_signed); __declare_integer_limits_member(bool, is_signed);
__declare_integer_limits_member(bool, is_integer); __declare_integer_limits_member(bool, is_integer);
__declare_integer_limits_member(bool, is_exact); __declare_integer_limits_member(bool, is_exact);
__declare_integer_limits_member(int, radix); __declare_integer_limits_member(int, radix);
__declare_integer_limits_member(bool, is_bounded); __declare_integer_limits_member(bool, is_bounded);
__declare_integer_limits_member(bool, is_modulo); __declare_integer_limits_member(bool, is_modulo);
#undef __declare_integer_limits_member #undef __declare_integer_limits_member
// Base class for floating-point numbers. // Base class for floating-point numbers.
template <class __number, template <typename __number,
int __Digits, int __Digits10, int __Digits, int __Digits10,
int __MinExp, int __MaxExp, int __MinExp, int __MaxExp,
int __MinExp10, int __MaxExp10, int __MinExp10, int __MaxExp10,
unsigned int __InfinityWord, unsigned int __InfinityWord,
unsigned int __QNaNWord, unsigned int __SNaNWord, unsigned int __QNaNWord, unsigned int __SNaNWord,
bool __IsIEC559, bool __IsIEC559,
float_round_style __RoundStyle> float_round_style __RoundStyle>
class _Floating_limits : public _Numeric_limits_base<__number> class _Floating_limits : public _Numeric_limits_base<__number>
{ {
public: public:
skipping to change at line 226 skipping to change at line 217
static const bool is_iec559 = __IsIEC559; static const bool is_iec559 = __IsIEC559;
static const bool is_bounded = true; static const bool is_bounded = true;
static const bool traps = true; static const bool traps = true;
static const bool tinyness_before = false; static const bool tinyness_before = false;
static const float_round_style round_style = __RoundStyle; static const float_round_style round_style = __RoundStyle;
}; };
#define __declare_float_limits_member(__type, __mem) \ #define __declare_float_limits_member(__type, __mem) \
template <class __Num, int __Dig, int __Dig10, \ template <typename __Num, int __Dig, int __Dig10, \
int __MnX, int __MxX, int __MnX10, int __MxX10, \ int __MnX, int __MxX, int __MnX10, int __MxX10, \
unsigned int __Inf, unsigned int __QNaN, unsigned int __SNaN, \ unsigned int __Inf, unsigned int __QNaN, unsigned int __SNaN, \
bool __IsIEEE, float_round_style __Sty> \ bool __IsIEEE, float_round_style __Sty> \
const __type _Floating_limits<__Num, __Dig, __Dig10, \ const __type _Floating_limits<__Num, __Dig, __Dig10, \
__MnX, __MxX, __MnX10, __MxX10, \ __MnX, __MxX, __MnX10, __MxX10, \
__Inf, __QNaN, __SNaN,__IsIEEE, __Sty>:: __me m __Inf, __QNaN, __SNaN,__IsIEEE, __Sty>:: __me m
__declare_float_limits_member(bool, is_specialized); __declare_float_limits_member(bool, is_specialized);
__declare_float_limits_member(int, digits); __declare_float_limits_member(int, digits);
__declare_float_limits_member(int, digits10); __declare_float_limits_member(int, digits10);
skipping to change at line 260 skipping to change at line 251
__declare_float_limits_member(bool, traps); __declare_float_limits_member(bool, traps);
__declare_float_limits_member(bool, tinyness_before); __declare_float_limits_member(bool, tinyness_before);
__declare_float_limits_member(float_round_style, round_style); __declare_float_limits_member(float_round_style, round_style);
#undef __declare_float_limits_member #undef __declare_float_limits_member
// Class numeric_limits // Class numeric_limits
// The unspecialized class. // The unspecialized class.
template<class T> template<typename T>
class numeric_limits : public _Numeric_limits_base<T> {}; class numeric_limits : public _Numeric_limits_base<T> {};
// Specializations for all built-in integral types. // Specializations for all built-in integral types.
#ifndef __STL_NO_BOOL #ifndef __STL_NO_BOOL
template<> template<>
class numeric_limits<bool> class numeric_limits<bool>
: public _Integer_limits<bool, false, true, 0> : public _Integer_limits<bool, false, true, 0> {};
{};
#endif /* __STL_NO_BOOL */ #endif /* __STL_NO_BOOL */
template<> template<>
class numeric_limits<char> class numeric_limits<char>
: public _Integer_limits<char, CHAR_MIN, CHAR_MAX> : public _Integer_limits<char, CHAR_MIN, CHAR_MAX> {};
{};
template<> template<>
class numeric_limits<signed char> class numeric_limits<signed char>
: public _Integer_limits<signed char, SCHAR_MIN, SCHAR_MAX> : public _Integer_limits<signed char, SCHAR_MIN, SCHAR_MAX> {};
{};
template<> template<>
class numeric_limits<unsigned char> class numeric_limits<unsigned char>
: public _Integer_limits<unsigned char, 0, UCHAR_MAX> : public _Integer_limits<unsigned char, 0, UCHAR_MAX> {};
{};
#ifdef __STL_HAS_WCHAR_T #ifdef __STL_HAS_WCHAR_T
template<> template<>
class numeric_limits<wchar_t> class numeric_limits<wchar_t>
: public _Integer_limits<wchar_t, INT_MIN, INT_MAX> : public _Integer_limits<wchar_t, INT_MIN, INT_MAX> {};
{};
#endif #endif
template<> template<>
class numeric_limits<short> class numeric_limits<short>
: public _Integer_limits<short, SHRT_MIN, SHRT_MAX> : public _Integer_limits<short, SHRT_MIN, SHRT_MAX> {};
{};
template<> template<>
class numeric_limits<unsigned short> class numeric_limits<unsigned short>
: public _Integer_limits<unsigned short, 0, USHRT_MAX> : public _Integer_limits<unsigned short, 0, USHRT_MAX> {};
{};
template<> template<>
class numeric_limits<int> class numeric_limits<int>
: public _Integer_limits<int, INT_MIN, INT_MAX> : public _Integer_limits<int, INT_MIN, INT_MAX> {};
{};
template<> template<>
class numeric_limits<unsigned int> class numeric_limits<unsigned int>
: public _Integer_limits<unsigned int, 0, UINT_MAX> : public _Integer_limits<unsigned int, 0, UINT_MAX> {};
{};
template<> template<>
class numeric_limits<long> class numeric_limits<long>
: public _Integer_limits<long, LONG_MIN, LONG_MAX> : public _Integer_limits<long, LONG_MIN, LONG_MAX> {};
{};
template<> template<>
class numeric_limits<unsigned long> class numeric_limits<unsigned long>
: public _Integer_limits<unsigned long, 0, ULONG_MAX> : public _Integer_limits<unsigned long, 0, ULONG_MAX> {};
{};
#ifdef __STL_LONG_LONG #ifdef __STL_LONG_LONG
#ifdef LONG_LONG_MIN #ifdef LONG_LONG_MIN
// CYGNUS LOCAL 9/4/1998 // CYGNUS LOCAL 9/4/1998
// fixed LONGLONG to be LONG_LONG // fixed LONGLONG to be LONG_LONG
template<> template<>
class numeric_limits<long long> class numeric_limits<long long>
: public _Integer_limits<long long, LONG_LONG_MIN, LONG_LONG_MAX> : public _Integer_limits<long long, LONG_LONG_MIN, LONG_LONG_MAX> {};
{};
// CYGNUS LOCAL 9/4/1998 // CYGNUS LOCAL 9/4/1998
// fixed LONGLONG to be LONG_LONG // fixed LONGLONG to be LONG_LONG
template<> template<>
class numeric_limits<unsigned long long> class numeric_limits<unsigned long long>
: public _Integer_limits<unsigned long long, 0, ULONG_LONG_MAX> : public _Integer_limits<unsigned long long, 0, ULONG_LONG_MAX> {};
{};
#endif #endif
#endif /* __STL_LONG_LONG */ #endif /* __STL_LONG_LONG */
// Specializations for all built-in floating-point type. // Specializations for all built-in floating-point type.
template<> class numeric_limits<float> template<> class numeric_limits<float>
: public _Floating_limits<float, : public _Floating_limits<float,
FLT_MANT_DIG, // Binary digits of precision FLT_MANT_DIG, // Binary digits of precision
FLT_DIG, // Decimal digits of precision FLT_DIG, // Decimal digits of precision
 End of changes. 22 change blocks. 
43 lines changed or deleted 21 lines changed or added


 listinit.h   listinit.h 
/************************************************************************** * /************************************************************************** *
* blitz/listinit.h Classes for initialization lists * blitz/listinit.h Classes for initialization lists
* *
* $Id: listinit.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: listinit.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: listinit.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
/* /*
* Initialization lists provide a convenient way to set the elements * Initialization lists provide a convenient way to set the elements
* of an array. For example, * of an array. For example,
* *
* Array<int,2> A(3,3); * Array<int,2> A(3,3);
* A = 1, 0, 0, * A = 1, 0, 0,
* 0, 1, 0, * 0, 1, 0,
* 0, 0, 1; * 0, 0, 1;
*/ */
#ifndef BZ_LISTINIT_H #ifndef BZ_LISTINIT_H
#define BZ_LISTINIT_H #define BZ_LISTINIT_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T_numtype, class T_iterator> template<typename T_numtype, typename T_iterator>
class ListInitializer { class ListInitializer {
public: public:
ListInitializer(T_iterator iter) ListInitializer(T_iterator iter)
: iter_(iter) : iter_(iter)
{ {
} }
ListInitializer<T_numtype, T_iterator> operator,(T_numtype x) ListInitializer<T_numtype, T_iterator> operator,(T_numtype x)
{ {
skipping to change at line 77 skipping to change at line 63
return ListInitializer<T_numtype, T_iterator>(iter_ + 1); return ListInitializer<T_numtype, T_iterator>(iter_ + 1);
} }
private: private:
ListInitializer(); ListInitializer();
protected: protected:
T_iterator iter_; T_iterator iter_;
}; };
template<class T_array, class T_iterator = _bz_typename T_array::T_numtype* > template<typename T_array, typename T_iterator = _bz_typename T_array::T_nu mtype*>
class ListInitializationSwitch { class ListInitializationSwitch {
public: public:
typedef _bz_typename T_array::T_numtype T_numtype; typedef _bz_typename T_array::T_numtype T_numtype;
ListInitializationSwitch(const ListInitializationSwitch<T_array>& lis) ListInitializationSwitch(const ListInitializationSwitch<T_array>& lis)
: array_(lis.array_), value_(lis.value_), : array_(lis.array_), value_(lis.value_),
wipeOnDestruct_(_bz_true) wipeOnDestruct_(true)
{ {
lis.disable(); lis.disable();
} }
ListInitializationSwitch(T_array& array, T_numtype value) ListInitializationSwitch(T_array& array, T_numtype value)
: array_(array), value_(value), wipeOnDestruct_(_bz_true) : array_(array), value_(value), wipeOnDestruct_(true)
{ } { }
~ListInitializationSwitch() ~ListInitializationSwitch()
{ {
if (wipeOnDestruct_) if (wipeOnDestruct_)
array_.initialize(value_); array_.initialize(value_);
} }
ListInitializer<T_numtype, T_iterator> operator,(T_numtype x) ListInitializer<T_numtype, T_iterator> operator,(T_numtype x)
{ {
wipeOnDestruct_ = _bz_false; wipeOnDestruct_ = false;
T_iterator iter = array_.getInitializationIterator(); T_iterator iter = array_.getInitializationIterator();
*iter = value_; *iter = value_;
T_iterator iter2 = iter + 1; T_iterator iter2 = iter + 1;
*iter2 = x; *iter2 = x;
return ListInitializer<T_numtype, T_iterator>(iter2 + 1); return ListInitializer<T_numtype, T_iterator>(iter2 + 1);
} }
void disable() const void disable() const
{ {
wipeOnDestruct_ = _bz_false; wipeOnDestruct_ = false;
} }
private: private:
ListInitializationSwitch(); ListInitializationSwitch();
protected: protected:
T_array& array_; T_array& array_;
T_numtype value_; T_numtype value_;
mutable _bz_bool wipeOnDestruct_; mutable bool wipeOnDestruct_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_LISTINIT_H #endif // BZ_LISTINIT_H
 End of changes. 9 change blocks. 
24 lines changed or deleted 10 lines changed or added


 map.h   map.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/map.h Declaration of the ArrayIndexMapping class * blitz/array/map.h Declaration of the ArrayIndexMapping class
* *
* $Id: map.h,v 1.3 2002/05/10 14:32:08 patricg Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: map.h,v $
* Revision 1.3 2002/05/10 14:32:08 patricg
*
* private constructor for template class ArrayIndexMapping did not had an
* explicit initialiser for the private member random_, added it.
* Compaq C++ V6.5-014 for Compaq Tru64 UNIX V5.1A (Rev. 1885) complained a
bout
* this.
*
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
/* /*
* ArrayIndexMapping is used to implement tensor array notation. For * ArrayIndexMapping is used to implement tensor array notation. For
* example: * example:
* *
* Array<float, 2> A, B; * Array<float, 2> A, B;
* firstIndex i; * firstIndex i;
* secondIndex j; * secondIndex j;
* thirdIndex k; * thirdIndex k;
* Array<float, 3> C = A(i,j) * B(j,k); * Array<float, 3> C = A(i,j) * B(j,k);
skipping to change at line 78 skipping to change at line 56
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* _bz_doArrayIndexMapping is a helper class. It is specialized for * _bz_doArrayIndexMapping is a helper class. It is specialized for
* ranks 1, 2, 3, ..., 11. * ranks 1, 2, 3, ..., 11.
*/ */
template<int N_rank> template<int N_rank>
struct _bz_doArrayIndexMapping { struct _bz_doArrayIndexMapping {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, N_rank>&, static T_numtype map(const Array<T_numtype, N_rank>&,
const TinyVector<int,N_destRank>&, int, int, int, int, int, int, const TinyVector<int,N_destRank>&, int, int, int, int, int, int,
int, int, int, int, int) int, int, int, int, int)
{ {
// If you try to use an array index mapping on an array with // If you try to use an array index mapping on an array with
// rank greater than 11, then you'll get a precondition failure // rank greater than 11, then you'll get a precondition failure
// here. // here.
BZPRECONDITION(0); BZPRECONDITION(0);
return T_numtype();
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<1> { struct _bz_doArrayIndexMapping<1> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 1>& array, static T_numtype map(const Array<T_numtype, 1>& array,
const TinyVector<int,N_destRank>& index, int i0, int, int, int, int , const TinyVector<int,N_destRank>& index, int i0, int, int, int, int ,
int, int, int, int, int, int) int, int, int, int, int, int)
{ {
return array(index[i0]); return array(index[i0]);
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<2> { struct _bz_doArrayIndexMapping<2> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 2>& array, static T_numtype map(const Array<T_numtype, 2>& array,
const TinyVector<int,N_destRank>& index, int i0, int i1, int, const TinyVector<int,N_destRank>& index, int i0, int i1, int,
int, int, int, int, int, int, int, int) int, int, int, int, int, int, int, int)
{ {
return array(index[i0], index[i1]); return array(index[i0], index[i1]);
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<3> { struct _bz_doArrayIndexMapping<3> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 3>& array, static T_numtype map(const Array<T_numtype, 3>& array,
const TinyVector<int,N_destRank>& index, int i0, int i1, int i2, const TinyVector<int,N_destRank>& index, int i0, int i1, int i2,
int, int, int, int, int, int, int, int) int, int, int, int, int, int, int, int)
{ {
return array(index[i0], index[i1], index[i2]); return array(index[i0], index[i1], index[i2]);
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<4> { struct _bz_doArrayIndexMapping<4> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 4>& array, static T_numtype map(const Array<T_numtype, 4>& array,
const TinyVector<int,N_destRank>& index, int i0, int i1, int i2, const TinyVector<int,N_destRank>& index, int i0, int i1, int i2,
int i3, int, int, int, int, int, int, int) int i3, int, int, int, int, int, int, int)
{ {
return array(index[i0], index[i1], index[i2], index[i3]); return array(index[i0], index[i1], index[i2], index[i3]);
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<5> { struct _bz_doArrayIndexMapping<5> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 5>& array, static T_numtype map(const Array<T_numtype, 5>& array,
const TinyVector<int,N_destRank>& index, int i0, int i1, int i2, const TinyVector<int,N_destRank>& index, int i0, int i1, int i2,
int i3, int i4, int, int, int, int, int, int) int i3, int i4, int, int, int, int, int, int)
{ {
return array(index[i0], index[i1], index[i2], index[i3], index[i4]) ; return array(index[i0], index[i1], index[i2], index[i3], index[i4]) ;
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<6> { struct _bz_doArrayIndexMapping<6> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 6>& array, static T_numtype map(const Array<T_numtype, 6>& array,
const TinyVector<int,N_destRank>& index, int i0, int i1, int i2, const TinyVector<int,N_destRank>& index, int i0, int i1, int i2,
int i3, int i4, int i5, int, int, int, int, int) int i3, int i4, int i5, int, int, int, int, int)
{ {
return array(index[i0], index[i1], index[i2], index[i3], index[i4], return array(index[i0], index[i1], index[i2], index[i3], index[i4],
index[i5]); index[i5]);
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<7> { struct _bz_doArrayIndexMapping<7> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 7>& array, static T_numtype map(const Array<T_numtype, 7>& array,
const TinyVector<int,N_destRank>& index, int i0, int i1, int i2, const TinyVector<int,N_destRank>& index, int i0, int i1, int i2,
int i3, int i4, int i5, int i6, int, int, int, int) int i3, int i4, int i5, int i6, int, int, int, int)
{ {
return array(index[i0], index[i1], index[i2], index[i3], index[i4], return array(index[i0], index[i1], index[i2], index[i3], index[i4],
index[i5], index[i6]); index[i5], index[i6]);
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<8> { struct _bz_doArrayIndexMapping<8> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 8>& array, static T_numtype map(const Array<T_numtype, 8>& array,
const TinyVector<int,N_destRank>& index, int i0, int i1, int i2, const TinyVector<int,N_destRank>& index, int i0, int i1, int i2,
int i3, int i4, int i5, int i6, int i7, int, int, int) int i3, int i4, int i5, int i6, int i7, int, int, int)
{ {
return array(index[i0], index[i1], index[i2], index[i3], index[i4], return array(index[i0], index[i1], index[i2], index[i3], index[i4],
index[i5], index[i6], index[i7]); index[i5], index[i6], index[i7]);
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<9> { struct _bz_doArrayIndexMapping<9> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 9>& array, static T_numtype map(const Array<T_numtype, 9>& array,
const TinyVector<int,N_destRank>& index, int i0, int i1, int i2, const TinyVector<int,N_destRank>& index, int i0, int i1, int i2,
int i3, int i4, int i5, int i6, int i7, int i8, int, int) int i3, int i4, int i5, int i6, int i7, int i8, int, int)
{ {
return array(index[i0], index[i1], index[i2], index[i3], index[i4], return array(index[i0], index[i1], index[i2], index[i3], index[i4],
index[i5], index[i6], index[i7], index[i8]); index[i5], index[i6], index[i7], index[i8]);
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<10> { struct _bz_doArrayIndexMapping<10> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 10>& array, static T_numtype map(const Array<T_numtype, 10>& array,
const TinyVector<int,N_destRank>& index, int i0, int i1, int i2, const TinyVector<int,N_destRank>& index, int i0, int i1, int i2,
int i3, int i4, int i5, int i6, int i7, int i8, int i9, int) int i3, int i4, int i5, int i6, int i7, int i8, int i9, int)
{ {
return array(index[i0], index[i1], index[i2], index[i3], index[i4], return array(index[i0], index[i1], index[i2], index[i3], index[i4],
index[i5], index[i6], index[i7], index[i8], index[i9]); index[i5], index[i6], index[i7], index[i8], index[i9]);
} }
}; };
template<> template<>
struct _bz_doArrayIndexMapping<11> { struct _bz_doArrayIndexMapping<11> {
template<class T_numtype, int N_destRank> template<typename T_numtype, int N_destRank>
static T_numtype map(const Array<T_numtype, 11>& array, static T_numtype map(const Array<T_numtype, 11>& array,
const TinyVector<int,N_destRank>& index, int i0, int i1, int i2, const TinyVector<int,N_destRank>& index, int i0, int i1, int i2,
int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10) int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10)
{ {
return array(index[i0], index[i1], index[i2], index[i3], index[i4], return array(index[i0], index[i1], index[i2], index[i3], index[i4],
index[i5], index[i6], index[i7], index[i8], index[i9], index[i5], index[i6], index[i7], index[i8], index[i9],
index[i10]); index[i10]);
} }
}; };
template<class P_numtype, int N_rank, int N_map0, int N_map1=0, int N_map2= 0, template<typename P_numtype, int N_rank, int N_map0, int N_map1=0, int N_ma p2=0,
int N_map3=0, int N_map4=0, int N_map5=0, int N_map6=0, int N_map7=0, int N_map3=0, int N_map4=0, int N_map5=0, int N_map6=0, int N_map7=0,
int N_map8=0, int N_map9=0, int N_map10=0> int N_map8=0, int N_map9=0, int N_map10=0>
class ArrayIndexMapping { class ArrayIndexMapping {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
typedef const Array<T_numtype,N_rank>& T_ctorArg1; typedef const Array<T_numtype,N_rank>& T_ctorArg1;
typedef int T_ctorArg2; // dummy typedef int T_ctorArg2; // dummy
/* /*
* This enum block finds the maximum of the N_map0, N_map1, ..., N_map1 0 * This enum block finds the maximum of the N_map0, N_map1, ..., N_map1 0
* parameters and stores it in maxRank10. The rank of the expression i s * parameters and stores it in maxRank10. The rank of the expression i s
* then maxRank10 + 1, since the IndexPlaceholders start at 0 rather th an * then maxRank10 + 1, since the IndexPlaceholders start at 0 rather th an
* 1. * 1.
*/ */
enum { static const int
maxRank1 = (N_map0 > N_map1) ? N_map0 : N_map1, maxRank1 = (N_map0 > N_map1) ? N_map0 : N_map1,
maxRank2 = (N_map2 > maxRank1) ? N_map2 : maxRank1, maxRank2 = (N_map2 > maxRank1) ? N_map2 : maxRank1,
maxRank3 = (N_map3 > maxRank2) ? N_map3 : maxRank2, maxRank3 = (N_map3 > maxRank2) ? N_map3 : maxRank2,
maxRank4 = (N_map4 > maxRank3) ? N_map4 : maxRank3, maxRank4 = (N_map4 > maxRank3) ? N_map4 : maxRank3,
maxRank5 = (N_map5 > maxRank4) ? N_map5 : maxRank4, maxRank5 = (N_map5 > maxRank4) ? N_map5 : maxRank4,
maxRank6 = (N_map6 > maxRank5) ? N_map6 : maxRank5, maxRank6 = (N_map6 > maxRank5) ? N_map6 : maxRank5,
maxRank7 = (N_map7 > maxRank6) ? N_map7 : maxRank6, maxRank7 = (N_map7 > maxRank6) ? N_map7 : maxRank6,
maxRank8 = (N_map8 > maxRank7) ? N_map8 : maxRank7, maxRank8 = (N_map8 > maxRank7) ? N_map8 : maxRank7,
maxRank9 = (N_map9 > maxRank8) ? N_map9 : maxRank8, maxRank9 = (N_map9 > maxRank8) ? N_map9 : maxRank8,
maxRank10 = (N_map10 > maxRank9) ? N_map10 : maxRank9 maxRank10 = (N_map10 > maxRank9) ? N_map10 : maxRank9;
};
enum { numArrayOperands = 1, numIndexPlaceholders = 1, static const int
rank = maxRank10 + 1 }; numArrayOperands = 1,
numIndexPlaceholders = 1,
rank = maxRank10 + 1;
ArrayIndexMapping(const Array<T_numtype, N_rank>& array) ArrayIndexMapping(const Array<T_numtype, N_rank>& array)
: array_(array) : array_(array)
{ {
} }
ArrayIndexMapping(const ArrayIndexMapping<T_numtype,N_rank,N_map0, ArrayIndexMapping(const ArrayIndexMapping<T_numtype,N_rank,N_map0,
N_map1,N_map2,N_map3,N_map4,N_map5,N_map6,N_map7,N_map8,N_map9, N_map1,N_map2,N_map3,N_map4,N_map5,N_map6,N_map7,N_map8,N_map9,
N_map10>& z) N_map10>& z)
: array_(z.array_) : array_(z.array_)
skipping to change at line 282 skipping to change at line 262
{ {
return _bz_doArrayIndexMapping<N_rank>::map(array_, i, return _bz_doArrayIndexMapping<N_rank>::map(array_, i,
N_map0, N_map1, N_map2, N_map3, N_map4, N_map5, N_map6, N_map0, N_map1, N_map2, N_map3, N_map4, N_map5, N_map6,
N_map7, N_map8, N_map9, N_map10); N_map7, N_map8, N_map9, N_map10);
} }
#endif #endif
int ascending(int rank) int ascending(int rank)
{ {
if (N_map0 == rank) if (N_map0 == rank)
return array_.ascending(0); return array_.isRankStoredAscending(0);
else if ((N_map1 == rank) && (N_rank > 1)) else if ((N_map1 == rank) && (N_rank > 1))
return array_.ascending(1); return array_.isRankStoredAscending(1);
else if ((N_map2 == rank) && (N_rank > 2)) else if ((N_map2 == rank) && (N_rank > 2))
return array_.ascending(2); return array_.isRankStoredAscending(2);
else if ((N_map3 == rank) && (N_rank > 3)) else if ((N_map3 == rank) && (N_rank > 3))
return array_.ascending(3); return array_.isRankStoredAscending(3);
else if ((N_map4 == rank) && (N_rank > 4)) else if ((N_map4 == rank) && (N_rank > 4))
return array_.ascending(4); return array_.isRankStoredAscending(4);
else if ((N_map5 == rank) && (N_rank > 5)) else if ((N_map5 == rank) && (N_rank > 5))
return array_.ascending(5); return array_.isRankStoredAscending(5);
else if ((N_map6 == rank) && (N_rank > 6)) else if ((N_map6 == rank) && (N_rank > 6))
return array_.ascending(6); return array_.isRankStoredAscending(6);
else if ((N_map7 == rank) && (N_rank > 7)) else if ((N_map7 == rank) && (N_rank > 7))
return array_.ascending(7); return array_.isRankStoredAscending(7);
else if ((N_map8 == rank) && (N_rank > 8)) else if ((N_map8 == rank) && (N_rank > 8))
return array_.ascending(8); return array_.isRankStoredAscending(8);
else if ((N_map9 == rank) && (N_rank > 9)) else if ((N_map9 == rank) && (N_rank > 9))
return array_.ascending(9); return array_.isRankStoredAscending(9);
else if ((N_map10 == rank) && (N_rank > 10)) else if ((N_map10 == rank) && (N_rank > 10))
return array_.ascending(10); return array_.isRankStoredAscending(10);
else else
return INT_MIN; // tiny(int()); return INT_MIN; // tiny(int());
} }
int ordering(int rank) int ordering(int rank)
{ {
if (N_map0 == rank) if (N_map0 == rank)
return array_.ordering(0); return array_.ordering(0);
else if ((N_map1 == rank) && (N_rank > 1)) else if ((N_map1 == rank) && (N_rank > 1))
return array_.ordering(1); return array_.ordering(1);
skipping to change at line 431 skipping to change at line 411
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
} }
// See operator*() note // See operator*() note
void loadStride(int) void loadStride(int)
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
} }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int) const
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return false; return false;
} }
void advanceUnitStride() void advanceUnitStride()
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
} }
_bz_bool canCollapse(int,int) const bool canCollapse(int,int) const
{ BZPRECONDITION(0); return _bz_false; } { BZPRECONDITION(0); return false; }
T_numtype operator[](int) T_numtype operator[](int)
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return T_numtype(); return T_numtype();
} }
T_numtype fastRead(int) T_numtype fastRead(int)
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return T_numtype(); return T_numtype();
} }
int suggestStride(int) const int suggestStride(int) const
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return 0; return 0;
} }
_bz_bool isStride(int,int) const bool isStride(int,int) const
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return _bz_true; return true;
} }
template<int N_rank2> template<int N_rank2>
void moveTo(const TinyVector<int,N_rank2>& i) void moveTo(const TinyVector<int,N_rank2>&)
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return ; return ;
} }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat&) const
{ {
// NEEDS_WORK-- do real formatting for reductions // NEEDS_WORK-- do real formatting for reductions
str += "map[NEEDS_WORK]"; str += "map[NEEDS_WORK]";
} }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) const bool shapeCheck(const T_shape&) const
{ {
// NEEDS_WORK-- do a real shape check (tricky) // NEEDS_WORK-- do a real shape check (tricky)
return _bz_true; return true;
} }
private: private:
ArrayIndexMapping() : array_( Array<T_numtype, N_rank>() ) { } ArrayIndexMapping() : array_( Array<T_numtype, N_rank>() ) { }
const Array<T_numtype, N_rank>& array_; const Array<T_numtype, N_rank>& array_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 39 change blocks. 
65 lines changed or deleted 44 lines changed or added


 matassign.h   matassign.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/meta/matassign.h TinyMatrix assignment metaprogram * blitz/meta/matassign.h TinyMatrix assignment metaprogram
* *
* $Id: matassign.h,v 1.2 2001/01/24 20:22:51 tveldhui Exp $ * $Id: matassign.h,v 1.6 2005/05/07 04:17:57 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matassign.h,v $
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:08:44 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_META_MATASSIGN_H #ifndef BZ_META_MATASSIGN_H
#define BZ_META_MATASSIGN_H #define BZ_META_MATASSIGN_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<int N_rows, int N_columns, int I, int J> template<int N_rows, int N_columns, int I, int J>
class _bz_meta_matAssign2 { class _bz_meta_matAssign2 {
public: public:
enum { go = (J < N_columns - 1) ? 1 : 0 }; static const int go = (J < N_columns - 1) ? 1 : 0;
template<class T_matrix, class T_expr, class T_updater> template<typename T_matrix, typename T_expr, typename T_updater>
static inline void f(T_matrix& mat, T_expr expr, T_updater u) static inline void f(T_matrix& mat, T_expr expr, T_updater u)
{ {
u.update(mat(I,J), expr(I,J)); u.update(mat(I,J), expr(I,J));
_bz_meta_matAssign2<N_rows * go, N_columns * go, I * go, (J+1) * go > _bz_meta_matAssign2<N_rows * go, N_columns * go, I * go, (J+1) * go >
::f(mat, expr, u); ::f(mat, expr, u);
} }
}; };
template<> template<>
class _bz_meta_matAssign2<0,0,0,0> { class _bz_meta_matAssign2<0,0,0,0> {
public: public:
template<class T_matrix, class T_expr, class T_updater> template<typename T_matrix, typename T_expr, typename T_updater>
static inline void f(T_matrix& mat, T_expr expr, T_updater u) static inline void f(T_matrix&, T_expr, T_updater)
{ } { }
}; };
template<int N_rows, int N_columns, int I> template<int N_rows, int N_columns, int I>
class _bz_meta_matAssign { class _bz_meta_matAssign {
public: public:
enum { go = (I < N_rows-1) ? 1 : 0 }; static const int go = (I < N_rows-1) ? 1 : 0;
template<class T_matrix, class T_expr, class T_updater> template<typename T_matrix, typename T_expr, typename T_updater>
static inline void f(T_matrix& mat, T_expr expr, T_updater u) static inline void f(T_matrix& mat, T_expr expr, T_updater u)
{ {
_bz_meta_matAssign2<N_rows, N_columns, I, 0>::f(mat, expr, u); _bz_meta_matAssign2<N_rows, N_columns, I, 0>::f(mat, expr, u);
_bz_meta_matAssign<N_rows * go, N_columns * go, (I+1) * go> _bz_meta_matAssign<N_rows * go, N_columns * go, (I+1) * go>
::f(mat, expr, u); ::f(mat, expr, u);
} }
}; };
template<> template<>
class _bz_meta_matAssign<0,0,0> { class _bz_meta_matAssign<0,0,0> {
public: public:
template<class T_matrix, class T_expr, class T_updater> template<typename T_matrix, typename T_expr, typename T_updater>
static inline void f(T_matrix& mat, T_expr expr, T_updater u) static inline void f(T_matrix&, T_expr, T_updater)
{ } { }
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_META_ASSIGN_H #endif // BZ_META_ASSIGN_H
 End of changes. 9 change blocks. 
25 lines changed or deleted 12 lines changed or added


 matbops.h   matbops.h 
// Generated source file. Do not edit. // Generated source file. Do not edit.
// Created by: genmatbops.cpp Jun 28 2002 15:25:04 // Created by: genmatbops.cpp Dec 10 2003 17:58:20
#ifndef BZ_MATBOPS_H #ifndef BZ_MATBOPS_H
#define BZ_MATBOPS_H #define BZ_MATBOPS_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
#ifndef BZ_MATEXPR_H #ifndef BZ_MATEXPR_H
#error <blitz/matbops.h> must be included via <blitz/matexpr.h> #error <blitz/matbops.h> must be included via <blitz/matexpr.h>
#endif #endif
skipping to change at line 39 skipping to change at line 39
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> + _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> + _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Add<P_numtype1, typename P_expr2::T_numtype > > >
operator+(const Matrix<P_numtype1, P_struct1>& d1, operator+(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> + int // Matrix<P_numtype1, P_struct1> + int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 143 skipping to change at line 143
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> + Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> + Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Add<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Add<typename P_expr1::T_numtype, P_numtype2 > > >
operator+(_bz_MatExpr<P_expr1> d1, operator+(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Add<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Add<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> + _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> + _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numt ype > > > _bz_Add<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator+(_bz_MatExpr<P_expr1> d1, operator+(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numt ype> > T_expr; _bz_Add<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T _expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> + int // _bz_MatExpr<P_expr1> + int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Add<_bz_typename P_expr1::T_numtype, int > > > _bz_Add<typename P_expr1::T_numtype, int > > >
operator+(_bz_MatExpr<P_expr1> d1, operator+(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Add<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Add<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> + float // _bz_MatExpr<P_expr1> + float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Add<_bz_typename P_expr1::T_numtype, float > > > _bz_Add<typename P_expr1::T_numtype, float > > >
operator+(_bz_MatExpr<P_expr1> d1, operator+(_bz_MatExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Add<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Add<typename P_expr1::T_numtype, float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<float>(d2))); _bz_MatExprConstant<float>(d2)));
} }
// _bz_MatExpr<P_expr1> + double // _bz_MatExpr<P_expr1> + double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Add<_bz_typename P_expr1::T_numtype, double > > > _bz_Add<typename P_expr1::T_numtype, double > > >
operator+(_bz_MatExpr<P_expr1> d1, operator+(_bz_MatExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Add<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Add<typename P_expr1::T_numtype, double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<double>(d2))); _bz_MatExprConstant<double>(d2)));
} }
// _bz_MatExpr<P_expr1> + long double // _bz_MatExpr<P_expr1> + long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Add<_bz_typename P_expr1::T_numtype, long double > > > _bz_Add<typename P_expr1::T_numtype, long double > > >
operator+(_bz_MatExpr<P_expr1> d1, operator+(_bz_MatExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Add<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Add<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<long double>(d2))); _bz_MatExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> + complex<T2> // _bz_MatExpr<P_expr1> + complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Add<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Add<typename P_expr1::T_numtype, complex<T2> > > >
operator+(_bz_MatExpr<P_expr1> d1, operator+(_bz_MatExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Add<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Add<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int + Matrix<P_numtype2, P_struct2> // int + Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
skipping to change at line 281 skipping to change at line 281
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int + _bz_MatExpr<P_expr2> // int + _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<int, _bz_typename P_expr2::T_numtype > > > _bz_Add<int, typename P_expr2::T_numtype > > >
operator+(int d1, operator+(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
// float + Matrix<P_numtype2, P_struct2> // float + Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 315 skipping to change at line 315
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// float + _bz_MatExpr<P_expr2> // float + _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<float, _bz_typename P_expr2::T_numtype > > > _bz_Add<float, typename P_expr2::T_numtype > > >
operator+(float d1, operator+(float d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, typedef _bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<float, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2)); d2));
} }
// double + Matrix<P_numtype2, P_struct2> // double + Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 349 skipping to change at line 349
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// double + _bz_MatExpr<P_expr2> // double + _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<double, _bz_typename P_expr2::T_numtype > > > _bz_Add<double, typename P_expr2::T_numtype > > >
operator+(double d1, operator+(double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, typedef _bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2)); d2));
} }
// long double + Matrix<P_numtype2, P_struct2> // long double + Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 383 skipping to change at line 383
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// long double + _bz_MatExpr<P_expr2> // long double + _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<long double, _bz_typename P_expr2::T_numtype > > > _bz_Add<long double, typename P_expr2::T_numtype > > >
operator+(long double d1, operator+(long double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, typedef _bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2)); d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> + Matrix<P_numtype2, P_struct2> // complex<T1> + Matrix<P_numtype2, P_struct2>
template<class T1, class P_numtype2, class P_struct2> template<class T1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
skipping to change at line 421 skipping to change at line 421
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> + _bz_MatExpr<P_expr2> // complex<T1> + _bz_MatExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Add<complex<T1> , typename P_expr2::T_numtype > > >
operator+(complex<T1> d1, operator+(complex<T1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Add<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Subtraction Operators * Subtraction Operators
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 460 skipping to change at line 460
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> - _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> - _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<P_numtype1, typename P_expr2::T_numtype > > >
operator-(const Matrix<P_numtype1, P_struct1>& d1, operator-(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> - int // Matrix<P_numtype1, P_struct1> - int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 564 skipping to change at line 564
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> - Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> - Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Subtract<typename P_expr1::T_numtype, P_numtype2 > > >
operator-(_bz_MatExpr<P_expr1> d1, operator-(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> - _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> - _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype > > > _bz_Subtract<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator-(_bz_MatExpr<P_expr1> d1, operator-(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> - int // _bz_MatExpr<P_expr1> - int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, int > > > _bz_Subtract<typename P_expr1::T_numtype, int > > >
operator-(_bz_MatExpr<P_expr1> d1, operator-(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> - float // _bz_MatExpr<P_expr1> - float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, float > > > _bz_Subtract<typename P_expr1::T_numtype, float > > >
operator-(_bz_MatExpr<P_expr1> d1, operator-(_bz_MatExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<float>(d2))); _bz_MatExprConstant<float>(d2)));
} }
// _bz_MatExpr<P_expr1> - double // _bz_MatExpr<P_expr1> - double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, double > > > _bz_Subtract<typename P_expr1::T_numtype, double > > >
operator-(_bz_MatExpr<P_expr1> d1, operator-(_bz_MatExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<double>(d2))); _bz_MatExprConstant<double>(d2)));
} }
// _bz_MatExpr<P_expr1> - long double // _bz_MatExpr<P_expr1> - long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, long double > > > _bz_Subtract<typename P_expr1::T_numtype, long double > > >
operator-(_bz_MatExpr<P_expr1> d1, operator-(_bz_MatExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<long double>(d2))); _bz_MatExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> - complex<T2> // _bz_MatExpr<P_expr1> - complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Subtract<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Subtract<typename P_expr1::T_numtype, complex<T2> > > >
operator-(_bz_MatExpr<P_expr1> d1, operator-(_bz_MatExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Subtract<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Subtract<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int - Matrix<P_numtype2, P_struct2> // int - Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
skipping to change at line 702 skipping to change at line 702
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int - _bz_MatExpr<P_expr2> // int - _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<int, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<int, typename P_expr2::T_numtype > > >
operator-(int d1, operator-(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
// float - Matrix<P_numtype2, P_struct2> // float - Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 736 skipping to change at line 736
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// float - _bz_MatExpr<P_expr2> // float - _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<float, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<float, typename P_expr2::T_numtype > > >
operator-(float d1, operator-(float d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, typedef _bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<float, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2)); d2));
} }
// double - Matrix<P_numtype2, P_struct2> // double - Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 770 skipping to change at line 770
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// double - _bz_MatExpr<P_expr2> // double - _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<double, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<double, typename P_expr2::T_numtype > > >
operator-(double d1, operator-(double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, typedef _bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2)); d2));
} }
// long double - Matrix<P_numtype2, P_struct2> // long double - Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 804 skipping to change at line 804
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// long double - _bz_MatExpr<P_expr2> // long double - _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<long double, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<long double, typename P_expr2::T_numtype > > >
operator-(long double d1, operator-(long double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, typedef _bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2)); d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> - Matrix<P_numtype2, P_struct2> // complex<T1> - Matrix<P_numtype2, P_struct2>
template<class T1, class P_numtype2, class P_struct2> template<class T1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
skipping to change at line 842 skipping to change at line 842
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> - _bz_MatExpr<P_expr2> // complex<T1> - _bz_MatExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Subtract<complex<T1> , typename P_expr2::T_numtype > > >
operator-(complex<T1> d1, operator-(complex<T1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Subtract<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Multiplication Operators * Multiplication Operators
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 881 skipping to change at line 881
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> * _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> * _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<P_numtype1, typename P_expr2::T_numtype > > >
operator*(const Matrix<P_numtype1, P_struct1>& d1, operator*(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> * int // Matrix<P_numtype1, P_struct1> * int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 985 skipping to change at line 985
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> * Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> * Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Multiply<typename P_expr1::T_numtype, P_numtype2 > > >
operator*(_bz_MatExpr<P_expr1> d1, operator*(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> * _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> * _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype > > > _bz_Multiply<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator*(_bz_MatExpr<P_expr1> d1, operator*(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> * int // _bz_MatExpr<P_expr1> * int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, int > > > _bz_Multiply<typename P_expr1::T_numtype, int > > >
operator*(_bz_MatExpr<P_expr1> d1, operator*(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> * float // _bz_MatExpr<P_expr1> * float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, float > > > _bz_Multiply<typename P_expr1::T_numtype, float > > >
operator*(_bz_MatExpr<P_expr1> d1, operator*(_bz_MatExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<float>(d2))); _bz_MatExprConstant<float>(d2)));
} }
// _bz_MatExpr<P_expr1> * double // _bz_MatExpr<P_expr1> * double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, double > > > _bz_Multiply<typename P_expr1::T_numtype, double > > >
operator*(_bz_MatExpr<P_expr1> d1, operator*(_bz_MatExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<double>(d2))); _bz_MatExprConstant<double>(d2)));
} }
// _bz_MatExpr<P_expr1> * long double // _bz_MatExpr<P_expr1> * long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, long double > > > _bz_Multiply<typename P_expr1::T_numtype, long double > > >
operator*(_bz_MatExpr<P_expr1> d1, operator*(_bz_MatExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<long double>(d2))); _bz_MatExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> * complex<T2> // _bz_MatExpr<P_expr1> * complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Multiply<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Multiply<typename P_expr1::T_numtype, complex<T2> > > >
operator*(_bz_MatExpr<P_expr1> d1, operator*(_bz_MatExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Multiply<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Multiply<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int * Matrix<P_numtype2, P_struct2> // int * Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
skipping to change at line 1123 skipping to change at line 1123
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int * _bz_MatExpr<P_expr2> // int * _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<int, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<int, typename P_expr2::T_numtype > > >
operator*(int d1, operator*(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
// float * Matrix<P_numtype2, P_struct2> // float * Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 1157 skipping to change at line 1157
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// float * _bz_MatExpr<P_expr2> // float * _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<float, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<float, typename P_expr2::T_numtype > > >
operator*(float d1, operator*(float d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, typedef _bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<float, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2)); d2));
} }
// double * Matrix<P_numtype2, P_struct2> // double * Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 1191 skipping to change at line 1191
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// double * _bz_MatExpr<P_expr2> // double * _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<double, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<double, typename P_expr2::T_numtype > > >
operator*(double d1, operator*(double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, typedef _bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2)); d2));
} }
// long double * Matrix<P_numtype2, P_struct2> // long double * Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 1225 skipping to change at line 1225
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// long double * _bz_MatExpr<P_expr2> // long double * _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<long double, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<long double, typename P_expr2::T_numtype > > >
operator*(long double d1, operator*(long double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, typedef _bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2)); d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> * Matrix<P_numtype2, P_struct2> // complex<T1> * Matrix<P_numtype2, P_struct2>
template<class T1, class P_numtype2, class P_struct2> template<class T1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
skipping to change at line 1263 skipping to change at line 1263
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> * _bz_MatExpr<P_expr2> // complex<T1> * _bz_MatExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Multiply<complex<T1> , typename P_expr2::T_numtype > > >
operator*(complex<T1> d1, operator*(complex<T1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Multiply<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Division Operators * Division Operators
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 1302 skipping to change at line 1302
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> / _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> / _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Divide<P_numtype1, typename P_expr2::T_numtype > > >
operator/(const Matrix<P_numtype1, P_struct1>& d1, operator/(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> / int // Matrix<P_numtype1, P_struct1> / int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 1406 skipping to change at line 1406
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> / Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> / Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Divide<typename P_expr1::T_numtype, P_numtype2 > > >
operator/(_bz_MatExpr<P_expr1> d1, operator/(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Divide<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> / _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> / _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype > > > _bz_Divide<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator/(_bz_MatExpr<P_expr1> d1, operator/(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype> > T_expr; _bz_Divide<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> / int // _bz_MatExpr<P_expr1> / int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Divide<_bz_typename P_expr1::T_numtype, int > > > _bz_Divide<typename P_expr1::T_numtype, int > > >
operator/(_bz_MatExpr<P_expr1> d1, operator/(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Divide<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Divide<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> / float // _bz_MatExpr<P_expr1> / float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Divide<_bz_typename P_expr1::T_numtype, float > > > _bz_Divide<typename P_expr1::T_numtype, float > > >
operator/(_bz_MatExpr<P_expr1> d1, operator/(_bz_MatExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Divide<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Divide<typename P_expr1::T_numtype, float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<float>(d2))); _bz_MatExprConstant<float>(d2)));
} }
// _bz_MatExpr<P_expr1> / double // _bz_MatExpr<P_expr1> / double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Divide<_bz_typename P_expr1::T_numtype, double > > > _bz_Divide<typename P_expr1::T_numtype, double > > >
operator/(_bz_MatExpr<P_expr1> d1, operator/(_bz_MatExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Divide<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Divide<typename P_expr1::T_numtype, double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<double>(d2))); _bz_MatExprConstant<double>(d2)));
} }
// _bz_MatExpr<P_expr1> / long double // _bz_MatExpr<P_expr1> / long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Divide<_bz_typename P_expr1::T_numtype, long double > > > _bz_Divide<typename P_expr1::T_numtype, long double > > >
operator/(_bz_MatExpr<P_expr1> d1, operator/(_bz_MatExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Divide<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Divide<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<long double>(d2))); _bz_MatExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> / complex<T2> // _bz_MatExpr<P_expr1> / complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Divide<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Divide<typename P_expr1::T_numtype, complex<T2> > > >
operator/(_bz_MatExpr<P_expr1> d1, operator/(_bz_MatExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Divide<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Divide<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int / Matrix<P_numtype2, P_struct2> // int / Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
skipping to change at line 1544 skipping to change at line 1544
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int / _bz_MatExpr<P_expr2> // int / _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<int, _bz_typename P_expr2::T_numtype > > > _bz_Divide<int, typename P_expr2::T_numtype > > >
operator/(int d1, operator/(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
// float / Matrix<P_numtype2, P_struct2> // float / Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 1578 skipping to change at line 1578
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// float / _bz_MatExpr<P_expr2> // float / _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<float, _bz_typename P_expr2::T_numtype > > > _bz_Divide<float, typename P_expr2::T_numtype > > >
operator/(float d1, operator/(float d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, typedef _bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<float, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2)); d2));
} }
// double / Matrix<P_numtype2, P_struct2> // double / Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 1612 skipping to change at line 1612
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// double / _bz_MatExpr<P_expr2> // double / _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<double, _bz_typename P_expr2::T_numtype > > > _bz_Divide<double, typename P_expr2::T_numtype > > >
operator/(double d1, operator/(double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, typedef _bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2)); d2));
} }
// long double / Matrix<P_numtype2, P_struct2> // long double / Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 1646 skipping to change at line 1646
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// long double / _bz_MatExpr<P_expr2> // long double / _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<long double, _bz_typename P_expr2::T_numtype > > > _bz_Divide<long double, typename P_expr2::T_numtype > > >
operator/(long double d1, operator/(long double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, typedef _bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2)); d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> / Matrix<P_numtype2, P_struct2> // complex<T1> / Matrix<P_numtype2, P_struct2>
template<class T1, class P_numtype2, class P_struct2> template<class T1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
skipping to change at line 1684 skipping to change at line 1684
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> / _bz_MatExpr<P_expr2> // complex<T1> / _bz_MatExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Divide<complex<T1> , typename P_expr2::T_numtype > > >
operator/(complex<T1> d1, operator/(complex<T1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Divide<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Modulus Operators * Modulus Operators
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 1723 skipping to change at line 1723
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> % _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> % _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Mod<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Mod<P_numtype1, typename P_expr2::T_numtype > > >
operator%(const Matrix<P_numtype1, P_struct1>& d1, operator%(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Mod<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Mod<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> % int // Matrix<P_numtype1, P_struct1> % int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 1757 skipping to change at line 1757
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> % Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> % Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Mod<typename P_expr1::T_numtype, P_numtype2 > > >
operator%(_bz_MatExpr<P_expr1> d1, operator%(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Mod<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> % _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> % _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numt ype > > > _bz_Mod<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator%(_bz_MatExpr<P_expr1> d1, operator%(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numt ype> > T_expr; _bz_Mod<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T _expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> % int // _bz_MatExpr<P_expr1> % int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Mod<_bz_typename P_expr1::T_numtype, int > > > _bz_Mod<typename P_expr1::T_numtype, int > > >
operator%(_bz_MatExpr<P_expr1> d1, operator%(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Mod<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Mod<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// int % Matrix<P_numtype2, P_struct2> // int % Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 1825 skipping to change at line 1825
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int % _bz_MatExpr<P_expr2> // int % _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Mod<int, _bz_typename P_expr2::T_numtype > > > _bz_Mod<int, typename P_expr2::T_numtype > > >
operator%(int d1, operator%(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Mod<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Mod<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
/************************************************************************** ** /************************************************************************** **
* Bitwise XOR Operators * Bitwise XOR Operators
************************************************************************** **/ ************************************************************************** **/
// Matrix<P_numtype1, P_struct1> ^ Matrix<P_numtype2, P_struct2> // Matrix<P_numtype1, P_struct1> ^ Matrix<P_numtype2, P_struct2>
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2> template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2>
skipping to change at line 1862 skipping to change at line 1862
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> ^ _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> ^ _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseXOR<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseXOR<P_numtype1, typename P_expr2::T_numtype > > >
operator^(const Matrix<P_numtype1, P_struct1>& d1, operator^(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseXOR<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseXOR<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> ^ int // Matrix<P_numtype1, P_struct1> ^ int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 1896 skipping to change at line 1896
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> ^ Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> ^ Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseXOR<typename P_expr1::T_numtype, P_numtype2 > > >
operator^(_bz_MatExpr<P_expr1> d1, operator^(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseXOR<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> ^ _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> ^ _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype > > > _bz_BitwiseXOR<typename P_expr1::T_numtype, typename P_expr2::T_numty pe > > >
operator^(_bz_MatExpr<P_expr1> d1, operator^(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype> > T_expr; _bz_BitwiseXOR<typename P_expr1::T_numtype, typename P_expr2::T_numty pe> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> ^ int // _bz_MatExpr<P_expr1> ^ int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, int > > > _bz_BitwiseXOR<typename P_expr1::T_numtype, int > > >
operator^(_bz_MatExpr<P_expr1> d1, operator^(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_BitwiseXOR<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// int ^ Matrix<P_numtype2, P_struct2> // int ^ Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 1964 skipping to change at line 1964
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int ^ _bz_MatExpr<P_expr2> // int ^ _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseXOR<int, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseXOR<int, typename P_expr2::T_numtype > > >
operator^(int d1, operator^(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseXOR<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseXOR<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
/************************************************************************** ** /************************************************************************** **
* Bitwise And Operators * Bitwise And Operators
************************************************************************** **/ ************************************************************************** **/
// Matrix<P_numtype1, P_struct1> & Matrix<P_numtype2, P_struct2> // Matrix<P_numtype1, P_struct1> & Matrix<P_numtype2, P_struct2>
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2> template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2>
skipping to change at line 2001 skipping to change at line 2001
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> & _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> & _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseAnd<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseAnd<P_numtype1, typename P_expr2::T_numtype > > >
operator&(const Matrix<P_numtype1, P_struct1>& d1, operator&(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseAnd<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseAnd<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> & int // Matrix<P_numtype1, P_struct1> & int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 2035 skipping to change at line 2035
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> & Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> & Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseAnd<typename P_expr1::T_numtype, P_numtype2 > > >
operator&(_bz_MatExpr<P_expr1> d1, operator&(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseAnd<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> & _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> & _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype > > > _bz_BitwiseAnd<typename P_expr1::T_numtype, typename P_expr2::T_numty pe > > >
operator&(_bz_MatExpr<P_expr1> d1, operator&(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype> > T_expr; _bz_BitwiseAnd<typename P_expr1::T_numtype, typename P_expr2::T_numty pe> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> & int // _bz_MatExpr<P_expr1> & int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, int > > > _bz_BitwiseAnd<typename P_expr1::T_numtype, int > > >
operator&(_bz_MatExpr<P_expr1> d1, operator&(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_BitwiseAnd<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// int & Matrix<P_numtype2, P_struct2> // int & Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 2103 skipping to change at line 2103
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int & _bz_MatExpr<P_expr2> // int & _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseAnd<int, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseAnd<int, typename P_expr2::T_numtype > > >
operator&(int d1, operator&(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseAnd<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseAnd<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
/************************************************************************** ** /************************************************************************** **
* Bitwise Or Operators * Bitwise Or Operators
************************************************************************** **/ ************************************************************************** **/
// Matrix<P_numtype1, P_struct1> | Matrix<P_numtype2, P_struct2> // Matrix<P_numtype1, P_struct1> | Matrix<P_numtype2, P_struct2>
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2> template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2>
skipping to change at line 2140 skipping to change at line 2140
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> | _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> | _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseOr<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseOr<P_numtype1, typename P_expr2::T_numtype > > >
operator|(const Matrix<P_numtype1, P_struct1>& d1, operator|(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseOr<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseOr<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> | int // Matrix<P_numtype1, P_struct1> | int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 2174 skipping to change at line 2174
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> | Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> | Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseOr<typename P_expr1::T_numtype, P_numtype2 > > >
operator|(_bz_MatExpr<P_expr1> d1, operator|(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseOr<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> | _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> | _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype > > > _bz_BitwiseOr<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e > > >
operator|(_bz_MatExpr<P_expr1> d1, operator|(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype> > T_expr; _bz_BitwiseOr<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> | int // _bz_MatExpr<P_expr1> | int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, int > > > _bz_BitwiseOr<typename P_expr1::T_numtype, int > > >
operator|(_bz_MatExpr<P_expr1> d1, operator|(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_BitwiseOr<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// int | Matrix<P_numtype2, P_struct2> // int | Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 2242 skipping to change at line 2242
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int | _bz_MatExpr<P_expr2> // int | _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseOr<int, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseOr<int, typename P_expr2::T_numtype > > >
operator|(int d1, operator|(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_BitwiseOr<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseOr<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
/************************************************************************** ** /************************************************************************** **
* Shift right Operators * Shift right Operators
************************************************************************** **/ ************************************************************************** **/
// Matrix<P_numtype1, P_struct1> >> Matrix<P_numtype2, P_struct2> // Matrix<P_numtype1, P_struct1> >> Matrix<P_numtype2, P_struct2>
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2> template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2>
skipping to change at line 2279 skipping to change at line 2279
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> >> _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> >> _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftRight<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_ShiftRight<P_numtype1, typename P_expr2::T_numtype > > >
operator>>(const Matrix<P_numtype1, P_struct1>& d1, operator>>(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftRight<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftRight<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> >> int // Matrix<P_numtype1, P_struct1> >> int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 2313 skipping to change at line 2313
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> >> Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> >> Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_ShiftRight<typename P_expr1::T_numtype, P_numtype2 > > >
operator>>(_bz_MatExpr<P_expr1> d1, operator>>(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_ShiftRight<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> >> _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> >> _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype > > > _bz_ShiftRight<typename P_expr1::T_numtype, typename P_expr2::T_numty pe > > >
operator>>(_bz_MatExpr<P_expr1> d1, operator>>(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype> > T_expr; _bz_ShiftRight<typename P_expr1::T_numtype, typename P_expr2::T_numty pe> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> >> int // _bz_MatExpr<P_expr1> >> int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, int > > > _bz_ShiftRight<typename P_expr1::T_numtype, int > > >
operator>>(_bz_MatExpr<P_expr1> d1, operator>>(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_ShiftRight<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// int >> Matrix<P_numtype2, P_struct2> // int >> Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 2381 skipping to change at line 2381
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int >> _bz_MatExpr<P_expr2> // int >> _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftRight<int, _bz_typename P_expr2::T_numtype > > > _bz_ShiftRight<int, typename P_expr2::T_numtype > > >
operator>>(int d1, operator>>(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftRight<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftRight<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
/************************************************************************** ** /************************************************************************** **
* Shift left Operators * Shift left Operators
************************************************************************** **/ ************************************************************************** **/
// Matrix<P_numtype1, P_struct1> << Matrix<P_numtype2, P_struct2> // Matrix<P_numtype1, P_struct1> << Matrix<P_numtype2, P_struct2>
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2> template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2>
skipping to change at line 2418 skipping to change at line 2418
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> << _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> << _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftLeft<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_ShiftLeft<P_numtype1, typename P_expr2::T_numtype > > >
operator<<(const Matrix<P_numtype1, P_struct1>& d1, operator<<(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftLeft<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftLeft<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> << int // Matrix<P_numtype1, P_struct1> << int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 2452 skipping to change at line 2452
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> << Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> << Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_ShiftLeft<typename P_expr1::T_numtype, P_numtype2 > > >
operator<<(_bz_MatExpr<P_expr1> d1, operator<<(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_ShiftLeft<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> << _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> << _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype > > > _bz_ShiftLeft<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e > > >
operator<<(_bz_MatExpr<P_expr1> d1, operator<<(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype> > T_expr; _bz_ShiftLeft<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> << int // _bz_MatExpr<P_expr1> << int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, int > > > _bz_ShiftLeft<typename P_expr1::T_numtype, int > > >
operator<<(_bz_MatExpr<P_expr1> d1, operator<<(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_ShiftLeft<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// int << Matrix<P_numtype2, P_struct2> // int << Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 2520 skipping to change at line 2520
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int << _bz_MatExpr<P_expr2> // int << _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftLeft<int, _bz_typename P_expr2::T_numtype > > > _bz_ShiftLeft<int, typename P_expr2::T_numtype > > >
operator<<(int d1, operator<<(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_ShiftLeft<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftLeft<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
/************************************************************************** ** /************************************************************************** **
* Greater-than Operators * Greater-than Operators
************************************************************************** **/ ************************************************************************** **/
// Matrix<P_numtype1, P_struct1> > Matrix<P_numtype2, P_struct2> // Matrix<P_numtype1, P_struct1> > Matrix<P_numtype2, P_struct2>
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2> template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2>
skipping to change at line 2557 skipping to change at line 2557
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> > _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> > _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Greater<P_numtype1, typename P_expr2::T_numtype > > >
operator>(const Matrix<P_numtype1, P_struct1>& d1, operator>(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> > int // Matrix<P_numtype1, P_struct1> > int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 2661 skipping to change at line 2661
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> > Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> > Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Greater<typename P_expr1::T_numtype, P_numtype2 > > >
operator>(_bz_MatExpr<P_expr1> d1, operator>(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Greater<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> > _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> > _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_ numtype > > > _bz_Greater<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator>(_bz_MatExpr<P_expr1> d1, operator>(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_ numtype> > T_expr; _bz_Greater<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> > int // _bz_MatExpr<P_expr1> > int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Greater<_bz_typename P_expr1::T_numtype, int > > > _bz_Greater<typename P_expr1::T_numtype, int > > >
operator>(_bz_MatExpr<P_expr1> d1, operator>(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Greater<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Greater<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> > float // _bz_MatExpr<P_expr1> > float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Greater<_bz_typename P_expr1::T_numtype, float > > > _bz_Greater<typename P_expr1::T_numtype, float > > >
operator>(_bz_MatExpr<P_expr1> d1, operator>(_bz_MatExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Greater<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Greater<typename P_expr1::T_numtype, float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<float>(d2))); _bz_MatExprConstant<float>(d2)));
} }
// _bz_MatExpr<P_expr1> > double // _bz_MatExpr<P_expr1> > double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Greater<_bz_typename P_expr1::T_numtype, double > > > _bz_Greater<typename P_expr1::T_numtype, double > > >
operator>(_bz_MatExpr<P_expr1> d1, operator>(_bz_MatExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Greater<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Greater<typename P_expr1::T_numtype, double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<double>(d2))); _bz_MatExprConstant<double>(d2)));
} }
// _bz_MatExpr<P_expr1> > long double // _bz_MatExpr<P_expr1> > long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Greater<_bz_typename P_expr1::T_numtype, long double > > > _bz_Greater<typename P_expr1::T_numtype, long double > > >
operator>(_bz_MatExpr<P_expr1> d1, operator>(_bz_MatExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Greater<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Greater<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<long double>(d2))); _bz_MatExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> > complex<T2> // _bz_MatExpr<P_expr1> > complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Greater<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Greater<typename P_expr1::T_numtype, complex<T2> > > >
operator>(_bz_MatExpr<P_expr1> d1, operator>(_bz_MatExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Greater<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Greater<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int > Matrix<P_numtype2, P_struct2> // int > Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
skipping to change at line 2799 skipping to change at line 2799
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int > _bz_MatExpr<P_expr2> // int > _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<int, _bz_typename P_expr2::T_numtype > > > _bz_Greater<int, typename P_expr2::T_numtype > > >
operator>(int d1, operator>(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
// float > Matrix<P_numtype2, P_struct2> // float > Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 2833 skipping to change at line 2833
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// float > _bz_MatExpr<P_expr2> // float > _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<float, _bz_typename P_expr2::T_numtype > > > _bz_Greater<float, typename P_expr2::T_numtype > > >
operator>(float d1, operator>(float d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, typedef _bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<float, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2)); d2));
} }
// double > Matrix<P_numtype2, P_struct2> // double > Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 2867 skipping to change at line 2867
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// double > _bz_MatExpr<P_expr2> // double > _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<double, _bz_typename P_expr2::T_numtype > > > _bz_Greater<double, typename P_expr2::T_numtype > > >
operator>(double d1, operator>(double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, typedef _bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2)); d2));
} }
// long double > Matrix<P_numtype2, P_struct2> // long double > Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 2901 skipping to change at line 2901
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// long double > _bz_MatExpr<P_expr2> // long double > _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<long double, _bz_typename P_expr2::T_numtype > > > _bz_Greater<long double, typename P_expr2::T_numtype > > >
operator>(long double d1, operator>(long double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, typedef _bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2)); d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> > Matrix<P_numtype2, P_struct2> // complex<T1> > Matrix<P_numtype2, P_struct2>
template<class T1, class P_numtype2, class P_struct2> template<class T1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
skipping to change at line 2939 skipping to change at line 2939
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> > _bz_MatExpr<P_expr2> // complex<T1> > _bz_MatExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Greater<complex<T1> , typename P_expr2::T_numtype > > >
operator>(complex<T1> d1, operator>(complex<T1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Greater<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Less-than Operators * Less-than Operators
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 2978 skipping to change at line 2978
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> < _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> < _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Less<P_numtype1, typename P_expr2::T_numtype > > >
operator<(const Matrix<P_numtype1, P_struct1>& d1, operator<(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> < int // Matrix<P_numtype1, P_struct1> < int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 3082 skipping to change at line 3082
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> < Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> < Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Less<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Less<typename P_expr1::T_numtype, P_numtype2 > > >
operator<(_bz_MatExpr<P_expr1> d1, operator<(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Less<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Less<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> < _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> < _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_num type > > > _bz_Less<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator<(_bz_MatExpr<P_expr1> d1, operator<(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_num type> > T_expr; _bz_Less<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> < int // _bz_MatExpr<P_expr1> < int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Less<_bz_typename P_expr1::T_numtype, int > > > _bz_Less<typename P_expr1::T_numtype, int > > >
operator<(_bz_MatExpr<P_expr1> d1, operator<(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Less<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Less<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> < float // _bz_MatExpr<P_expr1> < float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Less<_bz_typename P_expr1::T_numtype, float > > > _bz_Less<typename P_expr1::T_numtype, float > > >
operator<(_bz_MatExpr<P_expr1> d1, operator<(_bz_MatExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Less<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Less<typename P_expr1::T_numtype, float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<float>(d2))); _bz_MatExprConstant<float>(d2)));
} }
// _bz_MatExpr<P_expr1> < double // _bz_MatExpr<P_expr1> < double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Less<_bz_typename P_expr1::T_numtype, double > > > _bz_Less<typename P_expr1::T_numtype, double > > >
operator<(_bz_MatExpr<P_expr1> d1, operator<(_bz_MatExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Less<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Less<typename P_expr1::T_numtype, double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<double>(d2))); _bz_MatExprConstant<double>(d2)));
} }
// _bz_MatExpr<P_expr1> < long double // _bz_MatExpr<P_expr1> < long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Less<_bz_typename P_expr1::T_numtype, long double > > > _bz_Less<typename P_expr1::T_numtype, long double > > >
operator<(_bz_MatExpr<P_expr1> d1, operator<(_bz_MatExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Less<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Less<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<long double>(d2))); _bz_MatExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> < complex<T2> // _bz_MatExpr<P_expr1> < complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Less<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Less<typename P_expr1::T_numtype, complex<T2> > > >
operator<(_bz_MatExpr<P_expr1> d1, operator<(_bz_MatExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Less<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Less<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int < Matrix<P_numtype2, P_struct2> // int < Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
skipping to change at line 3220 skipping to change at line 3220
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int < _bz_MatExpr<P_expr2> // int < _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<int, _bz_typename P_expr2::T_numtype > > > _bz_Less<int, typename P_expr2::T_numtype > > >
operator<(int d1, operator<(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
// float < Matrix<P_numtype2, P_struct2> // float < Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 3254 skipping to change at line 3254
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// float < _bz_MatExpr<P_expr2> // float < _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<float, _bz_typename P_expr2::T_numtype > > > _bz_Less<float, typename P_expr2::T_numtype > > >
operator<(float d1, operator<(float d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, typedef _bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<float, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2)); d2));
} }
// double < Matrix<P_numtype2, P_struct2> // double < Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 3288 skipping to change at line 3288
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// double < _bz_MatExpr<P_expr2> // double < _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<double, _bz_typename P_expr2::T_numtype > > > _bz_Less<double, typename P_expr2::T_numtype > > >
operator<(double d1, operator<(double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, typedef _bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2)); d2));
} }
// long double < Matrix<P_numtype2, P_struct2> // long double < Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 3322 skipping to change at line 3322
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// long double < _bz_MatExpr<P_expr2> // long double < _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<long double, _bz_typename P_expr2::T_numtype > > > _bz_Less<long double, typename P_expr2::T_numtype > > >
operator<(long double d1, operator<(long double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, typedef _bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2)); d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> < Matrix<P_numtype2, P_struct2> // complex<T1> < Matrix<P_numtype2, P_struct2>
template<class T1, class P_numtype2, class P_struct2> template<class T1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
skipping to change at line 3360 skipping to change at line 3360
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> < _bz_MatExpr<P_expr2> // complex<T1> < _bz_MatExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Less<complex<T1> , typename P_expr2::T_numtype > > >
operator<(complex<T1> d1, operator<(complex<T1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Less<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Greater or equal (>=) operators * Greater or equal (>=) operators
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 3399 skipping to change at line 3399
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> >= _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> >= _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator>=(const Matrix<P_numtype1, P_struct1>& d1, operator>=(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_e xpr; _bz_GreaterOrEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> >= int // Matrix<P_numtype1, P_struct1> >= int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 3503 skipping to change at line 3503
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> >= Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> >= Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator>=(_bz_MatExpr<P_expr1> d1, operator>=(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_e xpr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> >= _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> >= _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_ex pr2::T_numtype > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_n umtype > > >
operator>=(_bz_MatExpr<P_expr1> d1, operator>=(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_ex pr2::T_numtype> > T_expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_n umtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> >= int // _bz_MatExpr<P_expr1> >= int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, int > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, int > > >
operator>=(_bz_MatExpr<P_expr1> d1, operator>=(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> >= float // _bz_MatExpr<P_expr1> >= float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, float > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, float > > >
operator>=(_bz_MatExpr<P_expr1> d1, operator>=(_bz_MatExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<float>(d2))); _bz_MatExprConstant<float>(d2)));
} }
// _bz_MatExpr<P_expr1> >= double // _bz_MatExpr<P_expr1> >= double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, double > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, double > > >
operator>=(_bz_MatExpr<P_expr1> d1, operator>=(_bz_MatExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<double>(d2))); _bz_MatExprConstant<double>(d2)));
} }
// _bz_MatExpr<P_expr1> >= long double // _bz_MatExpr<P_expr1> >= long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, long double > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, long double > > >
operator>=(_bz_MatExpr<P_expr1> d1, operator>=(_bz_MatExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, long double> > T_ expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, long double> > T_expr ;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<long double>(d2))); _bz_MatExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> >= complex<T2> // _bz_MatExpr<P_expr1> >= complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, complex<T2> > > >
operator>=(_bz_MatExpr<P_expr1> d1, operator>=(_bz_MatExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > T _expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, complex<T2> > > T_exp r;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int >= Matrix<P_numtype2, P_struct2> // int >= Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
skipping to change at line 3641 skipping to change at line 3641
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int >= _bz_MatExpr<P_expr2> // int >= _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<int, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<int, typename P_expr2::T_numtype > > >
operator>=(int d1, operator>=(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_GreaterOrEqual<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
// float >= Matrix<P_numtype2, P_struct2> // float >= Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 3675 skipping to change at line 3675
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// float >= _bz_MatExpr<P_expr2> // float >= _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<float, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<float, typename P_expr2::T_numtype > > >
operator>=(float d1, operator>=(float d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, typedef _bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_GreaterOrEqual<float, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2)); d2));
} }
// double >= Matrix<P_numtype2, P_struct2> // double >= Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 3709 skipping to change at line 3709
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// double >= _bz_MatExpr<P_expr2> // double >= _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<double, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<double, typename P_expr2::T_numtype > > >
operator>=(double d1, operator>=(double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, typedef _bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_GreaterOrEqual<double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2)); d2));
} }
// long double >= Matrix<P_numtype2, P_struct2> // long double >= Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 3743 skipping to change at line 3743
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// long double >= _bz_MatExpr<P_expr2> // long double >= _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<long double, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<long double, typename P_expr2::T_numtype > > >
operator>=(long double d1, operator>=(long double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, typedef _bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<long double, _bz_typename P_expr2::T_numtype> > T_ expr; _bz_GreaterOrEqual<long double, typename P_expr2::T_numtype> > T_expr ;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2)); d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> >= Matrix<P_numtype2, P_struct2> // complex<T1> >= Matrix<P_numtype2, P_struct2>
template<class T1, class P_numtype2, class P_struct2> template<class T1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
skipping to change at line 3781 skipping to change at line 3781
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> >= _bz_MatExpr<P_expr2> // complex<T1> >= _bz_MatExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<complex<T1> , typename P_expr2::T_numtype > > >
operator>=(complex<T1> d1, operator>=(complex<T1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_GreaterOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype> > T _expr; _bz_GreaterOrEqual<complex<T1> , typename P_expr2::T_numtype> > T_exp r;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Less or equal (<=) operators * Less or equal (<=) operators
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 3820 skipping to change at line 3820
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> <= _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> <= _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator<=(const Matrix<P_numtype1, P_struct1>& d1, operator<=(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr ; _bz_LessOrEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> <= int // Matrix<P_numtype1, P_struct1> <= int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 3924 skipping to change at line 3924
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> <= Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> <= Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LessOrEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator<=(_bz_MatExpr<P_expr1> d1, operator<=(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr ; _bz_LessOrEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> <= _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> <= _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2 ::T_numtype > > > _bz_LessOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_numt ype > > >
operator<=(_bz_MatExpr<P_expr1> d1, operator<=(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2 ::T_numtype> > T_expr; _bz_LessOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_numt ype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> <= int // _bz_MatExpr<P_expr1> <= int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, int > > > _bz_LessOrEqual<typename P_expr1::T_numtype, int > > >
operator<=(_bz_MatExpr<P_expr1> d1, operator<=(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_LessOrEqual<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> <= float // _bz_MatExpr<P_expr1> <= float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, float > > > _bz_LessOrEqual<typename P_expr1::T_numtype, float > > >
operator<=(_bz_MatExpr<P_expr1> d1, operator<=(_bz_MatExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_LessOrEqual<typename P_expr1::T_numtype, float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<float>(d2))); _bz_MatExprConstant<float>(d2)));
} }
// _bz_MatExpr<P_expr1> <= double // _bz_MatExpr<P_expr1> <= double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, double > > > _bz_LessOrEqual<typename P_expr1::T_numtype, double > > >
operator<=(_bz_MatExpr<P_expr1> d1, operator<=(_bz_MatExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_LessOrEqual<typename P_expr1::T_numtype, double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<double>(d2))); _bz_MatExprConstant<double>(d2)));
} }
// _bz_MatExpr<P_expr1> <= long double // _bz_MatExpr<P_expr1> <= long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, long double > > > _bz_LessOrEqual<typename P_expr1::T_numtype, long double > > >
operator<=(_bz_MatExpr<P_expr1> d1, operator<=(_bz_MatExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, long double> > T_exp r; _bz_LessOrEqual<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<long double>(d2))); _bz_MatExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> <= complex<T2> // _bz_MatExpr<P_expr1> <= complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_LessOrEqual<typename P_expr1::T_numtype, complex<T2> > > >
operator<=(_bz_MatExpr<P_expr1> d1, operator<=(_bz_MatExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > T_ex pr; _bz_LessOrEqual<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int <= Matrix<P_numtype2, P_struct2> // int <= Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
skipping to change at line 4062 skipping to change at line 4062
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int <= _bz_MatExpr<P_expr2> // int <= _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<int, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<int, typename P_expr2::T_numtype > > >
operator<=(int d1, operator<=(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LessOrEqual<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
// float <= Matrix<P_numtype2, P_struct2> // float <= Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 4096 skipping to change at line 4096
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// float <= _bz_MatExpr<P_expr2> // float <= _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<float, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<float, typename P_expr2::T_numtype > > >
operator<=(float d1, operator<=(float d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, typedef _bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LessOrEqual<float, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2)); d2));
} }
// double <= Matrix<P_numtype2, P_struct2> // double <= Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 4130 skipping to change at line 4130
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// double <= _bz_MatExpr<P_expr2> // double <= _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<double, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<double, typename P_expr2::T_numtype > > >
operator<=(double d1, operator<=(double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, typedef _bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LessOrEqual<double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2)); d2));
} }
// long double <= Matrix<P_numtype2, P_struct2> // long double <= Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 4164 skipping to change at line 4164
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// long double <= _bz_MatExpr<P_expr2> // long double <= _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<long double, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<long double, typename P_expr2::T_numtype > > >
operator<=(long double d1, operator<=(long double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, typedef _bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<long double, _bz_typename P_expr2::T_numtype> > T_exp r; _bz_LessOrEqual<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2)); d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> <= Matrix<P_numtype2, P_struct2> // complex<T1> <= Matrix<P_numtype2, P_struct2>
template<class T1, class P_numtype2, class P_struct2> template<class T1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
skipping to change at line 4202 skipping to change at line 4202
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> <= _bz_MatExpr<P_expr2> // complex<T1> <= _bz_MatExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<complex<T1> , typename P_expr2::T_numtype > > >
operator<=(complex<T1> d1, operator<=(complex<T1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LessOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype> > T_ex pr; _bz_LessOrEqual<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Equality operators * Equality operators
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 4241 skipping to change at line 4241
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> == _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> == _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Equal<P_numtype1, typename P_expr2::T_numtype > > >
operator==(const Matrix<P_numtype1, P_struct1>& d1, operator==(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> == int // Matrix<P_numtype1, P_struct1> == int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 4345 skipping to change at line 4345
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> == Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> == Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Equal<typename P_expr1::T_numtype, P_numtype2 > > >
operator==(_bz_MatExpr<P_expr1> d1, operator==(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Equal<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> == _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> == _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_nu mtype > > > _bz_Equal<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator==(_bz_MatExpr<P_expr1> d1, operator==(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_nu mtype> > T_expr; _bz_Equal<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> == int // _bz_MatExpr<P_expr1> == int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Equal<_bz_typename P_expr1::T_numtype, int > > > _bz_Equal<typename P_expr1::T_numtype, int > > >
operator==(_bz_MatExpr<P_expr1> d1, operator==(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_Equal<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Equal<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> == float // _bz_MatExpr<P_expr1> == float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Equal<_bz_typename P_expr1::T_numtype, float > > > _bz_Equal<typename P_expr1::T_numtype, float > > >
operator==(_bz_MatExpr<P_expr1> d1, operator==(_bz_MatExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_Equal<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Equal<typename P_expr1::T_numtype, float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<float>(d2))); _bz_MatExprConstant<float>(d2)));
} }
// _bz_MatExpr<P_expr1> == double // _bz_MatExpr<P_expr1> == double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Equal<_bz_typename P_expr1::T_numtype, double > > > _bz_Equal<typename P_expr1::T_numtype, double > > >
operator==(_bz_MatExpr<P_expr1> d1, operator==(_bz_MatExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_Equal<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Equal<typename P_expr1::T_numtype, double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<double>(d2))); _bz_MatExprConstant<double>(d2)));
} }
// _bz_MatExpr<P_expr1> == long double // _bz_MatExpr<P_expr1> == long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Equal<_bz_typename P_expr1::T_numtype, long double > > > _bz_Equal<typename P_expr1::T_numtype, long double > > >
operator==(_bz_MatExpr<P_expr1> d1, operator==(_bz_MatExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_Equal<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Equal<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<long double>(d2))); _bz_MatExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> == complex<T2> // _bz_MatExpr<P_expr1> == complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Equal<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Equal<typename P_expr1::T_numtype, complex<T2> > > >
operator==(_bz_MatExpr<P_expr1> d1, operator==(_bz_MatExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_Equal<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Equal<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int == Matrix<P_numtype2, P_struct2> // int == Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
skipping to change at line 4483 skipping to change at line 4483
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int == _bz_MatExpr<P_expr2> // int == _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<int, _bz_typename P_expr2::T_numtype > > > _bz_Equal<int, typename P_expr2::T_numtype > > >
operator==(int d1, operator==(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
// float == Matrix<P_numtype2, P_struct2> // float == Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 4517 skipping to change at line 4517
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// float == _bz_MatExpr<P_expr2> // float == _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<float, _bz_typename P_expr2::T_numtype > > > _bz_Equal<float, typename P_expr2::T_numtype > > >
operator==(float d1, operator==(float d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, typedef _bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<float, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2)); d2));
} }
// double == Matrix<P_numtype2, P_struct2> // double == Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 4551 skipping to change at line 4551
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// double == _bz_MatExpr<P_expr2> // double == _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<double, _bz_typename P_expr2::T_numtype > > > _bz_Equal<double, typename P_expr2::T_numtype > > >
operator==(double d1, operator==(double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, typedef _bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2)); d2));
} }
// long double == Matrix<P_numtype2, P_struct2> // long double == Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 4585 skipping to change at line 4585
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// long double == _bz_MatExpr<P_expr2> // long double == _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<long double, _bz_typename P_expr2::T_numtype > > > _bz_Equal<long double, typename P_expr2::T_numtype > > >
operator==(long double d1, operator==(long double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, typedef _bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2)); d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> == Matrix<P_numtype2, P_struct2> // complex<T1> == Matrix<P_numtype2, P_struct2>
template<class T1, class P_numtype2, class P_struct2> template<class T1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
skipping to change at line 4623 skipping to change at line 4623
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> == _bz_MatExpr<P_expr2> // complex<T1> == _bz_MatExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Equal<complex<T1> , typename P_expr2::T_numtype > > >
operator==(complex<T1> d1, operator==(complex<T1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_Equal<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Not-equal operators * Not-equal operators
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 4662 skipping to change at line 4662
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> != _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> != _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator!=(const Matrix<P_numtype1, P_struct1>& d1, operator!=(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> != int // Matrix<P_numtype1, P_struct1> != int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 4766 skipping to change at line 4766
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> != Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> != Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_NotEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator!=(_bz_MatExpr<P_expr1> d1, operator!=(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> != _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> != _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype > > > _bz_NotEqual<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator!=(_bz_MatExpr<P_expr1> d1, operator!=(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> != int // _bz_MatExpr<P_expr1> != int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, int > > > _bz_NotEqual<typename P_expr1::T_numtype, int > > >
operator!=(_bz_MatExpr<P_expr1> d1, operator!=(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> != float // _bz_MatExpr<P_expr1> != float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, float > > > _bz_NotEqual<typename P_expr1::T_numtype, float > > >
operator!=(_bz_MatExpr<P_expr1> d1, operator!=(_bz_MatExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<float>, _bz_MatExprConstant<float>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<float>(d2))); _bz_MatExprConstant<float>(d2)));
} }
// _bz_MatExpr<P_expr1> != double // _bz_MatExpr<P_expr1> != double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, double > > > _bz_NotEqual<typename P_expr1::T_numtype, double > > >
operator!=(_bz_MatExpr<P_expr1> d1, operator!=(_bz_MatExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<double>, _bz_MatExprConstant<double>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<double>(d2))); _bz_MatExprConstant<double>(d2)));
} }
// _bz_MatExpr<P_expr1> != long double // _bz_MatExpr<P_expr1> != long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, long double > > > _bz_NotEqual<typename P_expr1::T_numtype, long double > > >
operator!=(_bz_MatExpr<P_expr1> d1, operator!=(_bz_MatExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<long double>, _bz_MatExprConstant<long double>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<long double>(d2))); _bz_MatExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_MatExpr<P_expr1> != complex<T2> // _bz_MatExpr<P_expr1> != complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_NotEqual<typename P_expr1::T_numtype, complex<T2> > > >
operator!=(_bz_MatExpr<P_expr1> d1, operator!=(_bz_MatExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<complex<T2> > , _bz_MatExprConstant<complex<T2> > ,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<complex<T2> > (d2))); _bz_MatExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int != Matrix<P_numtype2, P_struct2> // int != Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
skipping to change at line 4904 skipping to change at line 4904
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int != _bz_MatExpr<P_expr2> // int != _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<int, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<int, typename P_expr2::T_numtype > > >
operator!=(int d1, operator!=(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
// float != Matrix<P_numtype2, P_struct2> // float != Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 4938 skipping to change at line 4938
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// float != _bz_MatExpr<P_expr2> // float != _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<float, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<float, typename P_expr2::T_numtype > > >
operator!=(float d1, operator!=(float d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, typedef _bz_MatExprOp<_bz_MatExprConstant<float>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<float, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1),
d2)); d2));
} }
// double != Matrix<P_numtype2, P_struct2> // double != Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 4972 skipping to change at line 4972
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// double != _bz_MatExpr<P_expr2> // double != _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<double, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<double, typename P_expr2::T_numtype > > >
operator!=(double d1, operator!=(double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, typedef _bz_MatExprOp<_bz_MatExprConstant<double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1),
d2)); d2));
} }
// long double != Matrix<P_numtype2, P_struct2> // long double != Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 5006 skipping to change at line 5006
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// long double != _bz_MatExpr<P_expr2> // long double != _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<long double, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<long double, typename P_expr2::T_numtype > > >
operator!=(long double d1, operator!=(long double d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, typedef _bz_MatExprOp<_bz_MatExprConstant<long double>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2)); d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> != Matrix<P_numtype2, P_struct2> // complex<T1> != Matrix<P_numtype2, P_struct2>
template<class T1, class P_numtype2, class P_struct2> template<class T1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
skipping to change at line 5044 skipping to change at line 5044
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> != _bz_MatExpr<P_expr2> // complex<T1> != _bz_MatExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<complex<T1> , typename P_expr2::T_numtype > > >
operator!=(complex<T1> d1, operator!=(complex<T1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > ,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_NotEqual<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Logical AND operators * Logical AND operators
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 5083 skipping to change at line 5083
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> && _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> && _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalAnd<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LogicalAnd<P_numtype1, typename P_expr2::T_numtype > > >
operator&&(const Matrix<P_numtype1, P_struct1>& d1, operator&&(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalAnd<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalAnd<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> && int // Matrix<P_numtype1, P_struct1> && int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 5117 skipping to change at line 5117
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> && Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> && Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LogicalAnd<typename P_expr1::T_numtype, P_numtype2 > > >
operator&&(_bz_MatExpr<P_expr1> d1, operator&&(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_LogicalAnd<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> && _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> && _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype > > > _bz_LogicalAnd<typename P_expr1::T_numtype, typename P_expr2::T_numty pe > > >
operator&&(_bz_MatExpr<P_expr1> d1, operator&&(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype> > T_expr; _bz_LogicalAnd<typename P_expr1::T_numtype, typename P_expr2::T_numty pe> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> && int // _bz_MatExpr<P_expr1> && int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, int > > > _bz_LogicalAnd<typename P_expr1::T_numtype, int > > >
operator&&(_bz_MatExpr<P_expr1> d1, operator&&(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_LogicalAnd<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// int && Matrix<P_numtype2, P_struct2> // int && Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 5185 skipping to change at line 5185
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int && _bz_MatExpr<P_expr2> // int && _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalAnd<int, _bz_typename P_expr2::T_numtype > > > _bz_LogicalAnd<int, typename P_expr2::T_numtype > > >
operator&&(int d1, operator&&(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalAnd<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalAnd<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
/************************************************************************** ** /************************************************************************** **
* Logical OR operators * Logical OR operators
************************************************************************** **/ ************************************************************************** **/
// Matrix<P_numtype1, P_struct1> || Matrix<P_numtype2, P_struct2> // Matrix<P_numtype1, P_struct1> || Matrix<P_numtype2, P_struct2>
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2> template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc t2>
skipping to change at line 5222 skipping to change at line 5222
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef())); d2._bz_getRef()));
} }
// Matrix<P_numtype1, P_struct1> || _bz_MatExpr<P_expr2> // Matrix<P_numtype1, P_struct1> || _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2> template<class P_numtype1, class P_struct1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalOr<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LogicalOr<P_numtype1, typename P_expr2::T_numtype > > >
operator||(const Matrix<P_numtype1, P_struct1>& d1, operator||(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalOr<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalOr<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2)); d2));
} }
// Matrix<P_numtype1, P_struct1> || int // Matrix<P_numtype1, P_struct1> || int
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
skipping to change at line 5256 skipping to change at line 5256
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// _bz_MatExpr<P_expr1> || Matrix<P_numtype2, P_struct2> // _bz_MatExpr<P_expr1> || Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2> template<class P_expr1, class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LogicalOr<typename P_expr1::T_numtype, P_numtype2 > > >
operator||(_bz_MatExpr<P_expr1> d1, operator||(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2) const Matrix<P_numtype2, P_struct2>& d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_LogicalOr<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef())); d2._bz_getRef()));
} }
// _bz_MatExpr<P_expr1> || _bz_MatExpr<P_expr2> // _bz_MatExpr<P_expr1> || _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype > > > _bz_LogicalOr<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e > > >
operator||(_bz_MatExpr<P_expr1> d1, operator||(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype> > T_expr; _bz_LogicalOr<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_MatExpr<P_expr1> || int // _bz_MatExpr<P_expr1> || int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, int > > > _bz_LogicalOr<typename P_expr1::T_numtype, int > > >
operator||(_bz_MatExpr<P_expr1> d1, operator||(_bz_MatExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>, _bz_MatExprConstant<int>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_LogicalOr<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2))); _bz_MatExprConstant<int>(d2)));
} }
// int || Matrix<P_numtype2, P_struct2> // int || Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2> template<class P_numtype2, class P_struct2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>, _bz_MatrixRef<P_numtype2, P_struct2>,
skipping to change at line 5324 skipping to change at line 5324
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef())); d2._bz_getRef()));
} }
// int || _bz_MatExpr<P_expr2> // int || _bz_MatExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalOr<int, _bz_typename P_expr2::T_numtype > > > _bz_LogicalOr<int, typename P_expr2::T_numtype > > >
operator||(int d1, operator||(int d1,
_bz_MatExpr<P_expr2> d2) _bz_MatExpr<P_expr2> d2)
{ {
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>, _bz_MatExpr<P_expr2>,
_bz_LogicalOr<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalOr<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2));
}
/**************************************************************************
**
* Minimum Operators
**************************************************************************
**/
// Matrix<P_numtype1, P_struct1> min Matrix<P_numtype2, P_struct2>
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Min<P_numtype1, P_numtype2 > > >
min(const Matrix<P_numtype1, P_struct1>& d1,
const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Min<P_numtype1, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef()));
}
// Matrix<P_numtype1, P_struct1> min _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>,
_bz_Min<P_numtype1, typename P_expr2::T_numtype > > >
min(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>,
_bz_Min<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2));
}
// Matrix<P_numtype1, P_struct1> min int
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>,
_bz_Min<P_numtype1, int > > >
min(const Matrix<P_numtype1, P_struct1>& d1,
int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>,
_bz_Min<P_numtype1, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<int>(d2)));
}
// _bz_MatExpr<P_expr1> min Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Min<typename P_expr1::T_numtype, P_numtype2 > > >
min(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Min<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef()));
}
// _bz_MatExpr<P_expr1> min _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>,
_bz_Min<typename P_expr1::T_numtype, typename P_expr2::T_numtype > >
>
min(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>,
_bz_Min<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T
_expr;
return _bz_MatExpr<T_expr>(T_expr(d1,
d2));
}
// _bz_MatExpr<P_expr1> min int
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>,
_bz_Min<typename P_expr1::T_numtype, int > > >
min(_bz_MatExpr<P_expr1> d1,
int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>,
_bz_Min<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2)));
}
// int min Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Min<int, P_numtype2 > > >
min(int d1,
const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Min<int, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef()));
}
// int min _bz_MatExpr<P_expr2>
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>,
_bz_Min<int, typename P_expr2::T_numtype > > >
min(int d1,
_bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>,
_bz_Min<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2));
}
/**************************************************************************
**
* Maximum Operators
**************************************************************************
**/
// Matrix<P_numtype1, P_struct1> max Matrix<P_numtype2, P_struct2>
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Max<P_numtype1, P_numtype2 > > >
max(const Matrix<P_numtype1, P_struct1>& d1,
const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Max<P_numtype1, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2._bz_getRef()));
}
// Matrix<P_numtype1, P_struct1> max _bz_MatExpr<P_expr2>
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>,
_bz_Max<P_numtype1, typename P_expr2::T_numtype > > >
max(const Matrix<P_numtype1, P_struct1>& d1,
_bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExpr<P_expr2>,
_bz_Max<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
d2));
}
// Matrix<P_numtype1, P_struct1> max int
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>,
_bz_Max<P_numtype1, int > > >
max(const Matrix<P_numtype1, P_struct1>& d1,
int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_MatExprConstant<int>,
_bz_Max<P_numtype1, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(),
_bz_MatExprConstant<int>(d2)));
}
// _bz_MatExpr<P_expr1> max Matrix<P_numtype2, P_struct2>
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Max<typename P_expr1::T_numtype, P_numtype2 > > >
max(_bz_MatExpr<P_expr1> d1,
const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Max<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1,
d2._bz_getRef()));
}
// _bz_MatExpr<P_expr1> max _bz_MatExpr<P_expr2>
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>,
_bz_Max<typename P_expr1::T_numtype, typename P_expr2::T_numtype > >
>
max(_bz_MatExpr<P_expr1> d1,
_bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExpr<P_expr2>,
_bz_Max<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T
_expr;
return _bz_MatExpr<T_expr>(T_expr(d1,
d2));
}
// _bz_MatExpr<P_expr1> max int
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>,
_bz_Max<typename P_expr1::T_numtype, int > > >
max(_bz_MatExpr<P_expr1> d1,
int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>,
_bz_MatExprConstant<int>,
_bz_Max<typename P_expr1::T_numtype, int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1,
_bz_MatExprConstant<int>(d2)));
}
// int max Matrix<P_numtype2, P_struct2>
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Max<int, P_numtype2 > > >
max(int d1,
const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatrixRef<P_numtype2, P_struct2>,
_bz_Max<int, P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2._bz_getRef()));
}
// int max _bz_MatExpr<P_expr2>
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>,
_bz_Max<int, typename P_expr2::T_numtype > > >
max(int d1,
_bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>,
_bz_MatExpr<P_expr2>,
_bz_Max<int, typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1),
d2)); d2));
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_MATBOPS_H #endif // BZ_MATBOPS_H
 End of changes. 341 change blocks. 
341 lines changed or deleted 629 lines changed or added


 matdiag.h   matdiag.h 
/************************************************************************** * /************************************************************************** *
* blitz/matdiag.h Declarations for Diagonal matrices * blitz/matdiag.h Declarations for Diagonal matrices
* *
* $Id: matdiag.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: matdiag.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matdiag.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_MATDIAG_H #ifndef BZ_MATDIAG_H
#define BZ_MATDIAG_H #define BZ_MATDIAG_H
#ifndef BZ_MSTRUCT_H #ifndef BZ_MSTRUCT_H
#error <blitz/matdiag.h> must be included via <blitz/mstruct.h> #error <blitz/matdiag.h> must be included via <blitz/mstruct.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Diagonal matrix // Diagonal matrix
// [ 0 . . . ] // [ 0 . . . ]
// [ . 1 . . ] // [ . 1 . . ]
// [ . . 2 . ] // [ . . 2 . ]
// [ . . . 3 ] // [ . . . 3 ]
class DiagonalIterator { class DiagonalIterator {
public: public:
DiagonalIterator(unsigned rows, unsigned cols) DiagonalIterator(const unsigned rows,const unsigned cols) {
{ BZPRECONDITION(rows==cols);
BZPRECONDITION(rows == cols);
size_ = rows; size_ = rows;
i_ = 0; i_ = 0;
} }
operator _bz_bool() const operator bool() const { return i_ < size_; }
{
return i_ < size_;
}
void operator++()
{
++i_;
}
unsigned row() const
{ return i_; }
unsigned col() const void operator++() { ++i_; }
{ return i_; }
unsigned offset() const unsigned row() const { return i_; }
{ return i_; } unsigned col() const { return i_; }
unsigned offset() const { return i_; }
protected: protected:
unsigned i_, size_; unsigned i_, size_;
}; };
class Diagonal : public MatrixStructure { class Diagonal : public MatrixStructure {
public: public:
typedef DiagonalIterator T_iterator; typedef DiagonalIterator T_iterator;
Diagonal() Diagonal(): size_(0) { }
: size_(0)
{ }
Diagonal(unsigned size) Diagonal(const unsigned size): size_(size) { }
: size_(size)
{ }
Diagonal(unsigned rows, unsigned cols) Diagonal(const unsigned rows,const unsigned cols): size_(rows) {
: size_(rows)
{
BZPRECONDITION(rows == cols); BZPRECONDITION(rows == cols);
} }
unsigned columns() const unsigned columns() const { return size_; }
{ return size_; }
unsigned coordToOffset(unsigned i, unsigned j) const unsigned coordToOffset(const unsigned i,const unsigned j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
BZPRECONDITION(i == j); BZPRECONDITION(i == j);
return i; return i;
} }
unsigned firstInRow(unsigned i) const unsigned firstInRow(const unsigned i) const { return i; }
{ return i; }
template<class T_numtype> template<typename T_numtype>
T_numtype get(const T_numtype * _bz_restrict data, T_numtype get(const T_numtype * restrict data,const unsigned i,const un
unsigned i, unsigned j) const signed j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
if (i == j) return (i==j) ? data[coordToOffset(i,j)] : ZeroElement<T_numtype>::
return data[coordToOffset(i,j)]; zero();
else
return ZeroElement<T_numtype>::zero();
} }
template<class T_numtype> template<typename T_numtype>
T_numtype& get(T_numtype * _bz_restrict data, unsigned i, unsigned j) T_numtype& get(T_numtype * restrict data,const unsigned i,const unsigne
{ d j) {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
if (i == j) return (i==j) ? data[coordToOffset(i,j)] : ZeroElement<T_numtype>::
return data[coordToOffset(i,j)]; zero();
else
return ZeroElement<T_numtype>::zero();
} }
unsigned lastInRow(unsigned i) const unsigned lastInRow(const unsigned i) const { return i; }
{ return i; } unsigned firstInCol(const unsigned j) const { return j; }
unsigned lastInCol(const unsigned j) const { return j; }
unsigned firstInCol(unsigned j) const
{ return j; }
unsigned lastInCol(unsigned j) const
{ return j; }
_bz_bool inRange(unsigned i, unsigned j) const bool inRange(const unsigned i,const unsigned j) const {
{
return (i < size_) && (j < size_); return (i < size_) && (j < size_);
} }
unsigned numElements() const unsigned numElements() const { return size_; }
{ return size_; } unsigned rows() const { return size_; }
unsigned rows() const
{ return size_; }
void resize(unsigned size) void resize(const unsigned size) { size_ = size; }
{
size_ = size;
}
void resize(unsigned rows, unsigned cols) void resize(const unsigned rows,const unsigned cols) {
{
BZPRECONDITION(rows == cols); BZPRECONDITION(rows == cols);
size_ = rows; size_ = rows;
} }
private: private:
unsigned size_; unsigned size_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 22 change blocks. 
90 lines changed or deleted 34 lines changed or added


 matexpr.h   matexpr.h 
/************************************************************************** * /************************************************************************** *
* blitz/matexpr.h Matrix<P_numtype, P_structure> expression templates * blitz/matexpr.h Matrix<P_numtype, P_structure> expression templates
* *
* $Id: matexpr.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: matexpr.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matexpr.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_MATEXPR_H #ifndef BZ_MATEXPR_H
#define BZ_MATEXPR_H #define BZ_MATEXPR_H
#ifndef BZ_MATRIX_H #ifndef BZ_MATRIX_H
#error <blitz/matexpr.h> must be included via <blitz/matrix.h> #error <blitz/matexpr.h> must be included via <blitz/matrix.h>
#endif #endif
#include <blitz/applics.h> #include <blitz/applics.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// BlitzMatrixExpressionsBase is a dummy class provided for users of // BlitzMatrixExpressionsBase is a dummy class provided for users of
// graphical class browsers. // graphical class browsers.
class BlitzMatrixExpressionsBase { }; class BlitzMatrixExpressionsBase { };
template<class P_expr> template<typename P_expr>
class _bz_MatExpr : public BlitzMatrixExpressionsBase { class _bz_MatExpr : public BlitzMatrixExpressionsBase {
public: public:
typedef P_expr T_expr; typedef P_expr T_expr;
typedef _bz_typename T_expr::T_numtype T_numtype; typedef _bz_typename T_expr::T_numtype T_numtype;
#ifdef BZ_PASS_EXPR_BY_VALUE #ifdef BZ_PASS_EXPR_BY_VALUE
_bz_MatExpr(T_expr a) _bz_MatExpr(T_expr a)
: iter_(a) : iter_(a)
{ } { }
skipping to change at line 89 skipping to change at line 71
unsigned rows(unsigned recommendedRows) const unsigned rows(unsigned recommendedRows) const
{ return iter_.rows(recommendedRows); } { return iter_.rows(recommendedRows); }
unsigned cols(unsigned recommendedCols) const unsigned cols(unsigned recommendedCols) const
{ return iter_.cols(recommendedCols); } { return iter_.cols(recommendedCols); }
private: private:
T_expr iter_; T_expr iter_;
}; };
template<class P_expr1, class P_expr2, class P_op> template<typename P_expr1, typename P_expr2, typename P_op>
class _bz_MatExprOp : public BlitzMatrixExpressionsBase { class _bz_MatExprOp : public BlitzMatrixExpressionsBase {
public: public:
typedef P_expr1 T_expr1; typedef P_expr1 T_expr1;
typedef P_expr2 T_expr2; typedef P_expr2 T_expr2;
typedef _bz_typename T_expr1::T_numtype T_numtype1; typedef _bz_typename T_expr1::T_numtype T_numtype1;
typedef _bz_typename T_expr2::T_numtype T_numtype2; typedef _bz_typename T_expr2::T_numtype T_numtype2;
typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype; typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype;
typedef P_op T_op; typedef P_op T_op;
skipping to change at line 132 skipping to change at line 114
BZPRECONDITION(iter2_.cols(recommendedCols) == BZPRECONDITION(iter2_.cols(recommendedCols) ==
iter1_.cols(recommendedCols)); iter1_.cols(recommendedCols));
return iter1_.cols(recommendedCols); return iter1_.cols(recommendedCols);
} }
private: private:
T_expr1 iter1_; T_expr1 iter1_;
T_expr2 iter2_; T_expr2 iter2_;
}; };
template<class P_expr, class P_unaryOp> template<typename P_expr, typename P_unaryOp>
class _bz_MatExprUnaryOp : public BlitzMatrixExpressionsBase { class _bz_MatExprUnaryOp : public BlitzMatrixExpressionsBase {
public: public:
typedef P_expr T_expr; typedef P_expr T_expr;
typedef P_unaryOp T_unaryOp; typedef P_unaryOp T_unaryOp;
typedef _bz_typename T_unaryOp::T_numtype T_numtype; typedef _bz_typename T_unaryOp::T_numtype T_numtype;
#ifdef BZ_PASS_EXPR_BY_VALUE #ifdef BZ_PASS_EXPR_BY_VALUE
_bz_MatExprUnaryOp(T_expr iter) _bz_MatExprUnaryOp(T_expr iter)
: iter_(iter) : iter_(iter)
skipping to change at line 163 skipping to change at line 145
unsigned rows(unsigned recommendedRows) const unsigned rows(unsigned recommendedRows) const
{ return iter_.rows(recommendedRows); } { return iter_.rows(recommendedRows); }
unsigned cols(unsigned recommendedCols) const unsigned cols(unsigned recommendedCols) const
{ return iter_.cols(recommendedCols); } { return iter_.cols(recommendedCols); }
private: private:
T_expr iter_; T_expr iter_;
}; };
template<class P_numtype> template<typename P_numtype>
class _bz_MatExprConstant : public BlitzMatrixExpressionsBase { class _bz_MatExprConstant : public BlitzMatrixExpressionsBase {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
_bz_MatExprConstant(P_numtype value) _bz_MatExprConstant(P_numtype value)
: value_(value) : value_(value)
{ } { }
T_numtype operator()(unsigned i, unsigned j) const T_numtype operator()(unsigned i, unsigned j) const
{ return value_; } { return value_; }
 End of changes. 6 change blocks. 
25 lines changed or deleted 7 lines changed or added


 matgen.h   matgen.h 
/************************************************************************** * /************************************************************************** *
* blitz/matgen.h Declarations for RowMajor and ColumnMajor matrices * blitz/matgen.h Declarations for RowMajor and ColumnMajor matrices
* *
* $Id: matgen.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: matgen.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matgen.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_MATGEN_H #ifndef BZ_MATGEN_H
#define BZ_MATGEN_H #define BZ_MATGEN_H
#ifndef BZ_MSTRUCT_H #ifndef BZ_MSTRUCT_H
#error <blitz/matgen.h> must be included via <blitz/mstruct.h> #error <blitz/matgen.h> must be included via <blitz/mstruct.h>
#endif // BZ_MSTRUCT_H #endif // BZ_MSTRUCT_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
skipping to change at line 92 skipping to change at line 74
GeneralIterator(unsigned rows, unsigned cols) GeneralIterator(unsigned rows, unsigned cols)
{ {
rows_ = rows; rows_ = rows;
cols_ = cols; cols_ = cols;
i_ = 0; i_ = 0;
j_ = 0; j_ = 0;
offset_ = 0; offset_ = 0;
good_ = true; good_ = true;
} }
unsigned offset() const unsigned offset() const { return offset_; }
{ return offset_; } operator bool() const { return good_; }
unsigned row() const { return i_; }
operator _bz_bool() const unsigned col() const { return j_; }
{ return good_; }
unsigned row() const
{ return i_; }
unsigned col() const
{ return j_; }
protected: protected:
unsigned rows_, cols_; unsigned rows_, cols_;
unsigned offset_; unsigned offset_;
unsigned i_, j_; unsigned i_, j_;
_bz_bool good_; bool good_;
}; };
class RowMajorIterator : public GeneralIterator { class RowMajorIterator : public GeneralIterator {
public: public:
RowMajorIterator(unsigned rows, unsigned cols) RowMajorIterator(unsigned rows, unsigned cols)
: GeneralIterator(rows, cols) : GeneralIterator(rows, cols)
{ } { }
void operator++() void operator++()
{ {
skipping to change at line 148 skipping to change at line 123
RowMajor(unsigned rows, unsigned cols) RowMajor(unsigned rows, unsigned cols)
: GeneralMatrix(rows, cols) : GeneralMatrix(rows, cols)
{ } { }
unsigned coordToOffset(unsigned i, unsigned j) const unsigned coordToOffset(unsigned i, unsigned j) const
{ {
return i*cols_+j; return i*cols_+j;
} }
template<class T_numtype> template<typename T_numtype>
T_numtype get(const T_numtype * _bz_restrict data, T_numtype get(const T_numtype * restrict data,
unsigned i, unsigned j) const unsigned i, unsigned j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
} }
template<class T_numtype> template<typename T_numtype>
T_numtype& get(T_numtype * _bz_restrict data, unsigned i, unsigned j) T_numtype& get(T_numtype * restrict data, unsigned i, unsigned j)
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
} }
}; };
class ColumnMajorIterator : public GeneralIterator { class ColumnMajorIterator : public GeneralIterator {
public: public:
ColumnMajorIterator(unsigned rows, unsigned cols) ColumnMajorIterator(unsigned rows, unsigned cols)
: GeneralIterator(rows, cols) : GeneralIterator(rows, cols)
skipping to change at line 200 skipping to change at line 175
ColumnMajor(unsigned rows, unsigned cols) ColumnMajor(unsigned rows, unsigned cols)
: GeneralMatrix(rows, cols) : GeneralMatrix(rows, cols)
{ } { }
unsigned coordToOffset(unsigned i, unsigned j) const unsigned coordToOffset(unsigned i, unsigned j) const
{ {
return j*rows_ + i; return j*rows_ + i;
} }
template<class T_numtype> template<typename T_numtype>
T_numtype get(const T_numtype * _bz_restrict data, T_numtype get(const T_numtype * restrict data,
unsigned i, unsigned j) const unsigned i, unsigned j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
} }
template<class T_numtype> template<typename T_numtype>
T_numtype& get(T_numtype * _bz_restrict data, unsigned i, unsigned j) T_numtype& get(T_numtype * restrict data, unsigned i, unsigned j)
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
} }
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_MATGEN_H #endif // BZ_MATGEN_H
 End of changes. 8 change blocks. 
41 lines changed or deleted 16 lines changed or added


 mathf2.h   mathf2.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/mathf2.h Declaration of additional math functions * blitz/mathf2.h Declaration of additional math functions
* *
* $Id: mathf2.h,v 1.2 2001/01/25 00:25:54 tveldhui Exp $ * $Id: mathf2.h,v 1.5 2004/03/09 21:56:48 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: mathf2.h,v $
* Revision 1.2 2001/01/25 00:25:54 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_MATHF2_H #ifndef BZ_MATHF2_H
#define BZ_MATHF2_H #define BZ_MATHF2_H
#ifndef BZ_APPLICS_H #ifndef BZ_APPLICS_H
#error <blitz/mathf2.h> should be included via <blitz/applics.h> #error <blitz/mathf2.h> should be included via <blitz/applics.h>
#endif #endif
#ifndef BZ_PRETTYPRINT_H #include <blitz/prettyprint.h>
#include <blitz/prettyprint.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// cexp(z) Complex exponential // cexp(z) Complex exponential
template<class P_numtype1> template<typename P_numtype1>
class _bz_cexp : public OneOperandApplicativeTemplatesBase { class _bz_cexp : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return _bz_exp<T_numtype1>::apply(x); } { return _bz_exp<T_numtype1>::apply(x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cexp("; str += "cexp(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// csqrt(z) Complex square root // csqrt(z) Complex square root
template<class P_numtype1> template<typename P_numtype1>
class _bz_csqrt : public OneOperandApplicativeTemplatesBase { class _bz_csqrt : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return _bz_sqrt<T_numtype1>::apply(x); } { return _bz_sqrt<T_numtype1>::apply(x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "csqrt("; str += "csqrt(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// pow2 Square // pow2 Square
template<class P_numtype1> template<typename P_numtype1>
class _bz_pow2 : public OneOperandApplicativeTemplatesBase { class _bz_pow2 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ {
return BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x); return BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x);
} }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "pow2("; str += "pow2(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// pow3 Cube // pow3 Cube
template<class P_numtype1> template<typename P_numtype1>
class _bz_pow3 : public OneOperandApplicativeTemplatesBase { class _bz_pow3 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ {
return BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x) * return BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x) *
BZ_NO_PROPAGATE(x); BZ_NO_PROPAGATE(x);
} }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "pow3("; str += "pow3(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// pow4 Fourth power // pow4 Fourth power
template<class P_numtype1> template<typename P_numtype1>
class _bz_pow4 : public OneOperandApplicativeTemplatesBase { class _bz_pow4 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ {
T_numtype t1 = BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x); T_numtype t1 = BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x);
return BZ_NO_PROPAGATE(t1) * BZ_NO_PROPAGATE(t1); return BZ_NO_PROPAGATE(t1) * BZ_NO_PROPAGATE(t1);
} }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "pow4("; str += "pow4(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// pow5 Fifth power // pow5 Fifth power
template<class P_numtype1> template<typename P_numtype1>
class _bz_pow5 : public OneOperandApplicativeTemplatesBase { class _bz_pow5 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ {
T_numtype t1 = BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x); T_numtype t1 = BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x);
return BZ_NO_PROPAGATE(t1) * BZ_NO_PROPAGATE(t1) return BZ_NO_PROPAGATE(t1) * BZ_NO_PROPAGATE(t1)
* BZ_NO_PROPAGATE(t1); * BZ_NO_PROPAGATE(t1);
} }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "pow5("; str += "pow5(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// pow6 Sixth power // pow6 Sixth power
template<class P_numtype1> template<typename P_numtype1>
class _bz_pow6 : public OneOperandApplicativeTemplatesBase { class _bz_pow6 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ {
T_numtype t1 = BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x) T_numtype t1 = BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x)
* BZ_NO_PROPAGATE(x); * BZ_NO_PROPAGATE(x);
return BZ_NO_PROPAGATE(t1) * BZ_NO_PROPAGATE(t1); return BZ_NO_PROPAGATE(t1) * BZ_NO_PROPAGATE(t1);
} }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "pow6("; str += "pow6(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// pow7 Seventh power // pow7 Seventh power
template<class P_numtype1> template<typename P_numtype1>
class _bz_pow7 : public OneOperandApplicativeTemplatesBase { class _bz_pow7 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ {
T_numtype t1 = BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x) T_numtype t1 = BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x)
* BZ_NO_PROPAGATE(x); * BZ_NO_PROPAGATE(x);
return BZ_NO_PROPAGATE(t1) * BZ_NO_PROPAGATE(t1) return BZ_NO_PROPAGATE(t1) * BZ_NO_PROPAGATE(t1)
* BZ_NO_PROPAGATE(x); * BZ_NO_PROPAGATE(x);
} }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "pow7("; str += "pow7(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// pow8 Eighth power // pow8 Eighth power
template<class P_numtype1> template<typename P_numtype1>
class _bz_pow8 : public OneOperandApplicativeTemplatesBase { class _bz_pow8 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ {
T_numtype t1 = BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x); T_numtype t1 = BZ_NO_PROPAGATE(x) * BZ_NO_PROPAGATE(x);
T_numtype t2 = BZ_NO_PROPAGATE(t1) * BZ_NO_PROPAGATE(t1); T_numtype t2 = BZ_NO_PROPAGATE(t1) * BZ_NO_PROPAGATE(t1);
return BZ_NO_PROPAGATE(t2) * BZ_NO_PROPAGATE(t2); return BZ_NO_PROPAGATE(t2) * BZ_NO_PROPAGATE(t2);
} }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "pow8("; str += "pow8(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
/* /*
* These scalar versions of pow2, pow3, ..., pow8 are provided for * These scalar versions of pow2, pow3, ..., pow8 are provided for
 End of changes. 22 change blocks. 
38 lines changed or deleted 41 lines changed or added


 mathfunc.h   mathfunc.h 
// Generated: genmathfunc.cpp Feb 3 1999 09:08:50 // Generated: genmathfunc.cpp Jan 28 2005 12:04:32
#include <cstdlib>
#ifndef BZ_MATHFUNC_H #ifndef BZ_MATHFUNC_H
#define BZ_MATHFUNC_H #define BZ_MATHFUNC_H
#include <cstdlib>
#ifndef BZ_APPLICS_H #ifndef BZ_APPLICS_H
#include <blitz/applics.h> #error <blitz/mathfunc.h> should be included via <blitz/applics.h>
#endif #endif
#ifndef BZ_PRETTYPRINT_H #ifndef BZ_PRETTYPRINT_H
#include <blitz/prettyprint.h> #include <blitz/prettyprint.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// abs(P_numtype1) Absolute value // abs(P_numtype1) Absolute value
template<class P_numtype1> template<typename P_numtype1>
class _bz_abs : public OneOperandApplicativeTemplatesBase { class _bz_abs : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(abs)(x); } { return BZ_MATHFN_SCOPE(abs)(x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "abs("; str += "abs(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// abs(long) // abs(long)
template<> template<>
class _bz_abs<long> : public OneOperandApplicativeTemplatesBase { class _bz_abs<long> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long T_numtype1; typedef long T_numtype1;
typedef long T_numtype; typedef long T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(labs)((long)x); } { return BZ_MATHFN_SCOPE(labs)((long)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "labs("; str += "labs(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// abs(float) // abs(float)
template<> template<>
class _bz_abs<float> : public OneOperandApplicativeTemplatesBase { class _bz_abs<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(fabs)((float)x); } { return BZ_MATHFN_SCOPE(fabs)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "fabs("; str += "fabs(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// abs(double) // abs(double)
template<> template<>
class _bz_abs<double> : public OneOperandApplicativeTemplatesBase { class _bz_abs<double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef double T_numtype1; typedef double T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(fabs)((double)x); } { return BZ_MATHFN_SCOPE(fabs)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "fabs("; str += "fabs(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// abs(long double) // abs(long double)
template<> template<>
class _bz_abs<long double> : public OneOperandApplicativeTemplatesBase { class _bz_abs<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(fabs)((long double)x); } { return BZ_MATHFN_SCOPE(fabs)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "fabs("; str += "fabs(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// abs(complex<float> ) // abs(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
template<> template<>
class _bz_abs<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_abs<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(abs)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(abs)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "abs("; str += "abs(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// abs(complex<double> ) // abs(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
template<> template<>
class _bz_abs<complex<double> > : public OneOperandApplicativeTemplatesBase { class _bz_abs<complex<double> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(abs)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(abs)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "abs("; str += "abs(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// abs(complex<long double> ) // abs(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
template<> template<>
class _bz_abs<complex<long double> > : public OneOperandApplicativeTemplate sBase { class _bz_abs<complex<long double> > : public OneOperandApplicativeTemplate sBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(abs)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(abs)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "abs("; str += "abs(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// acos(P_numtype1) Inverse cosine // acos(P_numtype1) Inverse cosine
template<class P_numtype1> template<typename P_numtype1>
class _bz_acos : public OneOperandApplicativeTemplatesBase { class _bz_acos : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(acos)((double)x); } { return BZ_MATHFN_SCOPE(acos)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "acos("; str += "acos(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// acos(float) // acos(float)
template<> template<>
class _bz_acos<float> : public OneOperandApplicativeTemplatesBase { class _bz_acos<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(acos)((float)x); } { return BZ_MATHFN_SCOPE(acos)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "acos("; str += "acos(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// acos(long double) // acos(long double)
template<> template<>
class _bz_acos<long double> : public OneOperandApplicativeTemplatesBase { class _bz_acos<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(acos)((long double)x); } { return BZ_MATHFN_SCOPE(acos)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "acos(";
a.prettyPrint(str,format);
str += ")";
}
};
// acos(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_acos<complex<float> > : public OneOperandApplicativeTemplatesBase
{
public:
typedef complex<float> T_numtype1;
typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(acos)((complex<float> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "acos(";
a.prettyPrint(str,format);
str += ")";
}
};
#endif
// acos(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_acos<complex<double> > : public OneOperandApplicativeTemplatesBas
e {
public:
typedef complex<double> T_numtype1;
typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(acos)((complex<double> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "acos(";
a.prettyPrint(str,format);
str += ")";
}
};
#endif
// acos(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_acos<complex<long double> > : public OneOperandApplicativeTemplat
esBase {
public:
typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(acos)((complex<long double> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "acos("; str += "acos(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif
// acosh(P_numtype1) Inverse hyperbolic cosine // acosh(P_numtype1) Inverse hyperbolic cosine
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_acosh : public OneOperandApplicativeTemplatesBase { class _bz_acosh : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(acosh)((double)x); } { return BZ_IEEEMATHFN_SCOPE(acosh)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "acosh("; str += "acosh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// asin(P_numtype1) Inverse sine // asin(P_numtype1) Inverse sine
template<class P_numtype1> template<typename P_numtype1>
class _bz_asin : public OneOperandApplicativeTemplatesBase { class _bz_asin : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(asin)((double)x); } { return BZ_MATHFN_SCOPE(asin)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "asin("; str += "asin(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// asin(float) // asin(float)
template<> template<>
class _bz_asin<float> : public OneOperandApplicativeTemplatesBase { class _bz_asin<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(asin)((float)x); } { return BZ_MATHFN_SCOPE(asin)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "asin("; str += "asin(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// asin(long double) // asin(long double)
template<> template<>
class _bz_asin<long double> : public OneOperandApplicativeTemplatesBase { class _bz_asin<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(asin)((long double)x); } { return BZ_MATHFN_SCOPE(asin)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "asin(";
a.prettyPrint(str,format);
str += ")";
}
};
// asin(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_asin<complex<float> > : public OneOperandApplicativeTemplatesBase
{
public:
typedef complex<float> T_numtype1;
typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(asin)((complex<float> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "asin(";
a.prettyPrint(str,format);
str += ")";
}
};
#endif
// asin(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_asin<complex<double> > : public OneOperandApplicativeTemplatesBas
e {
public:
typedef complex<double> T_numtype1;
typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(asin)((complex<double> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "asin("; str += "asin(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif
// asin(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_asin<complex<long double> > : public OneOperandApplicativeTemplat
esBase {
public:
typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(asin)((complex<long double> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "asin(";
a.prettyPrint(str,format);
str += ")";
}
};
#endif
// asinh(P_numtype1) Inverse hyperbolic sine // asinh(P_numtype1) Inverse hyperbolic sine
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_asinh : public OneOperandApplicativeTemplatesBase { class _bz_asinh : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(asinh)((double)x); } { return BZ_IEEEMATHFN_SCOPE(asinh)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "asinh("; str += "asinh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// arg(P_numtype1) // arg(P_numtype1)
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
template<class P_numtype1> template<typename P_numtype1>
class _bz_arg : public OneOperandApplicativeTemplatesBase { class _bz_arg : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return 0; } { return 0; }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "0("; str += "0(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// arg(complex<float> ) // arg(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
template<> template<>
class _bz_arg<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_arg<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(arg)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(arg)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "arg("; str += "arg(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// arg(complex<double> ) // arg(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
template<> template<>
class _bz_arg<complex<double> > : public OneOperandApplicativeTemplatesBase { class _bz_arg<complex<double> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(arg)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(arg)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "arg("; str += "arg(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// arg(complex<long double> ) // arg(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
template<> template<>
class _bz_arg<complex<long double> > : public OneOperandApplicativeTemplate sBase { class _bz_arg<complex<long double> > : public OneOperandApplicativeTemplate sBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(arg)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(arg)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "arg("; str += "arg(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// atan(P_numtype1) Inverse tangent // atan(P_numtype1) Inverse tangent
template<class P_numtype1> template<typename P_numtype1>
class _bz_atan : public OneOperandApplicativeTemplatesBase { class _bz_atan : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(atan)((double)x); } { return BZ_MATHFN_SCOPE(atan)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "atan("; str += "atan(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// atan(float) // atan(float)
template<> template<>
class _bz_atan<float> : public OneOperandApplicativeTemplatesBase { class _bz_atan<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(atan)((float)x); } { return BZ_MATHFN_SCOPE(atan)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "atan("; str += "atan(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// atan(long double) // atan(long double)
template<> template<>
class _bz_atan<long double> : public OneOperandApplicativeTemplatesBase { class _bz_atan<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(atan)((long double)x); } { return BZ_MATHFN_SCOPE(atan)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "atan(";
a.prettyPrint(str,format);
str += ")";
}
};
// atan(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_atan<complex<float> > : public OneOperandApplicativeTemplatesBase
{
public:
typedef complex<float> T_numtype1;
typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(atan)((complex<float> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "atan(";
a.prettyPrint(str,format);
str += ")";
}
};
#endif
// atan(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_atan<complex<double> > : public OneOperandApplicativeTemplatesBas
e {
public:
typedef complex<double> T_numtype1;
typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(atan)((complex<double> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "atan(";
a.prettyPrint(str,format);
str += ")";
}
};
#endif
// atan(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_atan<complex<long double> > : public OneOperandApplicativeTemplat
esBase {
public:
typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(atan)((complex<long double> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "atan("; str += "atan(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif
// atanh(P_numtype1) Inverse hyperbolic tangent // atanh(P_numtype1) Inverse hyperbolic tangent
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_atanh : public OneOperandApplicativeTemplatesBase { class _bz_atanh : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(atanh)((double)x); } { return BZ_IEEEMATHFN_SCOPE(atanh)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "atanh("; str += "atanh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// atan2(P_numtype1, P_numtype2) Inverse tangent // atan2(P_numtype1, P_numtype2) Inverse tangent
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_atan2 : public TwoOperandApplicativeTemplatesBase { class _bz_atan2 : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_MATHFN_SCOPE(atan2)((double)x,(double)y); } { return BZ_MATHFN_SCOPE(atan2)((double)x,(double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "atan2("; str += "atan2(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
skipping to change at line 552 skipping to change at line 750
template<> template<>
class _bz_atan2<float, float > : public TwoOperandApplicativeTemplatesBase { class _bz_atan2<float, float > : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype2; typedef float T_numtype2;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_MATHFN_SCOPE(atan2)((float)x,(float)y); } { return BZ_MATHFN_SCOPE(atan2)((float)x,(float)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "atan2("; str += "atan2(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
skipping to change at line 575 skipping to change at line 773
template<> template<>
class _bz_atan2<long double, long double > : public TwoOperandApplicativeTe mplatesBase { class _bz_atan2<long double, long double > : public TwoOperandApplicativeTe mplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype2; typedef long double T_numtype2;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_MATHFN_SCOPE(atan2)((long double)x,(long double)y); } { return BZ_MATHFN_SCOPE(atan2)((long double)x,(long double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "atan2("; str += "atan2(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// _class(P_numtype1) Classification of float-point value (FP_xxx) // _class(P_numtype1) Classification of float-point value (FP_xxx)
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz__class : public OneOperandApplicativeTemplatesBase { class _bz__class : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef int T_numtype; typedef int T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(_class)(x); } { return BZ_IEEEMATHFN_SCOPE(_class)(x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "_class("; str += "_class(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// cbrt(P_numtype1) Cube root // cbrt(P_numtype1) Cube root
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_cbrt : public OneOperandApplicativeTemplatesBase { class _bz_cbrt : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(cbrt)((double)x); } { return BZ_IEEEMATHFN_SCOPE(cbrt)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cbrt("; str += "cbrt(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// ceil(P_numtype1) Ceiling // ceil(P_numtype1) Ceiling
template<class P_numtype1> template<typename P_numtype1>
class _bz_ceil : public OneOperandApplicativeTemplatesBase { class _bz_ceil : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(ceil)((double)x); } { return BZ_MATHFN_SCOPE(ceil)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "ceil("; str += "ceil(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// ceil(float) // ceil(float)
template<> template<>
class _bz_ceil<float> : public OneOperandApplicativeTemplatesBase { class _bz_ceil<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(ceil)((float)x); } { return BZ_MATHFN_SCOPE(ceil)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "ceil("; str += "ceil(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// ceil(long double) // ceil(long double)
template<> template<>
class _bz_ceil<long double> : public OneOperandApplicativeTemplatesBase { class _bz_ceil<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(ceil)((long double)x); } { return BZ_MATHFN_SCOPE(ceil)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "ceil("; str += "ceil(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// conj(P_numtype1) // conj(P_numtype1)
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
template<class P_numtype1> template<typename P_numtype1>
class _bz_conj : public OneOperandApplicativeTemplatesBase { class _bz_conj : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(conj)(x); } { return BZ_CMATHFN_SCOPE(conj)(x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "conj("; str += "conj(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// cos(P_numtype1) Cosine // cos(P_numtype1) Cosine
template<class P_numtype1> template<typename P_numtype1>
class _bz_cos : public OneOperandApplicativeTemplatesBase { class _bz_cos : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(cos)((double)x); } { return BZ_MATHFN_SCOPE(cos)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cos("; str += "cos(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// cos(float) // cos(float)
template<> template<>
class _bz_cos<float> : public OneOperandApplicativeTemplatesBase { class _bz_cos<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(cos)((float)x); } { return BZ_MATHFN_SCOPE(cos)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cos("; str += "cos(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// cos(long double) // cos(long double)
template<> template<>
class _bz_cos<long double> : public OneOperandApplicativeTemplatesBase { class _bz_cos<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(cos)((long double)x); } { return BZ_MATHFN_SCOPE(cos)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cos("; str += "cos(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// cos(complex<float> ) // cos(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_cos<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_cos<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef complex<float> T_numtype; typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(cos)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(cos)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cos("; str += "cos(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// cos(complex<double> ) // cos(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_cos<complex<double> > : public OneOperandApplicativeTemplatesBase { class _bz_cos<complex<double> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef complex<double> T_numtype; typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(cos)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(cos)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cos("; str += "cos(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#ifndef __PGI
// cos(complex<long double> ) // cos(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_cos<complex<long double> > : public OneOperandApplicativeTemplate sBase { class _bz_cos<complex<long double> > : public OneOperandApplicativeTemplate sBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype; typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(cos)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(cos)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cos("; str += "cos(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#endif
// copysign(P_numtype1, P_numtype2) // copysign(P_numtype1, P_numtype2)
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_copysign : public TwoOperandApplicativeTemplatesBase { class _bz_copysign : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_IEEEMATHFN_SCOPE(copysign)((double)x,(double)y); } { return BZ_IEEEMATHFN_SCOPE(copysign)((double)x,(double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "copysign("; str += "copysign(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// cosh(P_numtype1) Hyperbolic cosine // cosh(P_numtype1) Hyperbolic cosine
template<class P_numtype1> template<typename P_numtype1>
class _bz_cosh : public OneOperandApplicativeTemplatesBase { class _bz_cosh : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(cosh)((double)x); } { return BZ_MATHFN_SCOPE(cosh)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cosh("; str += "cosh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// cosh(float) // cosh(float)
template<> template<>
class _bz_cosh<float> : public OneOperandApplicativeTemplatesBase { class _bz_cosh<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(cosh)((float)x); } { return BZ_MATHFN_SCOPE(cosh)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cosh("; str += "cosh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// cosh(long double) // cosh(long double)
template<> template<>
class _bz_cosh<long double> : public OneOperandApplicativeTemplatesBase { class _bz_cosh<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(cosh)((long double)x); } { return BZ_MATHFN_SCOPE(cosh)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cosh("; str += "cosh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// cosh(complex<float> ) // cosh(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_cosh<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_cosh<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef complex<float> T_numtype; typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(cosh)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(cosh)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cosh("; str += "cosh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// cosh(complex<double> ) // cosh(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_cosh<complex<double> > : public OneOperandApplicativeTemplatesBas e { class _bz_cosh<complex<double> > : public OneOperandApplicativeTemplatesBas e {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef complex<double> T_numtype; typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(cosh)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(cosh)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cosh("; str += "cosh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#ifndef __PGI
// cosh(complex<long double> ) // cosh(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_cosh<complex<long double> > : public OneOperandApplicativeTemplat esBase { class _bz_cosh<complex<long double> > : public OneOperandApplicativeTemplat esBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype; typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(cosh)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(cosh)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "cosh("; str += "cosh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#endif
// drem(P_numtype1, P_numtype2) Remainder // drem(P_numtype1, P_numtype2) Remainder
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_drem : public TwoOperandApplicativeTemplatesBase { class _bz_drem : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_IEEEMATHFN_SCOPE(drem)((double)x,(double)y); } { return BZ_IEEEMATHFN_SCOPE(drem)((double)x,(double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "drem("; str += "drem(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// exp(P_numtype1) Exponential // exp(P_numtype1) Exponential
template<class P_numtype1> template<typename P_numtype1>
class _bz_exp : public OneOperandApplicativeTemplatesBase { class _bz_exp : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(exp)((double)x); } { return BZ_MATHFN_SCOPE(exp)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "exp("; str += "exp(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// exp(float) // exp(float)
template<> template<>
class _bz_exp<float> : public OneOperandApplicativeTemplatesBase { class _bz_exp<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(exp)((float)x); } { return BZ_MATHFN_SCOPE(exp)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "exp("; str += "exp(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// exp(long double) // exp(long double)
template<> template<>
class _bz_exp<long double> : public OneOperandApplicativeTemplatesBase { class _bz_exp<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(exp)((long double)x); } { return BZ_MATHFN_SCOPE(exp)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "exp("; str += "exp(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// exp(complex<float> ) // exp(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_exp<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_exp<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef complex<float> T_numtype; typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(exp)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(exp)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "exp("; str += "exp(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// exp(complex<double> ) // exp(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_exp<complex<double> > : public OneOperandApplicativeTemplatesBase { class _bz_exp<complex<double> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef complex<double> T_numtype; typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(exp)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(exp)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "exp("; str += "exp(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#ifndef __PGI
// exp(complex<long double> ) // exp(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_exp<complex<long double> > : public OneOperandApplicativeTemplate sBase { class _bz_exp<complex<long double> > : public OneOperandApplicativeTemplate sBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype; typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(exp)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(exp)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "exp("; str += "exp(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#endif
// expm1(P_numtype1) Exp(x)-1 // expm1(P_numtype1) Exp(x)-1
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_expm1 : public OneOperandApplicativeTemplatesBase { class _bz_expm1 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(expm1)((double)x); } { return BZ_IEEEMATHFN_SCOPE(expm1)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "expm1("; str += "expm1(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// erf(P_numtype1) Error function // erf(P_numtype1) Error function
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_erf : public OneOperandApplicativeTemplatesBase { class _bz_erf : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(erf)((double)x); } { return BZ_IEEEMATHFN_SCOPE(erf)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "erf("; str += "erf(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// erfc(P_numtype1) Complementary error function // erfc(P_numtype1) Complementary error function
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_erfc : public OneOperandApplicativeTemplatesBase { class _bz_erfc : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(erfc)((double)x); } { return BZ_IEEEMATHFN_SCOPE(erfc)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "erfc("; str += "erfc(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// floor(P_numtype1) Floor function // floor(P_numtype1) Floor function
template<class P_numtype1> template<typename P_numtype1>
class _bz_floor : public OneOperandApplicativeTemplatesBase { class _bz_floor : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(floor)((double)x); } { return BZ_MATHFN_SCOPE(floor)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "floor("; str += "floor(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// floor(float) // floor(float)
template<> template<>
class _bz_floor<float> : public OneOperandApplicativeTemplatesBase { class _bz_floor<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(floor)((float)x); } { return BZ_MATHFN_SCOPE(floor)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "floor("; str += "floor(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// floor(long double) // floor(long double)
template<> template<>
class _bz_floor<long double> : public OneOperandApplicativeTemplatesBase { class _bz_floor<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(floor)((long double)x); } { return BZ_MATHFN_SCOPE(floor)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "floor("; str += "floor(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// fmod(P_numtype1, P_numtype2) Modulo remainder // fmod(P_numtype1, P_numtype2) Modulo remainder
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_fmod : public TwoOperandApplicativeTemplatesBase { class _bz_fmod : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_IEEEMATHFN_SCOPE(fmod)((double)x,(double)y); } { return BZ_MATHFN_SCOPE(fmod)((double)x,(double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "fmod("; str += "fmod(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// hypot(P_numtype1, P_numtype2) sqrt(x*x+y*y) // hypot(P_numtype1, P_numtype2) sqrt(x*x+y*y)
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_hypot : public TwoOperandApplicativeTemplatesBase { class _bz_hypot : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_IEEEMATHFN_SCOPE(hypot)((double)x,(double)y); } { return BZ_IEEEMATHFN_SCOPE(hypot)((double)x,(double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "hypot("; str += "hypot(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// ilogb(P_numtype1) Integer unbiased exponent // ilogb(P_numtype1) Integer unbiased exponent
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_ilogb : public OneOperandApplicativeTemplatesBase { class _bz_ilogb : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef int T_numtype; typedef int T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(ilogb)(x); } { return BZ_IEEEMATHFN_SCOPE(ilogb)(x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "ilogb("; str += "ilogb(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// blitz_isnan(P_numtype1) Nonzero if NaNS or NaNQ // blitz_isnan(P_numtype1) Nonzero if NaNS or NaNQ
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_blitz_isnan : public OneOperandApplicativeTemplatesBase { class _bz_blitz_isnan : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef int T_numtype; typedef int T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ {
#ifdef isnan #ifdef BZ_ISNAN_IN_NAMESPACE_STD
// Some platforms define isnan as a macro, which causes the return BZ_STD_SCOPE(isnan)(x);
// BZ_IEEEMATHFN_SCOPE macro to break.
return isnan(x);
#else #else
return BZ_IEEEMATHFN_SCOPE(isnan)(x); return BZ_IEEEMATHFN_SCOPE(isnan)(x);
#endif #endif
} }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "blitz_isnan("; str += "blitz_isnan(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// itrunc(P_numtype1) Truncate and convert to integer // itrunc(P_numtype1) Truncate and convert to integer
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_itrunc : public OneOperandApplicativeTemplatesBase { class _bz_itrunc : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef int T_numtype; typedef int T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(itrunc)(x); } { return BZ_IEEEMATHFN_SCOPE(itrunc)(x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "itrunc("; str += "itrunc(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// j0(P_numtype1) Bessel function first kind, order 0 // j0(P_numtype1) Bessel function first kind, order 0
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_j0 : public OneOperandApplicativeTemplatesBase { class _bz_j0 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(j0)((double)x); } { return BZ_IEEEMATHFN_SCOPE(j0)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "j0("; str += "j0(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// j1(P_numtype1) Bessel function first kind, order 1 // j1(P_numtype1) Bessel function first kind, order 1
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_j1 : public OneOperandApplicativeTemplatesBase { class _bz_j1 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(j1)((double)x); } { return BZ_IEEEMATHFN_SCOPE(j1)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "j1("; str += "j1(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// lgamma(P_numtype1) Log absolute gamma // lgamma(P_numtype1) Log absolute gamma
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_lgamma : public OneOperandApplicativeTemplatesBase { class _bz_lgamma : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(lgamma)((double)x); } { return BZ_IEEEMATHFN_SCOPE(lgamma)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "lgamma("; str += "lgamma(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// log(P_numtype1) Natural logarithm // log(P_numtype1) Natural logarithm
template<class P_numtype1> template<typename P_numtype1>
class _bz_log : public OneOperandApplicativeTemplatesBase { class _bz_log : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(log)((double)x); } { return BZ_MATHFN_SCOPE(log)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "log("; str += "log(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// log(float) // log(float)
template<> template<>
class _bz_log<float> : public OneOperandApplicativeTemplatesBase { class _bz_log<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(log)((float)x); } { return BZ_MATHFN_SCOPE(log)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "log("; str += "log(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// log(long double) // log(long double)
template<> template<>
class _bz_log<long double> : public OneOperandApplicativeTemplatesBase { class _bz_log<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(log)((long double)x); } { return BZ_MATHFN_SCOPE(log)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "log("; str += "log(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// log(complex<float> ) // log(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_log<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_log<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef complex<float> T_numtype; typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(log)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(log)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "log("; str += "log(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// log(complex<double> ) // log(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_log<complex<double> > : public OneOperandApplicativeTemplatesBase { class _bz_log<complex<double> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef complex<double> T_numtype; typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(log)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(log)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "log("; str += "log(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#ifndef __PGI
// log(complex<long double> ) // log(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_log<complex<long double> > : public OneOperandApplicativeTemplate sBase { class _bz_log<complex<long double> > : public OneOperandApplicativeTemplate sBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype; typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(log)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(log)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "log("; str += "log(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#endif
// logb(P_numtype1) Unbiased exponent (IEEE) // logb(P_numtype1) Unbiased exponent (IEEE)
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_logb : public OneOperandApplicativeTemplatesBase { class _bz_logb : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(logb)((double)x); } { return BZ_IEEEMATHFN_SCOPE(logb)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "logb("; str += "logb(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// log1p(P_numtype1) Compute log(1 + x) // log1p(P_numtype1) Compute log(1 + x)
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_log1p : public OneOperandApplicativeTemplatesBase { class _bz_log1p : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(log1p)((double)x); } { return BZ_IEEEMATHFN_SCOPE(log1p)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "log1p("; str += "log1p(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// log10(P_numtype1) Logarithm base 10 // log10(P_numtype1) Logarithm base 10
template<class P_numtype1> template<typename P_numtype1>
class _bz_log10 : public OneOperandApplicativeTemplatesBase { class _bz_log10 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(log10)((double)x); } { return BZ_MATHFN_SCOPE(log10)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "log10("; str += "log10(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// log10(float) // log10(float)
template<> template<>
class _bz_log10<float> : public OneOperandApplicativeTemplatesBase { class _bz_log10<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(log10)((float)x); } { return BZ_MATHFN_SCOPE(log10)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "log10("; str += "log10(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// log10(long double) // log10(long double)
template<> template<>
class _bz_log10<long double> : public OneOperandApplicativeTemplatesBase { class _bz_log10<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(log10)((long double)x); } { return BZ_MATHFN_SCOPE(log10)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "log10(";
a.prettyPrint(str,format);
str += ")";
}
};
// log10(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_log10<complex<float> > : public OneOperandApplicativeTemplatesBas
e {
public:
typedef complex<float> T_numtype1;
typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(log10)((complex<float> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "log10(";
a.prettyPrint(str,format);
str += ")";
}
};
#endif
// log10(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_log10<complex<double> > : public OneOperandApplicativeTemplatesBa
se {
public:
typedef complex<double> T_numtype1;
typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(log10)((complex<double> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "log10("; str += "log10(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif
// log10(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH2
template<>
class _bz_log10<complex<long double> > : public OneOperandApplicativeTempla
tesBase {
public:
typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(log10)((complex<long double> )x); }
template<typename T1>
static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a)
{
str += "log10(";
a.prettyPrint(str,format);
str += ")";
}
};
#endif
// nearest(P_numtype1) Nearest floating point integer // nearest(P_numtype1) Nearest floating point integer
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_nearest : public OneOperandApplicativeTemplatesBase { class _bz_nearest : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(nearest)((double)x); } { return BZ_IEEEMATHFN_SCOPE(nearest)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "nearest("; str += "nearest(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// nextafter(P_numtype1, P_numtype2) Next representable number after x t owards y // nextafter(P_numtype1, P_numtype2) Next representable number after x t owards y
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_nextafter : public TwoOperandApplicativeTemplatesBase { class _bz_nextafter : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_IEEEMATHFN_SCOPE(nextafter)((double)x,(double)y); } { return BZ_IEEEMATHFN_SCOPE(nextafter)((double)x,(double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "nextafter("; str += "nextafter(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
template<class P_numtype> template<typename P_numtype>
class _bz_negate : public OneOperandApplicativeTemplatesBase { class _bz_negate : public OneOperandApplicativeTemplatesBase {
public: public:
typedef BZ_SIGNEDTYPE(P_numtype) T_numtype; typedef BZ_SIGNEDTYPE(P_numtype) T_numtype;
static inline T_numtype apply(T_numtype x) static inline T_numtype apply(T_numtype x)
{ return -x; } { return -x; }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& form static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintForma
at, const T1& a) t& format, const T1& a)
{ {
str += "-("; str += "-(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// norm(P_numtype1) // norm(P_numtype1)
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
template<class P_numtype1> template<typename P_numtype1>
class _bz_norm : public OneOperandApplicativeTemplatesBase { class _bz_norm : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype1 T_numtype; typedef P_numtype1 T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(norm)(x); } { return BZ_CMATHFN_SCOPE(norm)(x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "norm("; str += "norm(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// polar(P_numtype1, P_numtype2) // polar(P_numtype1, P_numtype2)
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_FCNS
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_polar : public TwoOperandApplicativeTemplatesBase { class _bz_polar : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef complex<T_numtype1> T_numtype; typedef complex<T_numtype1> T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_CMATHFN_SCOPE(polar)(x,y); } { return BZ_CMATHFN_SCOPE(polar)(x,y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "polar("; str += "polar(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// pow(P_numtype1, P_numtype2) Power // pow(P_numtype1, P_numtype2) Power
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_pow : public TwoOperandApplicativeTemplatesBase { class _bz_pow : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_MATHFN_SCOPE(pow)((double)x,(double)y); } { return BZ_MATHFN_SCOPE(pow)((double)x,(double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "pow("; str += "pow(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#ifndef __PGI
// pow(float, float) // pow(float, float)
template<> template<>
class _bz_pow<float, float > : public TwoOperandApplicativeTemplatesBase { class _bz_pow<float, float > : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype2; typedef float T_numtype2;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_MATHFN_SCOPE(pow)((float)x,(float)y); } { return BZ_MATHFN_SCOPE(pow)((float)x,(float)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "pow("; str += "pow(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif
// pow(long double, long double) // pow(long double, long double)
template<> template<>
class _bz_pow<long double, long double > : public TwoOperandApplicativeTemp latesBase { class _bz_pow<long double, long double > : public TwoOperandApplicativeTemp latesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype2; typedef long double T_numtype2;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_MATHFN_SCOPE(pow)((long double)x,(long double)y); } { return BZ_MATHFN_SCOPE(pow)((long double)x,(long double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "pow("; str += "pow(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// pow(complex<float>, complex<float>) // pow(complex<float>, complex<float>)
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_pow<complex<float>, complex<float> > : public TwoOperandApplicati veTemplatesBase { class _bz_pow<complex<float>, complex<float> > : public TwoOperandApplicati veTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef complex<float> T_numtype2; typedef complex<float> T_numtype2;
typedef complex<float> T_numtype; typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_CMATHFN_SCOPE(pow)((complex<float>)x,(complex<float>)y); } { return BZ_CMATHFN_SCOPE(pow)((complex<float>)x,(complex<float>)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "pow("; str += "pow(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// pow(complex<double>, complex<double>) // pow(complex<double>, complex<double>)
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_pow<complex<double>, complex<double> > : public TwoOperandApplica tiveTemplatesBase { class _bz_pow<complex<double>, complex<double> > : public TwoOperandApplica tiveTemplatesBase {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef complex<double> T_numtype2; typedef complex<double> T_numtype2;
typedef complex<double> T_numtype; typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_CMATHFN_SCOPE(pow)((complex<double>)x,(complex<double>)y); } { return BZ_CMATHFN_SCOPE(pow)((complex<double>)x,(complex<double>)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "pow("; str += "pow(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#ifndef __PGI
// pow(complex<long double>, complex<long double>) // pow(complex<long double>, complex<long double>)
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_pow<complex<long double>, complex<long double> > : public TwoOper andApplicativeTemplatesBase { class _bz_pow<complex<long double>, complex<long double> > : public TwoOper andApplicativeTemplatesBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype2; typedef complex<long double> T_numtype2;
typedef complex<long double> T_numtype; typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_CMATHFN_SCOPE(pow)((complex<long double>)x,(complex<long do uble>)y); } { return BZ_CMATHFN_SCOPE(pow)((complex<long double>)x,(complex<long do uble>)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "pow("; str += "pow(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#endif
// remainder(P_numtype1, P_numtype2) Remainder // remainder(P_numtype1, P_numtype2) Remainder
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_remainder : public TwoOperandApplicativeTemplatesBase { class _bz_remainder : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_IEEEMATHFN_SCOPE(remainder)((double)x,(double)y); } { return BZ_IEEEMATHFN_SCOPE(remainder)((double)x,(double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "remainder("; str += "remainder(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// rint(P_numtype1) Round to floating point integer // rint(P_numtype1) Round to floating point integer
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_rint : public OneOperandApplicativeTemplatesBase { class _bz_rint : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(rint)((double)x); } { return BZ_IEEEMATHFN_SCOPE(rint)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "rint("; str += "rint(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// rsqrt(P_numtype1) Reciprocal square root // rsqrt(P_numtype1) Reciprocal square root
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_rsqrt : public OneOperandApplicativeTemplatesBase { class _bz_rsqrt : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(rsqrt)((double)x); } { return BZ_IEEEMATHFN_SCOPE(rsqrt)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "rsqrt("; str += "rsqrt(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// scalb(P_numtype1, P_numtype2) x * (2**y) // scalb(P_numtype1, P_numtype2) x * (2**y)
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_scalb : public TwoOperandApplicativeTemplatesBase { class _bz_scalb : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_IEEEMATHFN_SCOPE(scalb)((double)x,(double)y); } { return BZ_IEEEMATHFN_SCOPE(scalb)((double)x,(double)y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "scalb("; str += "scalb(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// sin(P_numtype1) Sine // sin(P_numtype1) Sine
template<class P_numtype1> template<typename P_numtype1>
class _bz_sin : public OneOperandApplicativeTemplatesBase { class _bz_sin : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(sin)((double)x); } { return BZ_MATHFN_SCOPE(sin)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sin("; str += "sin(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// sin(float) // sin(float)
template<> template<>
class _bz_sin<float> : public OneOperandApplicativeTemplatesBase { class _bz_sin<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(sin)((float)x); } { return BZ_MATHFN_SCOPE(sin)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sin("; str += "sin(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// sin(long double) // sin(long double)
template<> template<>
class _bz_sin<long double> : public OneOperandApplicativeTemplatesBase { class _bz_sin<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(sin)((long double)x); } { return BZ_MATHFN_SCOPE(sin)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sin("; str += "sin(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// sin(complex<float> ) // sin(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_sin<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_sin<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef complex<float> T_numtype; typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(sin)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(sin)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sin("; str += "sin(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// sin(complex<double> ) // sin(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_sin<complex<double> > : public OneOperandApplicativeTemplatesBase { class _bz_sin<complex<double> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef complex<double> T_numtype; typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(sin)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(sin)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sin("; str += "sin(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#ifndef __PGI
// sin(complex<long double> ) // sin(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_sin<complex<long double> > : public OneOperandApplicativeTemplate sBase { class _bz_sin<complex<long double> > : public OneOperandApplicativeTemplate sBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype; typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(sin)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(sin)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sin("; str += "sin(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#endif
// sinh(P_numtype1) Hyperbolic sine // sinh(P_numtype1) Hyperbolic sine
template<class P_numtype1> template<typename P_numtype1>
class _bz_sinh : public OneOperandApplicativeTemplatesBase { class _bz_sinh : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(sinh)((double)x); } { return BZ_MATHFN_SCOPE(sinh)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sinh("; str += "sinh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// sinh(float) // sinh(float)
template<> template<>
class _bz_sinh<float> : public OneOperandApplicativeTemplatesBase { class _bz_sinh<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(sinh)((float)x); } { return BZ_MATHFN_SCOPE(sinh)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sinh("; str += "sinh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// sinh(long double) // sinh(long double)
template<> template<>
class _bz_sinh<long double> : public OneOperandApplicativeTemplatesBase { class _bz_sinh<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(sinh)((long double)x); } { return BZ_MATHFN_SCOPE(sinh)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sinh("; str += "sinh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// sinh(complex<float> ) // sinh(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_sinh<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_sinh<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef complex<float> T_numtype; typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(sinh)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(sinh)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sinh("; str += "sinh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// sinh(complex<double> ) // sinh(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_sinh<complex<double> > : public OneOperandApplicativeTemplatesBas e { class _bz_sinh<complex<double> > : public OneOperandApplicativeTemplatesBas e {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef complex<double> T_numtype; typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(sinh)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(sinh)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sinh("; str += "sinh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#ifndef __PGI
// sinh(complex<long double> ) // sinh(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_sinh<complex<long double> > : public OneOperandApplicativeTemplat esBase { class _bz_sinh<complex<long double> > : public OneOperandApplicativeTemplat esBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype; typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(sinh)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(sinh)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sinh("; str += "sinh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
template<class P_numtype> #endif
template<typename P_numtype>
class _bz_sqr : public OneOperandApplicativeTemplatesBase { class _bz_sqr : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
static inline T_numtype apply(T_numtype x) static inline T_numtype apply(T_numtype x)
{ return x*x; } { return x*x; }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sqr("; str += "sqr(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX
// Specialization of _bz_sqr for complex<T> // Specialization of _bz_sqr for complex<T>
template<class T> template<typename T>
class _bz_sqr<complex<T> > : public OneOperandApplicativeTemplatesBase { class _bz_sqr<complex<T> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<T> T_numtype; typedef complex<T> T_numtype;
static inline T_numtype apply(T_numtype x) static inline T_numtype apply(T_numtype x)
{ {
T r = x.real(); T i = x.imag(); T r = x.real(); T i = x.imag();
return T_numtype(r*r-i*i, 2*r*i); return T_numtype(r*r-i*i, 2*r*i);
} }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sqr("; str += "sqr(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// sqrt(P_numtype1) Square root // sqrt(P_numtype1) Square root
template<class P_numtype1> template<typename P_numtype1>
class _bz_sqrt : public OneOperandApplicativeTemplatesBase { class _bz_sqrt : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(sqrt)((double)x); } { return BZ_MATHFN_SCOPE(sqrt)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sqrt("; str += "sqrt(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// sqrt(float) // sqrt(float)
template<> template<>
class _bz_sqrt<float> : public OneOperandApplicativeTemplatesBase { class _bz_sqrt<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(sqrt)((float)x); } { return BZ_MATHFN_SCOPE(sqrt)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sqrt("; str += "sqrt(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// sqrt(long double) // sqrt(long double)
template<> template<>
class _bz_sqrt<long double> : public OneOperandApplicativeTemplatesBase { class _bz_sqrt<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(sqrt)((long double)x); } { return BZ_MATHFN_SCOPE(sqrt)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sqrt("; str += "sqrt(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// sqrt(complex<float> ) // sqrt(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_sqrt<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_sqrt<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef complex<float> T_numtype; typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(sqrt)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(sqrt)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sqrt("; str += "sqrt(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// sqrt(complex<double> ) // sqrt(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_sqrt<complex<double> > : public OneOperandApplicativeTemplatesBas e { class _bz_sqrt<complex<double> > : public OneOperandApplicativeTemplatesBas e {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef complex<double> T_numtype; typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(sqrt)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(sqrt)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sqrt("; str += "sqrt(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#ifndef __PGI
// sqrt(complex<long double> ) // sqrt(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_sqrt<complex<long double> > : public OneOperandApplicativeTemplat esBase { class _bz_sqrt<complex<long double> > : public OneOperandApplicativeTemplat esBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype; typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(sqrt)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(sqrt)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "sqrt("; str += "sqrt(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#endif
// tan(P_numtype1) Tangent // tan(P_numtype1) Tangent
template<class P_numtype1> template<typename P_numtype1>
class _bz_tan : public OneOperandApplicativeTemplatesBase { class _bz_tan : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(tan)((double)x); } { return BZ_MATHFN_SCOPE(tan)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tan("; str += "tan(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// tan(float) // tan(float)
template<> template<>
class _bz_tan<float> : public OneOperandApplicativeTemplatesBase { class _bz_tan<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(tan)((float)x); } { return BZ_MATHFN_SCOPE(tan)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tan("; str += "tan(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// tan(long double) // tan(long double)
template<> template<>
class _bz_tan<long double> : public OneOperandApplicativeTemplatesBase { class _bz_tan<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(tan)((long double)x); } { return BZ_MATHFN_SCOPE(tan)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tan("; str += "tan(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// tan(complex<float> ) // tan(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_tan<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_tan<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef complex<float> T_numtype; typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(tan)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(tan)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tan("; str += "tan(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// tan(complex<double> ) // tan(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_tan<complex<double> > : public OneOperandApplicativeTemplatesBase { class _bz_tan<complex<double> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef complex<double> T_numtype; typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(tan)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(tan)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tan("; str += "tan(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#ifndef __PGI
// tan(complex<long double> ) // tan(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_tan<complex<long double> > : public OneOperandApplicativeTemplate sBase { class _bz_tan<complex<long double> > : public OneOperandApplicativeTemplate sBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype; typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(tan)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(tan)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tan("; str += "tan(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#endif
// tanh(P_numtype1) Hyperbolic tangent // tanh(P_numtype1) Hyperbolic tangent
template<class P_numtype1> template<typename P_numtype1>
class _bz_tanh : public OneOperandApplicativeTemplatesBase { class _bz_tanh : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(tanh)((double)x); } { return BZ_MATHFN_SCOPE(tanh)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tanh("; str += "tanh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// tanh(float) // tanh(float)
template<> template<>
class _bz_tanh<float> : public OneOperandApplicativeTemplatesBase { class _bz_tanh<float> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef float T_numtype1; typedef float T_numtype1;
typedef float T_numtype; typedef float T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(tanh)((float)x); } { return BZ_MATHFN_SCOPE(tanh)((float)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tanh("; str += "tanh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// tanh(long double) // tanh(long double)
template<> template<>
class _bz_tanh<long double> : public OneOperandApplicativeTemplatesBase { class _bz_tanh<long double> : public OneOperandApplicativeTemplatesBase {
public: public:
typedef long double T_numtype1; typedef long double T_numtype1;
typedef long double T_numtype; typedef long double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_MATHFN_SCOPE(tanh)((long double)x); } { return BZ_MATHFN_SCOPE(tanh)((long double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tanh("; str += "tanh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
// tanh(complex<float> ) // tanh(complex<float> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_tanh<complex<float> > : public OneOperandApplicativeTemplatesBase { class _bz_tanh<complex<float> > : public OneOperandApplicativeTemplatesBase {
public: public:
typedef complex<float> T_numtype1; typedef complex<float> T_numtype1;
typedef complex<float> T_numtype; typedef complex<float> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(tanh)((complex<float> )x); } { return BZ_CMATHFN_SCOPE(tanh)((complex<float> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tanh("; str += "tanh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// tanh(complex<double> ) // tanh(complex<double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_tanh<complex<double> > : public OneOperandApplicativeTemplatesBas e { class _bz_tanh<complex<double> > : public OneOperandApplicativeTemplatesBas e {
public: public:
typedef complex<double> T_numtype1; typedef complex<double> T_numtype1;
typedef complex<double> T_numtype; typedef complex<double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(tanh)((complex<double> )x); } { return BZ_CMATHFN_SCOPE(tanh)((complex<double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tanh("; str += "tanh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#ifndef __PGI
// tanh(complex<long double> ) // tanh(complex<long double> )
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX_MATH1
template<> template<>
class _bz_tanh<complex<long double> > : public OneOperandApplicativeTemplat esBase { class _bz_tanh<complex<long double> > : public OneOperandApplicativeTemplat esBase {
public: public:
typedef complex<long double> T_numtype1; typedef complex<long double> T_numtype1;
typedef complex<long double> T_numtype; typedef complex<long double> T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_CMATHFN_SCOPE(tanh)((complex<long double> )x); } { return BZ_CMATHFN_SCOPE(tanh)((complex<long double> )x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "tanh("; str += "tanh(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
#endif
// uitrunc(P_numtype1) Truncate and convert to unsigned // uitrunc(P_numtype1) Truncate and convert to unsigned
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_uitrunc : public OneOperandApplicativeTemplatesBase { class _bz_uitrunc : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef unsigned T_numtype; typedef unsigned T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(uitrunc)((unsigned)x); } { return BZ_IEEEMATHFN_SCOPE(uitrunc)((unsigned)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "uitrunc("; str += "uitrunc(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// unordered(P_numtype1, P_numtype2) True if a comparison of x and y wou ld be unordered // unordered(P_numtype1, P_numtype2) True if a comparison of x and y wou ld be unordered
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
class _bz_unordered : public TwoOperandApplicativeTemplatesBase { class _bz_unordered : public TwoOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef P_numtype2 T_numtype2; typedef P_numtype2 T_numtype2;
typedef int T_numtype; typedef int T_numtype;
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) static inline T_numtype apply(T_numtype1 x, T_numtype2 y)
{ return BZ_IEEEMATHFN_SCOPE(unordered)(x,y); } { return BZ_IEEEMATHFN_SCOPE(unordered)(x,y); }
template<class T1, class T2> template<typename T1, typename T2>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a, const T2& b) const T1& a, const T2& b)
{ {
str += "unordered("; str += "unordered(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ","; str += ",";
b.prettyPrint(str,format); b.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// y0(P_numtype1) Bessel function of the second kind, order zero // y0(P_numtype1) Bessel function of the second kind, order zero
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_y0 : public OneOperandApplicativeTemplatesBase { class _bz_y0 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(y0)((double)x); } { return BZ_IEEEMATHFN_SCOPE(y0)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "y0("; str += "y0(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
// y1(P_numtype1) Bessel function of the second kind, order one // y1(P_numtype1) Bessel function of the second kind, order one
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<typename P_numtype1>
class _bz_y1 : public OneOperandApplicativeTemplatesBase { class _bz_y1 : public OneOperandApplicativeTemplatesBase {
public: public:
typedef P_numtype1 T_numtype1; typedef P_numtype1 T_numtype1;
typedef double T_numtype; typedef double T_numtype;
static inline T_numtype apply(T_numtype1 x) static inline T_numtype apply(T_numtype1 x)
{ return BZ_IEEEMATHFN_SCOPE(y1)((double)x); } { return BZ_IEEEMATHFN_SCOPE(y1)((double)x); }
template<class T1> template<typename T1>
static void prettyPrint(string& str, prettyPrintFormat& format, static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& f
ormat,
const T1& a) const T1& a)
{ {
str += "y1("; str += "y1(";
a.prettyPrint(str,format); a.prettyPrint(str,format);
str += ")"; str += ")";
} }
}; };
#endif #endif
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 251 change blocks. 
369 lines changed or deleted 805 lines changed or added


 matltri.h   matltri.h 
/************************************************************************** * /************************************************************************** *
* blitz/matltri.h Declarations for LowerTriangular matrices * blitz/matltri.h Declarations for LowerTriangular matrices
* *
* $Id: matltri.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: matltri.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matltri.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_MATLTRI_H #ifndef BZ_MATLTRI_H
#define BZ_MATLTRI_H #define BZ_MATLTRI_H
#ifndef BZ_MSTRUCT_H #ifndef BZ_MSTRUCT_H
#error <blitz/matltri.h> must be included via <blitz/mstruct.h> #error <blitz/matltri.h> must be included via <blitz/mstruct.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
skipping to change at line 71 skipping to change at line 53
LowerTriangularIterator(unsigned rows, unsigned cols) LowerTriangularIterator(unsigned rows, unsigned cols)
{ {
BZPRECONDITION(rows == cols); BZPRECONDITION(rows == cols);
size_ = rows; size_ = rows;
good_ = true; good_ = true;
offset_ = 0; offset_ = 0;
i_ = 0; i_ = 0;
j_ = 0; j_ = 0;
} }
operator _bz_bool() const operator bool() const { return good_; }
{ return good_; }
void operator++() void operator++()
{ {
BZPRECONDITION(good_); BZPRECONDITION(good_);
++offset_; ++offset_;
++j_; ++j_;
if (j_ > i_) if (j_ > i_)
{ {
j_ = 0; j_ = 0;
++i_; ++i_;
skipping to change at line 99 skipping to change at line 80
{ return i_; } { return i_; }
unsigned col() const unsigned col() const
{ return j_; } { return j_; }
unsigned offset() const unsigned offset() const
{ return offset_; } { return offset_; }
protected: protected:
unsigned size_; unsigned size_;
_bz_bool good_; bool good_;
unsigned offset_; unsigned offset_;
unsigned i_, j_; unsigned i_, j_;
}; };
class LowerTriangular : public MatrixStructure { class LowerTriangular : public MatrixStructure {
public: public:
typedef LowerTriangularIterator T_iterator; typedef LowerTriangularIterator T_iterator;
LowerTriangular() LowerTriangular()
skipping to change at line 136 skipping to change at line 117
unsigned coordToOffset(unsigned i, unsigned j) const unsigned coordToOffset(unsigned i, unsigned j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
BZPRECONDITION(i >= j); BZPRECONDITION(i >= j);
return i*(i+1)/2 + j; return i*(i+1)/2 + j;
} }
unsigned firstInRow(unsigned i) const unsigned firstInRow(unsigned i) const
{ return 0; } { return 0; }
template<class T_numtype> template<typename T_numtype>
T_numtype get(const T_numtype * _bz_restrict data, T_numtype get(const T_numtype * restrict data,
unsigned i, unsigned j) const unsigned i, unsigned j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
if (i >= j) if (i >= j)
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
else else
return ZeroElement<T_numtype>::zero(); return ZeroElement<T_numtype>::zero();
} }
template<class T_numtype> template<typename T_numtype>
T_numtype& get(T_numtype * _bz_restrict data, unsigned i, unsigned j) T_numtype& get(T_numtype * restrict data, unsigned i, unsigned j)
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
if (i >= j) if (i >= j)
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
else else
return ZeroElement<T_numtype>::zero(); return ZeroElement<T_numtype>::zero();
} }
unsigned lastInRow(unsigned i) const unsigned lastInRow(unsigned i) const
{ return i; } { return i; }
unsigned firstInCol(unsigned j) const unsigned firstInCol(unsigned j) const
{ return j; } { return j; }
unsigned lastInCol(unsigned j) const unsigned lastInCol(unsigned j) const
{ return size_ - 1; } { return size_ - 1; }
_bz_bool inRange(unsigned i, unsigned j) const bool inRange(unsigned i, unsigned j) const
{ {
return (i < size_) && (j < size_); return (i < size_) && (j < size_);
} }
unsigned numElements() const unsigned numElements() const
{ return size_ * (size_ + 1) / 2; } { return size_ * (size_ + 1) / 2; }
unsigned rows() const unsigned rows() const
{ return size_; } { return size_; }
 End of changes. 7 change blocks. 
29 lines changed or deleted 10 lines changed or added


 matmat.h   matmat.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/meta/matmat.h TinyMatrix matrix-matrix product metaprogram * blitz/meta/matmat.h TinyMatrix matrix-matrix product metaprogram
* *
* $Id: matmat.h,v 1.2 2001/01/24 20:22:51 tveldhui Exp $ * $Id: matmat.h,v 1.5 2005/05/07 04:17:57 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matmat.h,v $
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:08:44 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_META_MATMAT_H #ifndef BZ_META_MATMAT_H
#define BZ_META_MATMAT_H #define BZ_META_MATMAT_H
#ifndef BZ_TINYMAT_H #ifndef BZ_TINYMAT_H
#error <blitz/meta/matmat.h> must be included via <blitz/tinymat.h> #error <blitz/meta/matmat.h> must be included via <blitz/tinymat.h>
#endif #endif
#include <blitz/meta/metaprog.h> #include <blitz/meta/metaprog.h>
#include <blitz/tinymatexpr.h> #include <blitz/tinymatexpr.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Template metaprogram for matrix-matrix multiplication // Template metaprogram for matrix-matrix multiplication
template<int N_rows1, int N_columns, int N_columns2, int N_rowStride1, template<int N_rows1, int N_columns, int N_columns2, int N_rowStride1,
int N_colStride1, int N_rowStride2, int N_colStride2, int K> int N_colStride1, int N_rowStride2, int N_colStride2, int K>
class _bz_meta_matrixMatrixProduct { class _bz_meta_matrixMatrixProduct {
public: public:
enum { go = (K != N_columns - 1) }; static const int go = (K != N_columns - 1) ? 1 : 0;
template<class T_numtype1, class T_numtype2> template<typename T_numtype1, typename T_numtype2>
static inline BZ_PROMOTE(T_numtype1, T_numtype2) static inline BZ_PROMOTE(T_numtype1, T_numtype2)
f(const T_numtype1* matrix1, const T_numtype2* matrix2, int i, int j) f(const T_numtype1* matrix1, const T_numtype2* matrix2, int i, int j)
{ {
return matrix1[i * N_rowStride1 + K * N_colStride1] return matrix1[i * N_rowStride1 + K * N_colStride1]
* matrix2[K * N_rowStride2 + j * N_colStride2] * matrix2[K * N_rowStride2 + j * N_colStride2]
+ _bz_meta_matrixMatrixProduct<N_rows1 * go, N_columns * go, + _bz_meta_matrixMatrixProduct<N_rows1 * go, N_columns * go,
N_columns2 * go, N_rowStride1 * go, N_colStride1 * go, N_columns2 * go, N_rowStride1 * go, N_colStride1 * go,
N_rowStride2 * go, N_colStride2 * go, (K+1) * go> N_rowStride2 * go, N_colStride2 * go, (K+1) * go>
::f(matrix1, matrix2, i, j); ::f(matrix1, matrix2, i, j);
} }
}; };
template<> template<>
class _bz_meta_matrixMatrixProduct<0,0,0,0,0,0,0,0> { class _bz_meta_matrixMatrixProduct<0,0,0,0,0,0,0,0> {
public: public:
static inline _bz_meta_nullOperand f(const void*, const void*, int, int ) static inline _bz_meta_nullOperand f(const void*, const void*, int, int )
{ return _bz_meta_nullOperand(); } { return _bz_meta_nullOperand(); }
}; };
template<class T_numtype1, class T_numtype2, int N_rows1, int N_columns, template<typename T_numtype1, typename T_numtype2, int N_rows1, int N_colum ns,
int N_columns2, int N_rowStride1, int N_colStride1, int N_columns2, int N_rowStride1, int N_colStride1,
int N_rowStride2, int N_colStride2> int N_rowStride2, int N_colStride2>
class _bz_tinyMatrixMatrixProduct { class _bz_tinyMatrixMatrixProduct {
public: public:
typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype; typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype;
enum { rows = N_rows1, columns = N_columns2 }; static const int rows = N_rows1, columns = N_columns2;
_bz_tinyMatrixMatrixProduct(const T_numtype1* matrix1, _bz_tinyMatrixMatrixProduct(const T_numtype1* matrix1,
const T_numtype2* matrix2) const T_numtype2* matrix2)
: matrix1_(matrix1), matrix2_(matrix2) : matrix1_(matrix1), matrix2_(matrix2)
{ } { }
_bz_tinyMatrixMatrixProduct(const _bz_tinyMatrixMatrixProduct<T_numtype 1, _bz_tinyMatrixMatrixProduct(const _bz_tinyMatrixMatrixProduct<T_numtype 1,
T_numtype2, N_rows1, N_columns, N_columns2, N_rowStride1, N_colStri de1, T_numtype2, N_rows1, N_columns, N_columns2, N_rowStride1, N_colStri de1,
N_rowStride2, N_colStride2>& x) N_rowStride2, N_colStride2>& x)
: matrix1_(x.matrix1_), matrix2_(x.matrix2_) : matrix1_(x.matrix1_), matrix2_(x.matrix2_)
skipping to change at line 120 skipping to change at line 104
return _bz_meta_matrixMatrixProduct<N_rows1, N_columns, return _bz_meta_matrixMatrixProduct<N_rows1, N_columns,
N_columns2, N_rowStride1, N_colStride1, N_rowStride2, N_columns2, N_rowStride1, N_colStride1, N_rowStride2,
N_colStride2, 0>::f(matrix1_, matrix2_, i, j); N_colStride2, 0>::f(matrix1_, matrix2_, i, j);
} }
protected: protected:
const T_numtype1* matrix1_; const T_numtype1* matrix1_;
const T_numtype2* matrix2_; const T_numtype2* matrix2_;
}; };
template<class T_numtype1, class T_numtype2, int N_rows1, int N_columns1, template<typename T_numtype1, typename T_numtype2, int N_rows1, int N_colum ns1,
int N_columns2> int N_columns2>
inline inline
_bz_tinyMatExpr<_bz_tinyMatrixMatrixProduct<T_numtype1, T_numtype2, N_rows1 , _bz_tinyMatExpr<_bz_tinyMatrixMatrixProduct<T_numtype1, T_numtype2, N_rows1 ,
N_columns1, N_columns2, N_columns1, 1, N_columns2, 1> > N_columns1, N_columns2, N_columns1, 1, N_columns2, 1> >
product(const TinyMatrix<T_numtype1, N_rows1, N_columns1>& a, product(const TinyMatrix<T_numtype1, N_rows1, N_columns1>& a,
const TinyMatrix<T_numtype2, N_columns1, N_columns2>& b) const TinyMatrix<T_numtype2, N_columns1, N_columns2>& b)
{ {
typedef _bz_tinyMatrixMatrixProduct<T_numtype1, T_numtype2, typedef _bz_tinyMatrixMatrixProduct<T_numtype1, T_numtype2,
N_rows1, N_columns1, N_columns2, N_columns1, 1, N_columns2, 1> T_ex pr; N_rows1, N_columns1, N_columns2, N_columns1, 1, N_columns2, 1> T_ex pr;
return _bz_tinyMatExpr<T_expr>(T_expr(a.data(), b.data())); return _bz_tinyMatExpr<T_expr>(T_expr(a.data(), b.data()));
 End of changes. 8 change blocks. 
25 lines changed or deleted 9 lines changed or added


 matref.h   matref.h 
/************************************************************************** * /************************************************************************** *
* blitz/matref.h Declaration of the _bz_MatrixRef<P_numtype, P_struct ure> * blitz/matref.h Declaration of the _bz_MatrixRef<P_numtype, P_struct ure>
* class. * class.
* *
* $Id: matref.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: matref.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matref.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_MATREF_H #ifndef BZ_MATREF_H
#define BZ_MATREF_H #define BZ_MATREF_H
#ifndef BZ_MATEXPR_H #ifndef BZ_MATEXPR_H
#error <blitz/matref.h> must be included via <blitz/matexpr.h> #error <blitz/matref.h> must be included via <blitz/matexpr.h>
#endif // BZ_MATEXPR_H #endif // BZ_MATEXPR_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_numtype, class P_structure> template<typename P_numtype, typename P_structure>
class _bz_MatrixRef { class _bz_MatrixRef {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
_bz_MatrixRef(const Matrix<P_numtype, P_structure>& m) _bz_MatrixRef(const Matrix<P_numtype, P_structure>& m)
: matrix_(&m) : matrix_(&m)
{ } { }
T_numtype operator()(unsigned i, unsigned j) const T_numtype operator()(unsigned i, unsigned j) const
 End of changes. 3 change blocks. 
22 lines changed or deleted 4 lines changed or added


 matrix.cc   matrix.cc 
/* /*
* $Id: matrix.cc,v 1.3 2002/05/27 19:38:33 jcumming Exp $
*
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: matrix.cc,v $
* Revision 1.3 2002/05/27 19:38:33 jcumming
* Removed use of this->. data_ is now declared in scope of class definiti
on.
*
* Revision 1.2 2002/03/06 16:29:28 patricg
*
* data_ replaced by this->data_
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_MATRIX_CC #ifndef BZ_MATRIX_CC
#define BZ_MATRIX_CC #define BZ_MATRIX_CC
#ifndef BZ_MATRIX_H #ifndef BZ_MATRIX_H
#include <blitz/matrix.h> #include <blitz/matrix.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Matrix expression operand // Matrix expression operand
template<class P_numtype, class P_structure> template<class P_expr> template<typename P_numtype, typename P_structure> template<typename P_expr >
Matrix<P_numtype, P_structure>& Matrix<P_numtype, P_structure>&
Matrix<P_numtype, P_structure>::operator=(_bz_MatExpr<P_expr> expr) Matrix<P_numtype, P_structure>::operator=(_bz_MatExpr<P_expr> expr)
{ {
// Check for compatible structures. // Check for compatible structures.
// Fast evaluation (compatible structures) // Fast evaluation (compatible structures)
// (not implemented) // (not implemented)
// Slow evaluation // Slow evaluation
_bz_typename P_structure::T_iterator iter(rows(), cols()); _bz_typename P_structure::T_iterator iter(rows(), cols());
while (iter) while (iter)
{ {
data_[iter.offset()] = expr(iter.row(), iter.col()); data_[iter.offset()] = expr(iter.row(), iter.col());
++iter; ++iter;
} }
return *this; return *this;
} }
template<class P_numtype, class P_structure> template<typename P_numtype, typename P_structure>
ostream& operator<<(ostream& os, const Matrix<P_numtype, P_structure>& matr ix) ostream& operator<<(ostream& os, const Matrix<P_numtype, P_structure>& matr ix)
{ {
os << "[ "; os << "[ ";
for (int i=0; i < matrix.rows(); ++i) for (int i=0; i < matrix.rows(); ++i)
{ {
for (int j=0; j < matrix.columns(); ++j) for (int j=0; j < matrix.columns(); ++j)
{ {
os << setw(10) << matrix(i,j); os << setw(10) << matrix(i,j);
if ((!((j+1)%7)) && (j < matrix.cols()-1)) if ((!((j+1)%7)) && (j < matrix.cols()-1))
os << endl << " ..."; os << endl << " ...";
 End of changes. 4 change blocks. 
25 lines changed or deleted 2 lines changed or added


 matrix.h   matrix.h 
/************************************************************************** * /************************************************************************** *
* blitz/matrix.h Declaration of the Matrix<T_type, T_structure> class * blitz/matrix.h Declaration of the Matrix<T_type, T_structure> class
* *
* $Id: matrix.h,v 1.4 2002/05/27 19:31:43 jcumming Exp $ * $Id: matrix.h,v 1.6 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matrix.h,v $
* Revision 1.4 2002/05/27 19:31:43 jcumming
* Removed use of this-> as means of accessing members of templated base cl
ass.
* Instead provided using declarations for these members within the derived
* class definitions to bring them into the scope of the derived class.
*
* Revision 1.3 2002/03/06 16:30:24 patricg
*
* data_ replaced by this->data_ everywhere
*
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.6 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.5 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.4 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.3 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
* Revision 1.1 1996/11/11 17:29:13 tveldhui
* Initial revision
*
* Revision 1.2 1996/10/31 21:06:54 tveldhui
* Did away with multiple template parameters. Only numeric type
* and structure parameters now.
*
*
*/
#ifndef BZ_MATRIX_H #ifndef BZ_MATRIX_H
#define BZ_MATRIX_H #define BZ_MATRIX_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
#ifndef BZ_MEMBLOCK_H #ifndef BZ_MEMBLOCK_H
#include <blitz/memblock.h> #include <blitz/memblock.h>
#endif #endif
#ifndef BZ_MSTRUCT_H #ifndef BZ_MSTRUCT_H
#include <blitz/mstruct.h> #include <blitz/mstruct.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Forward declarations // Forward declarations
template<class P_numtype, class P_structure> template<typename P_numtype, typename P_structure>
class _bz_MatrixRef; class _bz_MatrixRef;
template<class P_expr> template<typename P_expr>
class _bz_MatExpr; class _bz_MatExpr;
// Declaration of class Matrix // Declaration of class Matrix
template<class P_numtype, class P_structure BZ_TEMPLATE_DEFAULT(RowMajor)> template<typename P_numtype, typename P_structure BZ_TEMPLATE_DEFAULT(RowMa jor)>
class Matrix : protected MemoryBlockReference<P_numtype> { class Matrix : protected MemoryBlockReference<P_numtype> {
private: private:
typedef MemoryBlockReference<P_numtype> T_base; typedef MemoryBlockReference<P_numtype> T_base;
using T_base::data_; using T_base::data_;
public: public:
////////////////////////////////////////////// //////////////////////////////////////////////
// Public Types // Public Types
skipping to change at line 127 skipping to change at line 87
{ {
structure_.resize(rows, cols); structure_.resize(rows, cols);
MemoryBlockReference<T_numtype>::newBlock(structure_.numElements()) ; MemoryBlockReference<T_numtype>::newBlock(structure_.numElements()) ;
} }
// Matrix(int rows, int cols, T_numtype initValue, // Matrix(int rows, int cols, T_numtype initValue,
// T_structure structure = T_structure(rows, cols)); // T_structure structure = T_structure(rows, cols));
// Matrix(int rows, int cols, Random); // Matrix(int rows, int cols, Random);
// Matrix(int rows, int cols, matrix-expression); // Matrix(int rows, int cols, matrix-expression);
// Matrix(int rows, int cols, T_numtype* data, int rowStride, int colSt ride); // Matrix(int rows, int cols, T_numtype* data, int rowStride, int colSt ride);
// _bz_explicit Matrix(Vector<T_numtype>& matrix); // explicit Matrix(Vector<T_numtype>& matrix);
// _bz_explicit Matrix(unsigned length); // explicit Matrix(unsigned length);
// Create a vector view of an already allocated block of memory. // Create a vector view of an already allocated block of memory.
// Note that the memory will not be freed when this vector is // Note that the memory will not be freed when this vector is
// destroyed. // destroyed.
// Matrix(unsigned length, T_numtype* data, int stride = 1); // Matrix(unsigned length, T_numtype* data, int stride = 1);
////////////////////////////////////////////// //////////////////////////////////////////////
// Member functions // Member functions
////////////////////////////////////////////// //////////////////////////////////////////////
skipping to change at line 181 skipping to change at line 141
////////////////////////////////////////////// //////////////////////////////////////////////
// Subscripting operators // Subscripting operators
////////////////////////////////////////////// //////////////////////////////////////////////
T_numtype operator()(unsigned i, unsigned j) const T_numtype operator()(unsigned i, unsigned j) const
{ {
return structure_.get(data_, i, j); return structure_.get(data_, i, j);
} }
T_numtype& _bz_restrict operator()(unsigned i, unsigned j) T_numtype& restrict operator()(unsigned i, unsigned j)
{ {
return structure_.get(data_, i, j); return structure_.get(data_, i, j);
} }
// T_matrix operator()(Range,Range); // T_matrix operator()(Range,Range);
// T_matrixIndirect operator()(Vector<int>,Vector<int>); // T_matrixIndirect operator()(Vector<int>,Vector<int>);
// T_matrixIndirect operator()(integer-placeholder-expression, Range); // T_matrixIndirect operator()(integer-placeholder-expression, Range);
// T_matrix operator()(difference-equation-expression) // T_matrix operator()(difference-equation-expression)
skipping to change at line 205 skipping to change at line 165
// Scalar operand // Scalar operand
T_matrix& operator=(T_numtype); T_matrix& operator=(T_numtype);
T_matrix& operator+=(T_numtype); T_matrix& operator+=(T_numtype);
T_matrix& operator-=(T_numtype); T_matrix& operator-=(T_numtype);
T_matrix& operator*=(T_numtype); T_matrix& operator*=(T_numtype);
T_matrix& operator/=(T_numtype); T_matrix& operator/=(T_numtype);
// Matrix operand // Matrix operand
template<class P_numtype2, class P_structure2> template<typename P_numtype2, typename P_structure2>
T_matrix& operator=(const Matrix<P_numtype2, P_structure2> &); T_matrix& operator=(const Matrix<P_numtype2, P_structure2> &);
template<class P_numtype2, class P_structure2> template<typename P_numtype2, typename P_structure2>
T_matrix& operator+=(const Matrix<P_numtype2, P_structure2>&); T_matrix& operator+=(const Matrix<P_numtype2, P_structure2>&);
template<class P_numtype2, class P_structure2> template<typename P_numtype2, typename P_structure2>
T_matrix& operator-=(const Matrix<P_numtype2, P_structure2> &); T_matrix& operator-=(const Matrix<P_numtype2, P_structure2> &);
template<class P_numtype2, class P_structure2> template<typename P_numtype2, typename P_structure2>
T_matrix& operator*=(const Matrix<P_numtype2, P_structure2> &); T_matrix& operator*=(const Matrix<P_numtype2, P_structure2> &);
template<class P_numtype2, class P_structure2> template<typename P_numtype2, typename P_structure2>
T_matrix& operator/=(const Matrix<P_numtype2, P_structure2> &); T_matrix& operator/=(const Matrix<P_numtype2, P_structure2> &);
// Matrix expression operand // Matrix expression operand
template<class P_expr> template<typename P_expr>
T_matrix& operator=(_bz_MatExpr<P_expr>); T_matrix& operator=(_bz_MatExpr<P_expr>);
// Integer placeholder expression operand // Integer placeholder expression operand
// MatrixPick operand // MatrixPick operand
////////////////////////////////////////////// //////////////////////////////////////////////
// Unary operators // Unary operators
////////////////////////////////////////////// //////////////////////////////////////////////
T_matrix& operator++(); T_matrix& operator++();
void operator++(int); void operator++(int);
T_matrix& operator--(); T_matrix& operator--();
void operator--(int); void operator--(int);
private: private:
T_structure structure_; T_structure structure_;
}; };
template<class P_numtype, class P_structure> template<typename P_numtype, typename P_structure>
ostream& operator<<(ostream& os, const Matrix<P_numtype, P_structure>& matr ix); ostream& operator<<(ostream& os, const Matrix<P_numtype, P_structure>& matr ix);
// Global operators // Global operators
// +,-,*,/ with all possible combinations of: // +,-,*,/ with all possible combinations of:
// - scalar // - scalar
// - matrix // - matrix
// - matrix pick // - matrix pick
// - matrix expression // - matrix expression
// Pointwise Math functions: sin, cos, etc. // Pointwise Math functions: sin, cos, etc.
// Global functions // Global functions
 End of changes. 14 change blocks. 
57 lines changed or deleted 16 lines changed or added


 matsymm.h   matsymm.h 
/************************************************************************** * /************************************************************************** *
* blitz/matsymm.h Declarations for Symmetric matrices * blitz/matsymm.h Declarations for Symmetric matrices
* *
* $Id: matsymm.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: matsymm.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matsymm.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_MATSYMM_H #ifndef BZ_MATSYMM_H
#define BZ_MATSYMM_H #define BZ_MATSYMM_H
#ifndef BZ_MSTRUCT_H #ifndef BZ_MSTRUCT_H
#error <blitz/matsymm.h> must be included via <blitz/mstruct.h> #error <blitz/matsymm.h> must be included via <blitz/mstruct.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
skipping to change at line 71 skipping to change at line 53
SymmetricIterator(unsigned rows, unsigned cols) SymmetricIterator(unsigned rows, unsigned cols)
{ {
BZPRECONDITION(rows == cols); BZPRECONDITION(rows == cols);
size_ = rows; size_ = rows;
good_ = true; good_ = true;
offset_ = 0; offset_ = 0;
i_ = 0; i_ = 0;
j_ = 0; j_ = 0;
} }
operator _bz_bool() const operator bool() const { return good_; }
{ return good_; }
void operator++() void operator++()
{ {
BZPRECONDITION(good_); BZPRECONDITION(good_);
++offset_; ++offset_;
++j_; ++j_;
if (j_ > i_) if (j_ > i_)
{ {
j_ = 0; j_ = 0;
++i_; ++i_;
skipping to change at line 99 skipping to change at line 80
{ return i_; } { return i_; }
unsigned col() const unsigned col() const
{ return j_; } { return j_; }
unsigned offset() const unsigned offset() const
{ return offset_; } { return offset_; }
protected: protected:
unsigned size_; unsigned size_;
_bz_bool good_; bool good_;
unsigned offset_; unsigned offset_;
unsigned i_, j_; unsigned i_, j_;
}; };
class Symmetric : public MatrixStructure { class Symmetric : public MatrixStructure {
public: public:
typedef SymmetricIterator T_iterator; typedef SymmetricIterator T_iterator;
Symmetric() Symmetric()
skipping to change at line 138 skipping to change at line 119
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
if (i >= j) if (i >= j)
return i*(i+1)/2 + j; return i*(i+1)/2 + j;
else else
return j*(j+1)/2 + i; return j*(j+1)/2 + i;
} }
unsigned firstInRow(unsigned i) const unsigned firstInRow(unsigned i) const
{ return 0; } { return 0; }
template<class T_numtype> template<typename T_numtype>
T_numtype get(const T_numtype * _bz_restrict data, T_numtype get(const T_numtype * restrict data,
unsigned i, unsigned j) const unsigned i, unsigned j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
} }
template<class T_numtype> template<typename T_numtype>
T_numtype& get(T_numtype * _bz_restrict data, unsigned i, unsigned j) T_numtype& get(T_numtype * restrict data, unsigned i, unsigned j)
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
} }
unsigned lastInRow(unsigned i) const unsigned lastInRow(unsigned i) const
{ return i; } { return i; }
unsigned firstInCol(unsigned j) const unsigned firstInCol(unsigned j) const
{ return j; } { return j; }
unsigned lastInCol(unsigned j) const unsigned lastInCol(unsigned j) const
{ return size_ - 1; } { return size_ - 1; }
_bz_bool inRange(unsigned i, unsigned j) const bool inRange(unsigned i, unsigned j) const {
{
return (i < size_) && (j < size_); return (i < size_) && (j < size_);
} }
unsigned numElements() const unsigned numElements() const
{ return size_ * (size_ + 1) / 2; } { return size_ * (size_ + 1) / 2; }
unsigned rows() const unsigned rows() const
{ return size_; } { return size_; }
void resize(unsigned size) void resize(unsigned size)
 End of changes. 7 change blocks. 
30 lines changed or deleted 10 lines changed or added


 mattoep.h   mattoep.h 
/************************************************************************** * /************************************************************************** *
* blitz/mattoep.h Declarations for Toeplitz matrices * blitz/mattoep.h Declarations for Toeplitz matrices
* *
* $Id: mattoep.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: mattoep.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: mattoep.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_MATTOEP_H #ifndef BZ_MATTOEP_H
#define BZ_MATTOEP_H #define BZ_MATTOEP_H
#ifndef BZ_MSTRUCT_H #ifndef BZ_MSTRUCT_H
#error <blitz/mattoep.h> must be included via <blitz/mstruct.h> #error <blitz/mattoep.h> must be included via <blitz/mstruct.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
skipping to change at line 71 skipping to change at line 53
ToeplitzIterator(unsigned rows, unsigned cols) ToeplitzIterator(unsigned rows, unsigned cols)
{ {
rows_ = rows; rows_ = rows;
cols_ = cols; cols_ = cols;
i_ = 0; i_ = 0;
j_ = 0; j_ = 0;
good_ = true; good_ = true;
offset_ = 0; offset_ = 0;
} }
operator _bz_bool() const operator bool() const { return good_; }
{
return good_;
}
void operator++() void operator++()
{ {
++offset_; ++offset_;
if (i_ < rows_ - 1) if (i_ < rows_ - 1)
++i_; ++i_;
else if (j_ < cols_ - 1) else if (j_ < cols_ - 1)
++j_; ++j_;
else else
good_ = false; good_ = false;
skipping to change at line 100 skipping to change at line 79
unsigned col() const unsigned col() const
{ return j_; } { return j_; }
unsigned offset() const unsigned offset() const
{ return offset_; } { return offset_; }
protected: protected:
unsigned offset_; unsigned offset_;
unsigned i_, j_; unsigned i_, j_;
unsigned rows_, cols_; unsigned rows_, cols_;
_bz_bool good_; bool good_;
}; };
class Toeplitz : public GeneralMatrix { class Toeplitz : public GeneralMatrix {
public: public:
typedef ToeplitzIterator T_iterator; typedef ToeplitzIterator T_iterator;
Toeplitz() Toeplitz()
: rows_(0), cols_(0) : rows_(0), cols_(0)
{ } { }
skipping to change at line 128 skipping to change at line 107
unsigned coordToOffset(unsigned i, unsigned j) const unsigned coordToOffset(unsigned i, unsigned j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
return i + j; return i + j;
} }
unsigned firstInRow(unsigned i) const unsigned firstInRow(unsigned i) const
{ return 0; } { return 0; }
template<class T_numtype> template<typename T_numtype>
T_numtype get(const T_numtype * _bz_restrict data, T_numtype get(const T_numtype * restrict data,
unsigned i, unsigned j) const unsigned i, unsigned j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
} }
template<class T_numtype> template<typename T_numtype>
T_numtype& get(T_numtype * _bz_restrict data, unsigned i, unsigned j) T_numtype& get(T_numtype * restrict data, unsigned i, unsigned j)
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
} }
unsigned lastInRow(unsigned i) const unsigned lastInRow(const unsigned) const { return cols_ - 1; }
{ return cols_ - 1; } unsigned firstInCol(const unsigned) const { return 0; }
unsigned lastInCol(const unsigned) const { return rows_ - 1; }
unsigned firstInCol(unsigned j) const
{ return 0; }
unsigned lastInCol(unsigned j) const
{ return rows_ - 1; }
_bz_bool inRange(unsigned i, unsigned j) const bool inRange(const unsigned i,const unsigned j) const { return (i<rows_
{ ) && (j<cols_); }
return (i < rows_) && (j < cols_);
}
unsigned numElements() const unsigned numElements() const { return rows_ + cols_ - 1; }
{ return rows_ + cols_ - 1; }
unsigned rows() const unsigned rows() const { return rows_; }
{ return rows_; }
void resize(unsigned rows, unsigned cols) void resize(const unsigned rows,const unsigned cols) {
{
rows_ = rows; rows_ = rows;
cols_ = cols; cols_ = cols;
} }
private: private:
unsigned rows_, cols_; unsigned rows_, cols_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 11 change blocks. 
48 lines changed or deleted 17 lines changed or added


 matuops.h   matuops.h 
// Generated source file. Do not edit. // Generated source file. Do not edit.
// Created by: genmatuops.cpp Jun 28 2002 16:20:51 // Created by: genmatuops.cpp Dec 10 2003 17:58:05
#ifndef BZ_MATUOPS_H #ifndef BZ_MATUOPS_H
#define BZ_MATUOPS_H #define BZ_MATUOPS_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
#ifndef BZ_MATEXPR_H #ifndef BZ_MATEXPR_H
#error <blitz/matuops.h> must be included via <blitz/matexpr.h> #error <blitz/matuops.h> must be included via <blitz/matexpr.h>
#endif #endif
skipping to change at line 32 skipping to change at line 32
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_abs<P_numtype1> > T_expr; _bz_abs<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > > _bz_abs<typename P_expr1::T_numtype> > >
abs(_bz_MatExpr<P_expr1> d1) abs(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > T_expr; _bz_abs<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* acos * acos
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
skipping to change at line 60 skipping to change at line 60
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_acos<P_numtype1> > T_expr; _bz_acos<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_acos<_bz_typename P_expr1::T_numtype> > > _bz_acos<typename P_expr1::T_numtype> > >
acos(_bz_MatExpr<P_expr1> d1) acos(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_acos<_bz_typename P_expr1::T_numtype> > T_expr; _bz_acos<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* acosh * acosh
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
skipping to change at line 89 skipping to change at line 89
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_acosh<P_numtype1> > T_expr; _bz_acosh<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_acosh<_bz_typename P_expr1::T_numtype> > > _bz_acosh<typename P_expr1::T_numtype> > >
acosh(_bz_MatExpr<P_expr1> d1) acosh(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_acosh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_acosh<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* asin * asin
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 119 skipping to change at line 119
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_asin<P_numtype1> > T_expr; _bz_asin<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_asin<_bz_typename P_expr1::T_numtype> > > _bz_asin<typename P_expr1::T_numtype> > >
asin(_bz_MatExpr<P_expr1> d1) asin(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_asin<_bz_typename P_expr1::T_numtype> > T_expr; _bz_asin<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* asinh * asinh
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
skipping to change at line 148 skipping to change at line 148
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_asinh<P_numtype1> > T_expr; _bz_asinh<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_asinh<_bz_typename P_expr1::T_numtype> > > _bz_asinh<typename P_expr1::T_numtype> > >
asinh(_bz_MatExpr<P_expr1> d1) asinh(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_asinh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_asinh<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* atan * atan
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 178 skipping to change at line 178
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_atan<P_numtype1> > T_expr; _bz_atan<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_atan<_bz_typename P_expr1::T_numtype> > > _bz_atan<typename P_expr1::T_numtype> > >
atan(_bz_MatExpr<P_expr1> d1) atan(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_atan<_bz_typename P_expr1::T_numtype> > T_expr; _bz_atan<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* atan2
**************************************************************************
**/
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_atan2<P_numtype1,P_numtype2> > >
atan2(const Matrix<P_numtype1, P_struct1>& d1, const Matrix<P_numtype2, P_s
truct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_atan2<P_numtype1,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2._bz_getRef()));
}
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_atan2<P_numtype1,typename P_expr2::T_numtype> > >
atan2(const Matrix<P_numtype1, P_struct1>& d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_atan2<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_atan2<P_numtype1,int> > >
atan2(const Matrix<P_numtype1, P_struct1>& d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_atan2<P_numtype1,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
int>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_atan2<P_numtype1,float> > >
atan2(const Matrix<P_numtype1, P_struct1>& d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_atan2<P_numtype1,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
float>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_atan2<P_numtype1,double> > >
atan2(const Matrix<P_numtype1, P_struct1>& d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_atan2<P_numtype1,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
double>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_atan2<P_numtype1,long double> > >
atan2(const Matrix<P_numtype1, P_struct1>& d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_atan2<P_numtype1,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
long double>(d2)));
}
template<class P_numtype1, class P_struct1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_atan2<P_numtype1,complex<T2> > > >
atan2(const Matrix<P_numtype1, P_struct1>& d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_atan2<P_numtype1,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
complex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_atan2<typename P_expr1::T_numtype,P_numtype2> > >
atan2(_bz_MatExpr<P_expr1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_atan2<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2._bz_getRef()));
}
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_atan2<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
atan2(_bz_MatExpr<P_expr1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_atan2<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_atan2<typename P_expr1::T_numtype,int> > >
atan2(_bz_MatExpr<P_expr1> d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_atan2<typename P_expr1::T_numtype,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_atan2<typename P_expr1::T_numtype,float> > >
atan2(_bz_MatExpr<P_expr1> d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_atan2<typename P_expr1::T_numtype,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_atan2<typename P_expr1::T_numtype,double> > >
atan2(_bz_MatExpr<P_expr1> d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_atan2<typename P_expr1::T_numtype,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_atan2<typename P_expr1::T_numtype,long double> > >
atan2(_bz_MatExpr<P_expr1> d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_atan2<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_atan2<typename P_expr1::T_numtype,complex<T2> > > >
atan2(_bz_MatExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_atan2<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_atan2<int,P_numtype2> > >
atan2(int d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_atan2<int,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2._bz_
getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_atan2<int,typename P_expr2::T_numtype> > >
atan2(int d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_atan2<int,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_atan2<float,P_numtype2> > >
atan2(float d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_atan2<float,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2._b
z_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_atan2<float,typename P_expr2::T_numtype> > >
atan2(float d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_atan2<float,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_atan2<double,P_numtype2> > >
atan2(double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_atan2<double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2._
bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_atan2<double,typename P_expr2::T_numtype> > >
atan2(double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_atan2<double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_atan2<long double,P_numtype2> > >
atan2(long double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_atan2<long double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_atan2<long double,typename P_expr2::T_numtype> > >
atan2(long double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_atan2<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2));
}
template<class T1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_atan2<complex<T1> ,P_numtype2> > >
atan2(complex<T1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_atan2<complex<T1> ,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2._bz_getRef()));
}
template<class T1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_atan2<complex<T1> ,typename P_expr2::T_numtype> > >
atan2(complex<T1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_atan2<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2));
}
/**************************************************************************
**
* atanh * atanh
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_atanh<P_numtype1> > > _bz_atanh<P_numtype1> > >
atanh(const Matrix<P_numtype1, P_struct1>& d1) atanh(const Matrix<P_numtype1, P_struct1>& d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_atanh<P_numtype1> > T_expr; _bz_atanh<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_atanh<_bz_typename P_expr1::T_numtype> > > _bz_atanh<typename P_expr1::T_numtype> > >
atanh(_bz_MatExpr<P_expr1> d1) atanh(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_atanh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_atanh<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* _class * _class
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 238 skipping to change at line 530
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz__class<P_numtype1> > T_expr; _bz__class<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz__class<_bz_typename P_expr1::T_numtype> > > _bz__class<typename P_expr1::T_numtype> > >
_class(_bz_MatExpr<P_expr1> d1) _class(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz__class<_bz_typename P_expr1::T_numtype> > T_expr; _bz__class<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* cbrt * cbrt
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 269 skipping to change at line 561
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_cbrt<P_numtype1> > T_expr; _bz_cbrt<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_cbrt<_bz_typename P_expr1::T_numtype> > > _bz_cbrt<typename P_expr1::T_numtype> > >
cbrt(_bz_MatExpr<P_expr1> d1) cbrt(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_cbrt<_bz_typename P_expr1::T_numtype> > T_expr; _bz_cbrt<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* ceil * ceil
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 299 skipping to change at line 591
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_ceil<P_numtype1> > T_expr; _bz_ceil<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_ceil<_bz_typename P_expr1::T_numtype> > > _bz_ceil<typename P_expr1::T_numtype> > >
ceil(_bz_MatExpr<P_expr1> d1) ceil(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_ceil<_bz_typename P_expr1::T_numtype> > T_expr; _bz_ceil<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* copysign
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_copysign<P_numtype1,P_numtype2> > >
copysign(const Matrix<P_numtype1, P_struct1>& d1, const Matrix<P_numtype2,
P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_copysign<P_numtype1,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2._bz_getRef()));
}
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_copysign<P_numtype1,typename P_expr2::T_numtype> > >
copysign(const Matrix<P_numtype1, P_struct1>& d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_copysign<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_copysign<P_numtype1,int> > >
copysign(const Matrix<P_numtype1, P_struct1>& d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_copysign<P_numtype1,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
int>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_copysign<P_numtype1,float> > >
copysign(const Matrix<P_numtype1, P_struct1>& d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_copysign<P_numtype1,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
float>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_copysign<P_numtype1,double> > >
copysign(const Matrix<P_numtype1, P_struct1>& d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_copysign<P_numtype1,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
double>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_copysign<P_numtype1,long double> > >
copysign(const Matrix<P_numtype1, P_struct1>& d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_copysign<P_numtype1,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
long double>(d2)));
}
template<class P_numtype1, class P_struct1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_copysign<P_numtype1,complex<T2> > > >
copysign(const Matrix<P_numtype1, P_struct1>& d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_copysign<P_numtype1,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
complex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_copysign<typename P_expr1::T_numtype,P_numtype2> > >
copysign(_bz_MatExpr<P_expr1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_copysign<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2._bz_getRef()));
}
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_copysign<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >
>
copysign(_bz_MatExpr<P_expr1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_copysign<typename P_expr1::T_numtype,typename P_expr2::T_numtyp
e> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_copysign<typename P_expr1::T_numtype,int> > >
copysign(_bz_MatExpr<P_expr1> d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_copysign<typename P_expr1::T_numtype,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_copysign<typename P_expr1::T_numtype,float> > >
copysign(_bz_MatExpr<P_expr1> d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_copysign<typename P_expr1::T_numtype,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_copysign<typename P_expr1::T_numtype,double> > >
copysign(_bz_MatExpr<P_expr1> d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_copysign<typename P_expr1::T_numtype,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_copysign<typename P_expr1::T_numtype,long double> > >
copysign(_bz_MatExpr<P_expr1> d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_copysign<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_copysign<typename P_expr1::T_numtype,complex<T2> > > >
copysign(_bz_MatExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_copysign<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_copysign<int,P_numtype2> > >
copysign(int d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_copysign<int,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2._bz_
getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_copysign<int,typename P_expr2::T_numtype> > >
copysign(int d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_copysign<int,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_copysign<float,P_numtype2> > >
copysign(float d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_copysign<float,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2._b
z_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_copysign<float,typename P_expr2::T_numtype> > >
copysign(float d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_copysign<float,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_copysign<double,P_numtype2> > >
copysign(double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_copysign<double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2._
bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_copysign<double,typename P_expr2::T_numtype> > >
copysign(double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_copysign<double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_copysign<long double,P_numtype2> > >
copysign(long double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_copysign<long double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_copysign<long double,typename P_expr2::T_numtype> > >
copysign(long double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_copysign<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2));
}
template<class T1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_copysign<complex<T1> ,P_numtype2> > >
copysign(complex<T1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_copysign<complex<T1> ,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2._bz_getRef()));
}
template<class T1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_copysign<complex<T1> ,typename P_expr2::T_numtype> > >
copysign(complex<T1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_copysign<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2));
}
#endif
/**************************************************************************
**
* cos * cos
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_cos<P_numtype1> > > _bz_cos<P_numtype1> > >
cos(const Matrix<P_numtype1, P_struct1>& d1) cos(const Matrix<P_numtype1, P_struct1>& d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_cos<P_numtype1> > T_expr; _bz_cos<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_cos<_bz_typename P_expr1::T_numtype> > > _bz_cos<typename P_expr1::T_numtype> > >
cos(_bz_MatExpr<P_expr1> d1) cos(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_cos<_bz_typename P_expr1::T_numtype> > T_expr; _bz_cos<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* cosh * cosh
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
skipping to change at line 355 skipping to change at line 942
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_cosh<P_numtype1> > T_expr; _bz_cosh<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_cosh<_bz_typename P_expr1::T_numtype> > > _bz_cosh<typename P_expr1::T_numtype> > >
cosh(_bz_MatExpr<P_expr1> d1) cosh(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_cosh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_cosh<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* drem
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_drem<P_numtype1,P_numtype2> > >
drem(const Matrix<P_numtype1, P_struct1>& d1, const Matrix<P_numtype2, P_st
ruct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_drem<P_numtype1,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2._bz_getRef()));
}
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_drem<P_numtype1,typename P_expr2::T_numtype> > >
drem(const Matrix<P_numtype1, P_struct1>& d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_drem<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_drem<P_numtype1,int> > >
drem(const Matrix<P_numtype1, P_struct1>& d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_drem<P_numtype1,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
int>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_drem<P_numtype1,float> > >
drem(const Matrix<P_numtype1, P_struct1>& d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_drem<P_numtype1,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
float>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_drem<P_numtype1,double> > >
drem(const Matrix<P_numtype1, P_struct1>& d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_drem<P_numtype1,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
double>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_drem<P_numtype1,long double> > >
drem(const Matrix<P_numtype1, P_struct1>& d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_drem<P_numtype1,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
long double>(d2)));
}
template<class P_numtype1, class P_struct1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_drem<P_numtype1,complex<T2> > > >
drem(const Matrix<P_numtype1, P_struct1>& d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_drem<P_numtype1,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
complex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_drem<typename P_expr1::T_numtype,P_numtype2> > >
drem(_bz_MatExpr<P_expr1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_drem<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2._bz_getRef()));
}
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_drem<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
drem(_bz_MatExpr<P_expr1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_drem<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >
T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_drem<typename P_expr1::T_numtype,int> > >
drem(_bz_MatExpr<P_expr1> d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_drem<typename P_expr1::T_numtype,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_drem<typename P_expr1::T_numtype,float> > >
drem(_bz_MatExpr<P_expr1> d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_drem<typename P_expr1::T_numtype,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_drem<typename P_expr1::T_numtype,double> > >
drem(_bz_MatExpr<P_expr1> d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_drem<typename P_expr1::T_numtype,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_drem<typename P_expr1::T_numtype,long double> > >
drem(_bz_MatExpr<P_expr1> d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_drem<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_drem<typename P_expr1::T_numtype,complex<T2> > > >
drem(_bz_MatExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_drem<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_drem<int,P_numtype2> > >
drem(int d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_drem<int,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2._bz_
getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_drem<int,typename P_expr2::T_numtype> > >
drem(int d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_drem<int,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_drem<float,P_numtype2> > >
drem(float d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_drem<float,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2._b
z_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_drem<float,typename P_expr2::T_numtype> > >
drem(float d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_drem<float,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_drem<double,P_numtype2> > >
drem(double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_drem<double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2._
bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_drem<double,typename P_expr2::T_numtype> > >
drem(double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_drem<double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_drem<long double,P_numtype2> > >
drem(long double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_drem<long double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_drem<long double,typename P_expr2::T_numtype> > >
drem(long double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_drem<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2));
}
template<class T1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_drem<complex<T1> ,P_numtype2> > >
drem(complex<T1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_drem<complex<T1> ,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2._bz_getRef()));
}
template<class T1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_drem<complex<T1> ,typename P_expr2::T_numtype> > >
drem(complex<T1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_drem<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2));
}
#endif
/**************************************************************************
**
* exp * exp
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_exp<P_numtype1> > > _bz_exp<P_numtype1> > >
exp(const Matrix<P_numtype1, P_struct1>& d1) exp(const Matrix<P_numtype1, P_struct1>& d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_exp<P_numtype1> > T_expr; _bz_exp<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_exp<_bz_typename P_expr1::T_numtype> > > _bz_exp<typename P_expr1::T_numtype> > >
exp(_bz_MatExpr<P_expr1> d1) exp(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_exp<_bz_typename P_expr1::T_numtype> > T_expr; _bz_exp<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* expm1 * expm1
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
skipping to change at line 412 skipping to change at line 1294
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_expm1<P_numtype1> > T_expr; _bz_expm1<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_expm1<_bz_typename P_expr1::T_numtype> > > _bz_expm1<typename P_expr1::T_numtype> > >
expm1(_bz_MatExpr<P_expr1> d1) expm1(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_expm1<_bz_typename P_expr1::T_numtype> > T_expr; _bz_expm1<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* erf * erf
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 443 skipping to change at line 1325
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_erf<P_numtype1> > T_expr; _bz_erf<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_erf<_bz_typename P_expr1::T_numtype> > > _bz_erf<typename P_expr1::T_numtype> > >
erf(_bz_MatExpr<P_expr1> d1) erf(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_erf<_bz_typename P_expr1::T_numtype> > T_expr; _bz_erf<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* erfc * erfc
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 474 skipping to change at line 1356
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_erfc<P_numtype1> > T_expr; _bz_erfc<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_erfc<_bz_typename P_expr1::T_numtype> > > _bz_erfc<typename P_expr1::T_numtype> > >
erfc(_bz_MatExpr<P_expr1> d1) erfc(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_erfc<_bz_typename P_expr1::T_numtype> > T_expr; _bz_erfc<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* fabs * fabs
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 504 skipping to change at line 1386
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_abs<P_numtype1> > T_expr; _bz_abs<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > > _bz_abs<typename P_expr1::T_numtype> > >
fabs(_bz_MatExpr<P_expr1> d1) fabs(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > T_expr; _bz_abs<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* floor * floor
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
skipping to change at line 532 skipping to change at line 1414
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_floor<P_numtype1> > T_expr; _bz_floor<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_floor<_bz_typename P_expr1::T_numtype> > > _bz_floor<typename P_expr1::T_numtype> > >
floor(_bz_MatExpr<P_expr1> d1) floor(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_floor<_bz_typename P_expr1::T_numtype> > T_expr; _bz_floor<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* fmod
**************************************************************************
**/
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_fmod<P_numtype1,P_numtype2> > >
fmod(const Matrix<P_numtype1, P_struct1>& d1, const Matrix<P_numtype2, P_st
ruct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_fmod<P_numtype1,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2._bz_getRef()));
}
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_fmod<P_numtype1,typename P_expr2::T_numtype> > >
fmod(const Matrix<P_numtype1, P_struct1>& d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_fmod<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_fmod<P_numtype1,int> > >
fmod(const Matrix<P_numtype1, P_struct1>& d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_fmod<P_numtype1,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
int>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_fmod<P_numtype1,float> > >
fmod(const Matrix<P_numtype1, P_struct1>& d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_fmod<P_numtype1,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
float>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_fmod<P_numtype1,double> > >
fmod(const Matrix<P_numtype1, P_struct1>& d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_fmod<P_numtype1,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
double>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_fmod<P_numtype1,long double> > >
fmod(const Matrix<P_numtype1, P_struct1>& d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_fmod<P_numtype1,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
long double>(d2)));
}
template<class P_numtype1, class P_struct1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_fmod<P_numtype1,complex<T2> > > >
fmod(const Matrix<P_numtype1, P_struct1>& d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_fmod<P_numtype1,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
complex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_fmod<typename P_expr1::T_numtype,P_numtype2> > >
fmod(_bz_MatExpr<P_expr1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_fmod<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2._bz_getRef()));
}
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_fmod<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
fmod(_bz_MatExpr<P_expr1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_fmod<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >
T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_fmod<typename P_expr1::T_numtype,int> > >
fmod(_bz_MatExpr<P_expr1> d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_fmod<typename P_expr1::T_numtype,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_fmod<typename P_expr1::T_numtype,float> > >
fmod(_bz_MatExpr<P_expr1> d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_fmod<typename P_expr1::T_numtype,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_fmod<typename P_expr1::T_numtype,double> > >
fmod(_bz_MatExpr<P_expr1> d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_fmod<typename P_expr1::T_numtype,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_fmod<typename P_expr1::T_numtype,long double> > >
fmod(_bz_MatExpr<P_expr1> d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_fmod<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_fmod<typename P_expr1::T_numtype,complex<T2> > > >
fmod(_bz_MatExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_fmod<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_fmod<int,P_numtype2> > >
fmod(int d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_fmod<int,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2._bz_
getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_fmod<int,typename P_expr2::T_numtype> > >
fmod(int d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_fmod<int,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_fmod<float,P_numtype2> > >
fmod(float d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_fmod<float,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2._b
z_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_fmod<float,typename P_expr2::T_numtype> > >
fmod(float d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_fmod<float,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_fmod<double,P_numtype2> > >
fmod(double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_fmod<double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2._
bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_fmod<double,typename P_expr2::T_numtype> > >
fmod(double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_fmod<double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_fmod<long double,P_numtype2> > >
fmod(long double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_fmod<long double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_fmod<long double,typename P_expr2::T_numtype> > >
fmod(long double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_fmod<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2));
}
template<class T1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_fmod<complex<T1> ,P_numtype2> > >
fmod(complex<T1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_fmod<complex<T1> ,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2._bz_getRef()));
}
template<class T1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_fmod<complex<T1> ,typename P_expr2::T_numtype> > >
fmod(complex<T1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_fmod<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2));
}
/**************************************************************************
**
* hypot
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_hypot<P_numtype1,P_numtype2> > >
hypot(const Matrix<P_numtype1, P_struct1>& d1, const Matrix<P_numtype2, P_s
truct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_hypot<P_numtype1,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2._bz_getRef()));
}
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_hypot<P_numtype1,typename P_expr2::T_numtype> > >
hypot(const Matrix<P_numtype1, P_struct1>& d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_hypot<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_hypot<P_numtype1,int> > >
hypot(const Matrix<P_numtype1, P_struct1>& d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_hypot<P_numtype1,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
int>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_hypot<P_numtype1,float> > >
hypot(const Matrix<P_numtype1, P_struct1>& d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_hypot<P_numtype1,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
float>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_hypot<P_numtype1,double> > >
hypot(const Matrix<P_numtype1, P_struct1>& d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_hypot<P_numtype1,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
double>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_hypot<P_numtype1,long double> > >
hypot(const Matrix<P_numtype1, P_struct1>& d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_hypot<P_numtype1,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
long double>(d2)));
}
template<class P_numtype1, class P_struct1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_hypot<P_numtype1,complex<T2> > > >
hypot(const Matrix<P_numtype1, P_struct1>& d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_hypot<P_numtype1,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
complex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_hypot<typename P_expr1::T_numtype,P_numtype2> > >
hypot(_bz_MatExpr<P_expr1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_hypot<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2._bz_getRef()));
}
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_hypot<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
hypot(_bz_MatExpr<P_expr1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_hypot<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_hypot<typename P_expr1::T_numtype,int> > >
hypot(_bz_MatExpr<P_expr1> d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_hypot<typename P_expr1::T_numtype,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_hypot<typename P_expr1::T_numtype,float> > >
hypot(_bz_MatExpr<P_expr1> d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_hypot<typename P_expr1::T_numtype,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_hypot<typename P_expr1::T_numtype,double> > >
hypot(_bz_MatExpr<P_expr1> d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_hypot<typename P_expr1::T_numtype,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_hypot<typename P_expr1::T_numtype,long double> > >
hypot(_bz_MatExpr<P_expr1> d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_hypot<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_hypot<typename P_expr1::T_numtype,complex<T2> > > >
hypot(_bz_MatExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_hypot<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_hypot<int,P_numtype2> > >
hypot(int d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_hypot<int,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2._bz_
getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_hypot<int,typename P_expr2::T_numtype> > >
hypot(int d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_hypot<int,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_hypot<float,P_numtype2> > >
hypot(float d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_hypot<float,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2._b
z_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_hypot<float,typename P_expr2::T_numtype> > >
hypot(float d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_hypot<float,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_hypot<double,P_numtype2> > >
hypot(double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_hypot<double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2._
bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_hypot<double,typename P_expr2::T_numtype> > >
hypot(double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_hypot<double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_hypot<long double,P_numtype2> > >
hypot(long double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_hypot<long double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_hypot<long double,typename P_expr2::T_numtype> > >
hypot(long double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_hypot<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2));
}
template<class T1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_hypot<complex<T1> ,P_numtype2> > >
hypot(complex<T1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_hypot<complex<T1> ,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2._bz_getRef()));
}
template<class T1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_hypot<complex<T1> ,typename P_expr2::T_numtype> > >
hypot(complex<T1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_hypot<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2));
}
#endif
/**************************************************************************
**
* ilogb * ilogb
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_ilogb<P_numtype1> > > _bz_ilogb<P_numtype1> > >
ilogb(const Matrix<P_numtype1, P_struct1>& d1) ilogb(const Matrix<P_numtype1, P_struct1>& d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_ilogb<P_numtype1> > T_expr; _bz_ilogb<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_ilogb<_bz_typename P_expr1::T_numtype> > > _bz_ilogb<typename P_expr1::T_numtype> > >
ilogb(_bz_MatExpr<P_expr1> d1) ilogb(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_ilogb<_bz_typename P_expr1::T_numtype> > T_expr; _bz_ilogb<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* blitz_isnan * blitz_isnan
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 592 skipping to change at line 2061
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_blitz_isnan<P_numtype1> > T_expr; _bz_blitz_isnan<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_blitz_isnan<_bz_typename P_expr1::T_numtype> > > _bz_blitz_isnan<typename P_expr1::T_numtype> > >
blitz_isnan(_bz_MatExpr<P_expr1> d1) blitz_isnan(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_blitz_isnan<_bz_typename P_expr1::T_numtype> > T_expr; _bz_blitz_isnan<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* itrunc * itrunc
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 623 skipping to change at line 2092
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_itrunc<P_numtype1> > T_expr; _bz_itrunc<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_itrunc<_bz_typename P_expr1::T_numtype> > > _bz_itrunc<typename P_expr1::T_numtype> > >
itrunc(_bz_MatExpr<P_expr1> d1) itrunc(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_itrunc<_bz_typename P_expr1::T_numtype> > T_expr; _bz_itrunc<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* j0 * j0
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 654 skipping to change at line 2123
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_j0<P_numtype1> > T_expr; _bz_j0<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_j0<_bz_typename P_expr1::T_numtype> > > _bz_j0<typename P_expr1::T_numtype> > >
j0(_bz_MatExpr<P_expr1> d1) j0(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_j0<_bz_typename P_expr1::T_numtype> > T_expr; _bz_j0<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* j1 * j1
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 685 skipping to change at line 2154
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_j1<P_numtype1> > T_expr; _bz_j1<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_j1<_bz_typename P_expr1::T_numtype> > > _bz_j1<typename P_expr1::T_numtype> > >
j1(_bz_MatExpr<P_expr1> d1) j1(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_j1<_bz_typename P_expr1::T_numtype> > T_expr; _bz_j1<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* lgamma * lgamma
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 716 skipping to change at line 2185
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_lgamma<P_numtype1> > T_expr; _bz_lgamma<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_lgamma<_bz_typename P_expr1::T_numtype> > > _bz_lgamma<typename P_expr1::T_numtype> > >
lgamma(_bz_MatExpr<P_expr1> d1) lgamma(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_lgamma<_bz_typename P_expr1::T_numtype> > T_expr; _bz_lgamma<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* log * log
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 746 skipping to change at line 2215
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_log<P_numtype1> > T_expr; _bz_log<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_log<_bz_typename P_expr1::T_numtype> > > _bz_log<typename P_expr1::T_numtype> > >
log(_bz_MatExpr<P_expr1> d1) log(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_log<_bz_typename P_expr1::T_numtype> > T_expr; _bz_log<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* logb * logb
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
skipping to change at line 775 skipping to change at line 2244
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_logb<P_numtype1> > T_expr; _bz_logb<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_logb<_bz_typename P_expr1::T_numtype> > > _bz_logb<typename P_expr1::T_numtype> > >
logb(_bz_MatExpr<P_expr1> d1) logb(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_logb<_bz_typename P_expr1::T_numtype> > T_expr; _bz_logb<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* log1p * log1p
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 806 skipping to change at line 2275
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_log1p<P_numtype1> > T_expr; _bz_log1p<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_log1p<_bz_typename P_expr1::T_numtype> > > _bz_log1p<typename P_expr1::T_numtype> > >
log1p(_bz_MatExpr<P_expr1> d1) log1p(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_log1p<_bz_typename P_expr1::T_numtype> > T_expr; _bz_log1p<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* log10 * log10
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 836 skipping to change at line 2305
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_log10<P_numtype1> > T_expr; _bz_log10<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_log10<_bz_typename P_expr1::T_numtype> > > _bz_log10<typename P_expr1::T_numtype> > >
log10(_bz_MatExpr<P_expr1> d1) log10(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_log10<_bz_typename P_expr1::T_numtype> > T_expr; _bz_log10<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* nearest * nearest
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
skipping to change at line 865 skipping to change at line 2334
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_nearest<P_numtype1> > T_expr; _bz_nearest<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_nearest<_bz_typename P_expr1::T_numtype> > > _bz_nearest<typename P_expr1::T_numtype> > >
nearest(_bz_MatExpr<P_expr1> d1) nearest(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_nearest<_bz_typename P_expr1::T_numtype> > T_expr; _bz_nearest<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* nextafter
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_nextafter<P_numtype1,P_numtype2> > >
nextafter(const Matrix<P_numtype1, P_struct1>& d1, const Matrix<P_numtype2,
P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_nextafter<P_numtype1,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2._bz_getRef()));
}
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_nextafter<P_numtype1,typename P_expr2::T_numtype> > >
nextafter(const Matrix<P_numtype1, P_struct1>& d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_nextafter<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_nextafter<P_numtype1,int> > >
nextafter(const Matrix<P_numtype1, P_struct1>& d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_nextafter<P_numtype1,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
int>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_nextafter<P_numtype1,float> > >
nextafter(const Matrix<P_numtype1, P_struct1>& d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_nextafter<P_numtype1,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
float>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_nextafter<P_numtype1,double> > >
nextafter(const Matrix<P_numtype1, P_struct1>& d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_nextafter<P_numtype1,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
double>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_nextafter<P_numtype1,long double> > >
nextafter(const Matrix<P_numtype1, P_struct1>& d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_nextafter<P_numtype1,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
long double>(d2)));
}
template<class P_numtype1, class P_struct1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_nextafter<P_numtype1,complex<T2> > > >
nextafter(const Matrix<P_numtype1, P_struct1>& d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_nextafter<P_numtype1,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
complex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_nextafter<typename P_expr1::T_numtype,P_numtype2> > >
nextafter(_bz_MatExpr<P_expr1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_nextafter<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2._bz_getRef()));
}
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_nextafter<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> >
nextafter(_bz_MatExpr<P_expr1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_nextafter<typename P_expr1::T_numtype,typename P_expr2::T_numty
pe> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_nextafter<typename P_expr1::T_numtype,int> > >
nextafter(_bz_MatExpr<P_expr1> d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_nextafter<typename P_expr1::T_numtype,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_nextafter<typename P_expr1::T_numtype,float> > >
nextafter(_bz_MatExpr<P_expr1> d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_nextafter<typename P_expr1::T_numtype,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_nextafter<typename P_expr1::T_numtype,double> > >
nextafter(_bz_MatExpr<P_expr1> d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_nextafter<typename P_expr1::T_numtype,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_nextafter<typename P_expr1::T_numtype,long double> > >
nextafter(_bz_MatExpr<P_expr1> d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_nextafter<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_nextafter<typename P_expr1::T_numtype,complex<T2> > > >
nextafter(_bz_MatExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_nextafter<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_nextafter<int,P_numtype2> > >
nextafter(int d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_nextafter<int,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2._bz_
getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_nextafter<int,typename P_expr2::T_numtype> > >
nextafter(int d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_nextafter<int,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_nextafter<float,P_numtype2> > >
nextafter(float d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_nextafter<float,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2._b
z_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_nextafter<float,typename P_expr2::T_numtype> > >
nextafter(float d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_nextafter<float,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_nextafter<double,P_numtype2> > >
nextafter(double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_nextafter<double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2._
bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_nextafter<double,typename P_expr2::T_numtype> > >
nextafter(double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_nextafter<double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_nextafter<long double,P_numtype2> > >
nextafter(long double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_nextafter<long double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_nextafter<long double,typename P_expr2::T_numtype> > >
nextafter(long double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_nextafter<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2));
}
template<class T1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_nextafter<complex<T1> ,P_numtype2> > >
nextafter(complex<T1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_nextafter<complex<T1> ,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2._bz_getRef()));
}
template<class T1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_nextafter<complex<T1> ,typename P_expr2::T_numtype> > >
nextafter(complex<T1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_nextafter<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2));
}
#endif
/**************************************************************************
**
* pow
**************************************************************************
**/
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_pow<P_numtype1,P_numtype2> > >
pow(const Matrix<P_numtype1, P_struct1>& d1, const Matrix<P_numtype2, P_str
uct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_pow<P_numtype1,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2._bz_getRef()));
}
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_pow<P_numtype1,typename P_expr2::T_numtype> > >
pow(const Matrix<P_numtype1, P_struct1>& d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_pow<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_pow<P_numtype1,int> > >
pow(const Matrix<P_numtype1, P_struct1>& d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_pow<P_numtype1,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
int>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_pow<P_numtype1,float> > >
pow(const Matrix<P_numtype1, P_struct1>& d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_pow<P_numtype1,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
float>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_pow<P_numtype1,double> > >
pow(const Matrix<P_numtype1, P_struct1>& d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_pow<P_numtype1,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
double>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_pow<P_numtype1,long double> > >
pow(const Matrix<P_numtype1, P_struct1>& d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_pow<P_numtype1,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
long double>(d2)));
}
template<class P_numtype1, class P_struct1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_pow<P_numtype1,complex<T2> > > >
pow(const Matrix<P_numtype1, P_struct1>& d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_pow<P_numtype1,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
complex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_pow<typename P_expr1::T_numtype,P_numtype2> > >
pow(_bz_MatExpr<P_expr1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_pow<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2._bz_getRef()));
}
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_pow<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
pow(_bz_MatExpr<P_expr1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_pow<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >
T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_pow<typename P_expr1::T_numtype,int> > >
pow(_bz_MatExpr<P_expr1> d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_pow<typename P_expr1::T_numtype,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_pow<typename P_expr1::T_numtype,float> > >
pow(_bz_MatExpr<P_expr1> d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_pow<typename P_expr1::T_numtype,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_pow<typename P_expr1::T_numtype,double> > >
pow(_bz_MatExpr<P_expr1> d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_pow<typename P_expr1::T_numtype,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_pow<typename P_expr1::T_numtype,long double> > >
pow(_bz_MatExpr<P_expr1> d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_pow<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_pow<typename P_expr1::T_numtype,complex<T2> > > >
pow(_bz_MatExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_pow<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_pow<int,P_numtype2> > >
pow(int d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_pow<int,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2._bz_
getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_pow<int,typename P_expr2::T_numtype> > >
pow(int d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_pow<int,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_pow<float,P_numtype2> > >
pow(float d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_pow<float,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2._b
z_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_pow<float,typename P_expr2::T_numtype> > >
pow(float d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_pow<float,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_pow<double,P_numtype2> > >
pow(double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_pow<double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2._
bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_pow<double,typename P_expr2::T_numtype> > >
pow(double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_pow<double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_pow<long double,P_numtype2> > >
pow(long double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_pow<long double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_pow<long double,typename P_expr2::T_numtype> > >
pow(long double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_pow<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2));
}
template<class T1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_pow<complex<T1> ,P_numtype2> > >
pow(complex<T1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_pow<complex<T1> ,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2._bz_getRef()));
}
template<class T1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_pow<complex<T1> ,typename P_expr2::T_numtype> > >
pow(complex<T1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_pow<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2));
}
/**************************************************************************
**
* remainder
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_remainder<P_numtype1,P_numtype2> > >
remainder(const Matrix<P_numtype1, P_struct1>& d1, const Matrix<P_numtype2,
P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_remainder<P_numtype1,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2._bz_getRef()));
}
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_remainder<P_numtype1,typename P_expr2::T_numtype> > >
remainder(const Matrix<P_numtype1, P_struct1>& d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_remainder<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_remainder<P_numtype1,int> > >
remainder(const Matrix<P_numtype1, P_struct1>& d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_remainder<P_numtype1,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
int>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_remainder<P_numtype1,float> > >
remainder(const Matrix<P_numtype1, P_struct1>& d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_remainder<P_numtype1,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
float>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_remainder<P_numtype1,double> > >
remainder(const Matrix<P_numtype1, P_struct1>& d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_remainder<P_numtype1,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
double>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_remainder<P_numtype1,long double> > >
remainder(const Matrix<P_numtype1, P_struct1>& d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_remainder<P_numtype1,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
long double>(d2)));
}
template<class P_numtype1, class P_struct1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_remainder<P_numtype1,complex<T2> > > >
remainder(const Matrix<P_numtype1, P_struct1>& d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_remainder<P_numtype1,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
complex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_remainder<typename P_expr1::T_numtype,P_numtype2> > >
remainder(_bz_MatExpr<P_expr1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_remainder<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2._bz_getRef()));
}
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_remainder<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> >
remainder(_bz_MatExpr<P_expr1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_remainder<typename P_expr1::T_numtype,typename P_expr2::T_numty
pe> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_remainder<typename P_expr1::T_numtype,int> > >
remainder(_bz_MatExpr<P_expr1> d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_remainder<typename P_expr1::T_numtype,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_remainder<typename P_expr1::T_numtype,float> > >
remainder(_bz_MatExpr<P_expr1> d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_remainder<typename P_expr1::T_numtype,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_remainder<typename P_expr1::T_numtype,double> > >
remainder(_bz_MatExpr<P_expr1> d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_remainder<typename P_expr1::T_numtype,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_remainder<typename P_expr1::T_numtype,long double> > >
remainder(_bz_MatExpr<P_expr1> d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_remainder<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_remainder<typename P_expr1::T_numtype,complex<T2> > > >
remainder(_bz_MatExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_remainder<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_remainder<int,P_numtype2> > >
remainder(int d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_remainder<int,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2._bz_
getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_remainder<int,typename P_expr2::T_numtype> > >
remainder(int d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_remainder<int,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_remainder<float,P_numtype2> > >
remainder(float d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_remainder<float,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2._b
z_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_remainder<float,typename P_expr2::T_numtype> > >
remainder(float d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_remainder<float,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_remainder<double,P_numtype2> > >
remainder(double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_remainder<double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2._
bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_remainder<double,typename P_expr2::T_numtype> > >
remainder(double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_remainder<double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_remainder<long double,P_numtype2> > >
remainder(long double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_remainder<long double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_remainder<long double,typename P_expr2::T_numtype> > >
remainder(long double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_remainder<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2));
}
template<class T1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_remainder<complex<T1> ,P_numtype2> > >
remainder(complex<T1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_remainder<complex<T1> ,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2._bz_getRef()));
}
template<class T1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_remainder<complex<T1> ,typename P_expr2::T_numtype> > >
remainder(complex<T1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_remainder<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2));
}
#endif
/**************************************************************************
**
* rint * rint
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_rint<P_numtype1> > > _bz_rint<P_numtype1> > >
rint(const Matrix<P_numtype1, P_struct1>& d1) rint(const Matrix<P_numtype1, P_struct1>& d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_rint<P_numtype1> > T_expr; _bz_rint<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_rint<_bz_typename P_expr1::T_numtype> > > _bz_rint<typename P_expr1::T_numtype> > >
rint(_bz_MatExpr<P_expr1> d1) rint(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_rint<_bz_typename P_expr1::T_numtype> > T_expr; _bz_rint<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* rsqrt * rsqrt
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 927 skipping to change at line 3278
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_rsqrt<P_numtype1> > T_expr; _bz_rsqrt<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_rsqrt<_bz_typename P_expr1::T_numtype> > > _bz_rsqrt<typename P_expr1::T_numtype> > >
rsqrt(_bz_MatExpr<P_expr1> d1) rsqrt(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_rsqrt<_bz_typename P_expr1::T_numtype> > T_expr; _bz_rsqrt<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* scalb
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_scalb<P_numtype1,P_numtype2> > >
scalb(const Matrix<P_numtype1, P_struct1>& d1, const Matrix<P_numtype2, P_s
truct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_scalb<P_numtype1,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2._bz_getRef()));
}
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_scalb<P_numtype1,typename P_expr2::T_numtype> > >
scalb(const Matrix<P_numtype1, P_struct1>& d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_scalb<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_scalb<P_numtype1,int> > >
scalb(const Matrix<P_numtype1, P_struct1>& d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_scalb<P_numtype1,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
int>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_scalb<P_numtype1,float> > >
scalb(const Matrix<P_numtype1, P_struct1>& d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_scalb<P_numtype1,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
float>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_scalb<P_numtype1,double> > >
scalb(const Matrix<P_numtype1, P_struct1>& d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_scalb<P_numtype1,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
double>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_scalb<P_numtype1,long double> > >
scalb(const Matrix<P_numtype1, P_struct1>& d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_scalb<P_numtype1,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
long double>(d2)));
}
template<class P_numtype1, class P_struct1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_scalb<P_numtype1,complex<T2> > > >
scalb(const Matrix<P_numtype1, P_struct1>& d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_scalb<P_numtype1,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
complex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_scalb<typename P_expr1::T_numtype,P_numtype2> > >
scalb(_bz_MatExpr<P_expr1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_scalb<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2._bz_getRef()));
}
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_scalb<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
scalb(_bz_MatExpr<P_expr1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_scalb<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_scalb<typename P_expr1::T_numtype,int> > >
scalb(_bz_MatExpr<P_expr1> d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_scalb<typename P_expr1::T_numtype,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_scalb<typename P_expr1::T_numtype,float> > >
scalb(_bz_MatExpr<P_expr1> d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_scalb<typename P_expr1::T_numtype,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_scalb<typename P_expr1::T_numtype,double> > >
scalb(_bz_MatExpr<P_expr1> d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_scalb<typename P_expr1::T_numtype,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_scalb<typename P_expr1::T_numtype,long double> > >
scalb(_bz_MatExpr<P_expr1> d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_scalb<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_scalb<typename P_expr1::T_numtype,complex<T2> > > >
scalb(_bz_MatExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_scalb<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_scalb<int,P_numtype2> > >
scalb(int d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_scalb<int,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2._bz_
getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_scalb<int,typename P_expr2::T_numtype> > >
scalb(int d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_scalb<int,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_scalb<float,P_numtype2> > >
scalb(float d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_scalb<float,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2._b
z_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_scalb<float,typename P_expr2::T_numtype> > >
scalb(float d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_scalb<float,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_scalb<double,P_numtype2> > >
scalb(double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_scalb<double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2._
bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_scalb<double,typename P_expr2::T_numtype> > >
scalb(double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_scalb<double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_scalb<long double,P_numtype2> > >
scalb(long double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_scalb<long double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_scalb<long double,typename P_expr2::T_numtype> > >
scalb(long double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_scalb<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2));
}
template<class T1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_scalb<complex<T1> ,P_numtype2> > >
scalb(complex<T1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_scalb<complex<T1> ,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2._bz_getRef()));
}
template<class T1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_scalb<complex<T1> ,typename P_expr2::T_numtype> > >
scalb(complex<T1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_scalb<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2));
}
#endif
/**************************************************************************
**
* sin * sin
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_sin<P_numtype1> > > _bz_sin<P_numtype1> > >
sin(const Matrix<P_numtype1, P_struct1>& d1) sin(const Matrix<P_numtype1, P_struct1>& d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_sin<P_numtype1> > T_expr; _bz_sin<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_sin<_bz_typename P_expr1::T_numtype> > > _bz_sin<typename P_expr1::T_numtype> > >
sin(_bz_MatExpr<P_expr1> d1) sin(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_sin<_bz_typename P_expr1::T_numtype> > T_expr; _bz_sin<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* sinh * sinh
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
skipping to change at line 985 skipping to change at line 3631
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_sinh<P_numtype1> > T_expr; _bz_sinh<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_sinh<_bz_typename P_expr1::T_numtype> > > _bz_sinh<typename P_expr1::T_numtype> > >
sinh(_bz_MatExpr<P_expr1> d1) sinh(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_sinh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_sinh<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* sqr * sqr
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
skipping to change at line 1013 skipping to change at line 3659
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_sqr<P_numtype1> > T_expr; _bz_sqr<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_sqr<_bz_typename P_expr1::T_numtype> > > _bz_sqr<typename P_expr1::T_numtype> > >
sqr(_bz_MatExpr<P_expr1> d1) sqr(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_sqr<_bz_typename P_expr1::T_numtype> > T_expr; _bz_sqr<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* sqrt * sqrt
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
skipping to change at line 1041 skipping to change at line 3687
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_sqrt<P_numtype1> > T_expr; _bz_sqrt<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_sqrt<_bz_typename P_expr1::T_numtype> > > _bz_sqrt<typename P_expr1::T_numtype> > >
sqrt(_bz_MatExpr<P_expr1> d1) sqrt(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_sqrt<_bz_typename P_expr1::T_numtype> > T_expr; _bz_sqrt<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* tan * tan
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
skipping to change at line 1069 skipping to change at line 3715
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_tan<P_numtype1> > T_expr; _bz_tan<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_tan<_bz_typename P_expr1::T_numtype> > > _bz_tan<typename P_expr1::T_numtype> > >
tan(_bz_MatExpr<P_expr1> d1) tan(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_tan<_bz_typename P_expr1::T_numtype> > T_expr; _bz_tan<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* tanh * tanh
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
skipping to change at line 1097 skipping to change at line 3743
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_tanh<P_numtype1> > T_expr; _bz_tanh<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_tanh<_bz_typename P_expr1::T_numtype> > > _bz_tanh<typename P_expr1::T_numtype> > >
tanh(_bz_MatExpr<P_expr1> d1) tanh(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_tanh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_tanh<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
/************************************************************************** ** /************************************************************************** **
* uitrunc * uitrunc
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
skipping to change at line 1126 skipping to change at line 3772
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_uitrunc<P_numtype1> > T_expr; _bz_uitrunc<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_uitrunc<_bz_typename P_expr1::T_numtype> > > _bz_uitrunc<typename P_expr1::T_numtype> > >
uitrunc(_bz_MatExpr<P_expr1> d1) uitrunc(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_uitrunc<_bz_typename P_expr1::T_numtype> > T_expr; _bz_uitrunc<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* unordered
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_struct1, class P_numtype2, class P_struc
t2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_unordered<P_numtype1,P_numtype2> > >
unordered(const Matrix<P_numtype1, P_struct1>& d1, const Matrix<P_numtype2,
P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatrixR
ef<P_numtype2, P_struct2>,
_bz_unordered<P_numtype1,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2._bz_getRef()));
}
template<class P_numtype1, class P_struct1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_unordered<P_numtype1,typename P_expr2::T_numtype> > >
unordered(const Matrix<P_numtype1, P_struct1>& d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
<P_expr2>,
_bz_unordered<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), d2));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_unordered<P_numtype1,int> > >
unordered(const Matrix<P_numtype1, P_struct1>& d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<int>,
_bz_unordered<P_numtype1,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
int>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_unordered<P_numtype1,float> > >
unordered(const Matrix<P_numtype1, P_struct1>& d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<float>,
_bz_unordered<P_numtype1,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
float>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_unordered<P_numtype1,double> > >
unordered(const Matrix<P_numtype1, P_struct1>& d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<double>,
_bz_unordered<P_numtype1,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
double>(d2)));
}
template<class P_numtype1, class P_struct1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_unordered<P_numtype1,long double> > >
unordered(const Matrix<P_numtype1, P_struct1>& d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<long double>,
_bz_unordered<P_numtype1,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
long double>(d2)));
}
template<class P_numtype1, class P_struct1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_unordered<P_numtype1,complex<T2> > > >
unordered(const Matrix<P_numtype1, P_struct1>& d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr
Constant<complex<T2> > ,
_bz_unordered<P_numtype1,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef(), _bz_MatExprConstant<
complex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_unordered<typename P_expr1::T_numtype,P_numtype2> > >
unordered(_bz_MatExpr<P_expr1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatrixRef<P_numtype2, P
_struct2>,
_bz_unordered<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2._bz_getRef()));
}
template<class P_expr1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_unordered<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> >
unordered(_bz_MatExpr<P_expr1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<P_expr2>,
_bz_unordered<typename P_expr1::T_numtype,typename P_expr2::T_numty
pe> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_unordered<typename P_expr1::T_numtype,int> > >
unordered(_bz_MatExpr<P_expr1> d1, int d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<int>,
_bz_unordered<typename P_expr1::T_numtype,int> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_unordered<typename P_expr1::T_numtype,float> > >
unordered(_bz_MatExpr<P_expr1> d1, float d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<float>,
_bz_unordered<typename P_expr1::T_numtype,float> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_unordered<typename P_expr1::T_numtype,double> > >
unordered(_bz_MatExpr<P_expr1> d1, double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<double>
,
_bz_unordered<typename P_expr1::T_numtype,double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_unordered<typename P_expr1::T_numtype,long double> > >
unordered(_bz_MatExpr<P_expr1> d1, long double d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<long do
uble>,
_bz_unordered<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_unordered<typename P_expr1::T_numtype,complex<T2> > > >
unordered(_bz_MatExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_MatExprOp<_bz_MatExpr<P_expr1>, _bz_MatExprConstant<complex
<T2> > ,
_bz_unordered<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1, _bz_MatExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_unordered<int,P_numtype2> > >
unordered(int d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatrixRef<P_numtype
2, P_struct2>,
_bz_unordered<int,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2._bz_
getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_unordered<int,typename P_expr2::T_numtype> > >
unordered(int d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<int>, _bz_MatExpr<P_expr2>,
_bz_unordered<int,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<int>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_unordered<float,P_numtype2> > >
unordered(float d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatrixRef<P_numty
pe2, P_struct2>,
_bz_unordered<float,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2._b
z_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_unordered<float,typename P_expr2::T_numtype> > >
unordered(float d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<float>, _bz_MatExpr<P_expr2>,
_bz_unordered<float,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<float>(d1), d2));
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_unordered<double,P_numtype2> > >
unordered(double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatrixRef<P_numt
ype2, P_struct2>,
_bz_unordered<double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2._
bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_unordered<double,typename P_expr2::T_numtype> > >
unordered(double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<double>, _bz_MatExpr<P_expr2>
,
_bz_unordered<double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_unordered<long double,P_numtype2> > >
unordered(long double d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatrixRef<P
_numtype2, P_struct2>,
_bz_unordered<long double,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2._bz_getRef()));
}
template<class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_unordered<long double,typename P_expr2::T_numtype> > >
unordered(long double d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<long double>, _bz_MatExpr<P_e
xpr2>,
_bz_unordered<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<long double>(d1),
d2));
}
template<class T1, class P_numtype2, class P_struct2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_unordered<complex<T1> ,P_numtype2> > >
unordered(complex<T1> d1, const Matrix<P_numtype2, P_struct2>& d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatrixRef
<P_numtype2, P_struct2>,
_bz_unordered<complex<T1> ,P_numtype2> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2._bz_getRef()));
}
template<class T1, class P_expr2>
inline
_bz_MatExpr<_bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_unordered<complex<T1> ,typename P_expr2::T_numtype> > >
unordered(complex<T1> d1, _bz_MatExpr<P_expr2> d2)
{
typedef _bz_MatExprOp<_bz_MatExprConstant<complex<T1> > , _bz_MatExpr<P
_expr2>,
_bz_unordered<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(_bz_MatExprConstant<complex<T1> > (d1
), d2));
}
#endif
/**************************************************************************
**
* y0 * y0
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1, class P_struct1> template<class P_numtype1, class P_struct1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_y0<P_numtype1> > > _bz_y0<P_numtype1> > >
y0(const Matrix<P_numtype1, P_struct1>& d1) y0(const Matrix<P_numtype1, P_struct1>& d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_y0<P_numtype1> > T_expr; _bz_y0<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_y0<_bz_typename P_expr1::T_numtype> > > _bz_y0<typename P_expr1::T_numtype> > >
y0(_bz_MatExpr<P_expr1> d1) y0(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_y0<_bz_typename P_expr1::T_numtype> > T_expr; _bz_y0<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* y1 * y1
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 1188 skipping to change at line 4129
{ {
typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>, typedef _bz_MatExprUnaryOp<_bz_MatrixRef<P_numtype1, P_struct1>,
_bz_y1<P_numtype1> > T_expr; _bz_y1<P_numtype1> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef())); return _bz_MatExpr<T_expr>(T_expr(d1._bz_getRef()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, _bz_MatExpr<_bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_y1<_bz_typename P_expr1::T_numtype> > > _bz_y1<typename P_expr1::T_numtype> > >
y1(_bz_MatExpr<P_expr1> d1) y1(_bz_MatExpr<P_expr1> d1)
{ {
typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>, typedef _bz_MatExprUnaryOp<_bz_MatExpr<P_expr1>,
_bz_y1<_bz_typename P_expr1::T_numtype> > T_expr; _bz_y1<typename P_expr1::T_numtype> > T_expr;
return _bz_MatExpr<T_expr>(T_expr(d1)); return _bz_MatExpr<T_expr>(T_expr(d1));
} }
#endif #endif
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_MATUOPS_H #endif // BZ_MATUOPS_H
 End of changes. 88 change blocks. 
81 lines changed or deleted 3616 lines changed or added


 matutri.h   matutri.h 
/************************************************************************** * /************************************************************************** *
* blitz/matutri.h Declarations for UpperTriangular matrices * blitz/matutri.h Declarations for UpperTriangular matrices
* *
* $Id: matutri.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: matutri.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matutri.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*/
#ifndef BZ_MATUTRI_H #ifndef BZ_MATUTRI_H
#define BZ_MATUTRI_H #define BZ_MATUTRI_H
#ifndef BZ_MSTRUCT_H #ifndef BZ_MSTRUCT_H
#error <blitz/matutri.h> must be included via <blitz/mstruct.h> #error <blitz/matutri.h> must be included via <blitz/mstruct.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
skipping to change at line 69 skipping to change at line 53
UpperTriangularIterator(unsigned rows, unsigned cols) UpperTriangularIterator(unsigned rows, unsigned cols)
{ {
BZPRECONDITION(rows == cols); BZPRECONDITION(rows == cols);
size_ = rows; size_ = rows;
good_ = true; good_ = true;
offset_ = 0; offset_ = 0;
i_ = 0; i_ = 0;
j_ = 0; j_ = 0;
} }
operator _bz_bool() const operator bool() const { return good_; }
{ return good_; }
void operator++() void operator++()
{ {
BZPRECONDITION(good_); BZPRECONDITION(good_);
++offset_; ++offset_;
++i_; ++i_;
if (i_ > j_) if (i_ > j_)
{ {
i_ = 0; i_ = 0;
++j_; ++j_;
skipping to change at line 97 skipping to change at line 80
{ return i_; } { return i_; }
unsigned col() const unsigned col() const
{ return j_; } { return j_; }
unsigned offset() const unsigned offset() const
{ return offset_; } { return offset_; }
protected: protected:
unsigned size_; unsigned size_;
_bz_bool good_; bool good_;
unsigned offset_; unsigned offset_;
unsigned i_, j_; unsigned i_, j_;
}; };
class UpperTriangular : public MatrixStructure { class UpperTriangular : public MatrixStructure {
public: public:
typedef UpperTriangularIterator T_iterator; typedef UpperTriangularIterator T_iterator;
UpperTriangular() UpperTriangular()
skipping to change at line 134 skipping to change at line 117
unsigned coordToOffset(unsigned i, unsigned j) const unsigned coordToOffset(unsigned i, unsigned j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
BZPRECONDITION(j >= i); BZPRECONDITION(j >= i);
return j*(j+1)/2 + i; return j*(j+1)/2 + i;
} }
unsigned firstInRow(unsigned i) const unsigned firstInRow(unsigned i) const
{ return 0; } { return 0; }
template<class T_numtype> template<typename T_numtype>
T_numtype get(const T_numtype * _bz_restrict data, T_numtype get(const T_numtype * restrict data,
unsigned i, unsigned j) const unsigned i, unsigned j) const
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
if (j >= i) if (j >= i)
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
else else
return ZeroElement<T_numtype>::zero(); return ZeroElement<T_numtype>::zero();
} }
template<class T_numtype> template<typename T_numtype>
T_numtype& get(T_numtype * _bz_restrict data, unsigned i, unsigned j) T_numtype& get(T_numtype * restrict data, unsigned i, unsigned j)
{ {
BZPRECONDITION(inRange(i,j)); BZPRECONDITION(inRange(i,j));
if (j >= i) if (j >= i)
return data[coordToOffset(i,j)]; return data[coordToOffset(i,j)];
else else
return ZeroElement<T_numtype>::zero(); return ZeroElement<T_numtype>::zero();
} }
unsigned lastInRow(unsigned i) const unsigned lastInRow(unsigned i) const
{ return size_ - 1; } { return size_ - 1; }
unsigned firstInCol(unsigned j) const unsigned firstInCol(unsigned j) const
{ return 0; } { return 0; }
unsigned lastInCol(unsigned j) const unsigned lastInCol(unsigned j) const
{ return j; } { return j; }
_bz_bool inRange(unsigned i, unsigned j) const bool inRange(const unsigned i,const unsigned j) const { return (i<size_
{ ) && (j<size_); }
return (i < size_) && (j < size_);
}
unsigned numElements() const unsigned numElements() const { return size_ * (size_ + 1) / 2; }
{ return size_ * (size_ + 1) / 2; }
unsigned rows() const unsigned rows() const { return size_; }
{ return size_; }
void resize(unsigned size) void resize(const unsigned size) { size_ = size; }
{
size_ = size;
}
void resize(unsigned rows, unsigned cols) void resize(const unsigned rows,const unsigned cols) {
{
BZPRECONDITION(rows == cols); BZPRECONDITION(rows == cols);
size_ = rows; size_ = rows;
} }
private: private:
unsigned size_; unsigned size_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 11 change blocks. 
40 lines changed or deleted 15 lines changed or added


 matvec.h   matvec.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/tiny/matvec.h TinyMatrix/TinyVector product metaprogram * blitz/tiny/matvec.h TinyMatrix/TinyVector product metaprogram
* *
* $Id: matvec.h,v 1.2 2001/01/24 20:22:51 tveldhui Exp $ * $Id: matvec.h,v 1.5 2005/05/07 04:17:57 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: matvec.h,v $
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:08:44 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_META_MATVEC_H #ifndef BZ_META_MATVEC_H
#define BZ_META_MATVEC_H #define BZ_META_MATVEC_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
#ifndef BZ_VECEXPRWRAP_H #ifndef BZ_VECEXPRWRAP_H
#include <blitz/vecexprwrap.h> #include <blitz/vecexprwrap.h>
skipping to change at line 65 skipping to change at line 49
#include <blitz/meta/metaprog.h> #include <blitz/meta/metaprog.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Forward declarations // Forward declarations
template<int N_rows, int N_columns, int N_rowStride, int N_colStride, template<int N_rows, int N_columns, int N_rowStride, int N_colStride,
int N_vecStride, int J> int N_vecStride, int J>
class _bz_meta_matrixVectorProduct2; class _bz_meta_matrixVectorProduct2;
template<class T_numtype1, class T_numtype2, int N_rows, int N_columns, template<typename T_numtype1, typename T_numtype2, int N_rows, int N_column s,
int N_rowStride, int N_colStride, int N_vecStride> int N_rowStride, int N_colStride, int N_vecStride>
class _bz_tinyMatrixVectorProduct { class _bz_tinyMatrixVectorProduct {
public: public:
typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype; typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype;
_bz_tinyMatrixVectorProduct(const _bz_tinyMatrixVectorProduct<T_numtype 1, _bz_tinyMatrixVectorProduct(const _bz_tinyMatrixVectorProduct<T_numtype 1,
T_numtype2, N_rows, N_columns, N_rowStride, N_colStride, T_numtype2, N_rows, N_columns, N_rowStride, N_colStride,
N_vecStride>& z) N_vecStride>& z)
: matrix_(z.matrix_), vector_(z.vector_) : matrix_(z.matrix_), vector_(z.vector_)
{ } { }
skipping to change at line 94 skipping to change at line 78
return _bz_meta_matrixVectorProduct2<N_rows, N_columns, N_rowStride , return _bz_meta_matrixVectorProduct2<N_rows, N_columns, N_rowStride ,
N_colStride, N_vecStride, 0>::f(matrix_, vector_, i); N_colStride, N_vecStride, 0>::f(matrix_, vector_, i);
} }
T_numtype operator()(unsigned i) const T_numtype operator()(unsigned i) const
{ {
return _bz_meta_matrixVectorProduct2<N_rows, N_columns, N_rowStride , return _bz_meta_matrixVectorProduct2<N_rows, N_columns, N_rowStride ,
N_colStride, N_vecStride, 0>::f(matrix_, vector_, i); N_colStride, N_vecStride, 0>::f(matrix_, vector_, i);
} }
enum { static const int
_bz_staticLengthCount = 1, _bz_staticLengthCount = 1,
_bz_dynamicLengthCount = 0, _bz_dynamicLengthCount = 0,
_bz_staticLength = N_rows _bz_staticLength = N_rows;
#ifdef BZ_HAVE_COSTS #ifdef BZ_HAVE_COSTS
, static const int
_bz_costPerEval = 2 * N_columns * costs::memoryAccess _bz_costPerEval = 2 * N_columns * costs::memoryAccess
+ (N_columns-1) * costs::add + (N_columns-1) * costs::add;
#endif #endif
};
unsigned _bz_suggestLength() const unsigned _bz_suggestLength() const
{ {
return N_rows; return N_rows;
} }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return _bz_true; } { return true; }
T_numtype _bz_fastAccess(unsigned i) const T_numtype _bz_fastAccess(unsigned i) const
{ {
return _bz_meta_matrixVectorProduct2<N_rows, N_columns, N_rowStride , return _bz_meta_matrixVectorProduct2<N_rows, N_columns, N_rowStride ,
N_colStride, N_vecStride, 0>::f(matrix_, vector_, i); N_colStride, N_vecStride, 0>::f(matrix_, vector_, i);
} }
unsigned length(unsigned recommendedLength) const unsigned length(unsigned recommendedLength) const
{ return N_rows; } { return N_rows; }
skipping to change at line 135 skipping to change at line 117
{ return matrix_; } { return matrix_; }
const T_numtype2* vector() const const T_numtype2* vector() const
{ return vector_; } { return vector_; }
protected: protected:
const T_numtype1* matrix_; const T_numtype1* matrix_;
const T_numtype2* vector_; const T_numtype2* vector_;
}; };
template<class T_numtype1, class T_numtype2, int N_rows, int N_columns> template<typename T_numtype1, typename T_numtype2, int N_rows, int N_column s>
inline _bz_VecExpr<_bz_tinyMatrixVectorProduct<T_numtype1, T_numtype2, inline _bz_VecExpr<_bz_tinyMatrixVectorProduct<T_numtype1, T_numtype2,
N_rows, N_columns, N_columns, 1, 1> > N_rows, N_columns, N_columns, 1, 1> >
product(const TinyMatrix<T_numtype1, N_rows, N_columns>& matrix, product(const TinyMatrix<T_numtype1, N_rows, N_columns>& matrix,
const TinyVector<T_numtype2, N_columns>& vector) const TinyVector<T_numtype2, N_columns>& vector)
{ {
typedef _bz_tinyMatrixVectorProduct<T_numtype1, T_numtype2, N_rows, typedef _bz_tinyMatrixVectorProduct<T_numtype1, T_numtype2, N_rows,
N_columns, N_columns, 1, 1> T_expr; N_columns, N_columns, 1, 1> T_expr;
return _bz_VecExpr<T_expr>(T_expr(matrix.data(), vector.data())); return _bz_VecExpr<T_expr>(T_expr(matrix.data(), vector.data()));
} }
// Template metaprogram for matrix-vector multiplication // Template metaprogram for matrix-vector multiplication
template<int N_rows, int N_columns, int N_rowStride, int N_colStride, template<int N_rows, int N_columns, int N_rowStride, int N_colStride,
int N_vecStride, int J> int N_vecStride, int J>
class _bz_meta_matrixVectorProduct2 { class _bz_meta_matrixVectorProduct2 {
public: public:
enum { go = J < (N_columns-1) }; static const int go = J < (N_columns-1) ? 1 : 0;
template<class T_numtype1, class T_numtype2> template<typename T_numtype1, typename T_numtype2>
static inline BZ_PROMOTE(T_numtype1, T_numtype2) static inline BZ_PROMOTE(T_numtype1, T_numtype2)
f(const T_numtype1* matrix, const T_numtype2* vector, int i) f(const T_numtype1* matrix, const T_numtype2* vector, int i)
{ {
return matrix[i * N_rowStride + J * N_colStride] return matrix[i * N_rowStride + J * N_colStride]
* vector[J * N_vecStride] * vector[J * N_vecStride]
+ _bz_meta_matrixVectorProduct2<N_rows * go, N_columns * go, + _bz_meta_matrixVectorProduct2<N_rows * go, N_columns * go,
N_rowStride * go, N_colStride * go, N_vecStride * go, (J+1) *go> N_rowStride * go, N_colStride * go, N_vecStride * go, (J+1) *go>
::f(matrix, vector, i); ::f(matrix, vector, i);
} }
skipping to change at line 180 skipping to change at line 162
class _bz_meta_matrixVectorProduct2<0,0,0,0,0,0> { class _bz_meta_matrixVectorProduct2<0,0,0,0,0,0> {
public: public:
static inline _bz_meta_nullOperand f(const void*, const void*, int) static inline _bz_meta_nullOperand f(const void*, const void*, int)
{ return _bz_meta_nullOperand(); } { return _bz_meta_nullOperand(); }
}; };
template<int N_rows, int N_columns, int N_rowStride, int N_colStride, template<int N_rows, int N_columns, int N_rowStride, int N_colStride,
int N_vecStride, int I> int N_vecStride, int I>
class _bz_meta_matrixVectorProduct { class _bz_meta_matrixVectorProduct {
public: public:
enum { go = I < (N_rows - 1) }; static const int go = I < (N_rows - 1) ? 1 : 0;
template<class T_numtype1, class T_numtype2, class T_numtype3> template<typename T_numtype1, typename T_numtype2, typename T_numtype3>
static inline void f(TinyVector<T_numtype3, N_rows>& result, static inline void f(TinyVector<T_numtype3, N_rows>& result,
const T_numtype1* matrix, const T_numtype2* vector) const T_numtype1* matrix, const T_numtype2* vector)
{ {
result[I] = _bz_meta_matrixVectorProduct2<N_rows, N_columns, result[I] = _bz_meta_matrixVectorProduct2<N_rows, N_columns,
N_rowStride, N_colStride, N_vecStride, 0>::f(matrix,vector, I); N_rowStride, N_colStride, N_vecStride, 0>::f(matrix,vector, I);
_bz_meta_matrixVectorProduct<N_rows * go, N_columns * go, _bz_meta_matrixVectorProduct<N_rows * go, N_columns * go,
N_rowStride * go, N_colStride * go, N_vecStride * go, (I+1)*go> N_rowStride * go, N_colStride * go, N_vecStride * go, (I+1)*go>
::f(result, matrix, vector); ::f(result, matrix, vector);
} }
 End of changes. 15 change blocks. 
34 lines changed or deleted 16 lines changed or added


 memblock.cc   memblock.cc 
/* /*
* $Id: memblock.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $
*
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: memblock.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_MEMBLOCK_CC #ifndef BZ_MEMBLOCK_CC
#define BZ_MEMBLOCK_CC #define BZ_MEMBLOCK_CC
#ifndef BZ_MEMBLOCK_H #include <blitz/numtrait.h>
#include <blitz/memblock.h>
#endif
#ifndef BZ_NUMTRAIT_H
#include <blitz/numtrait.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Null memory block for each (template) instantiation of MemoryBlockRefere nce // Null memory block for each (template) instantiation of MemoryBlockRefere nce
template<class P_type> template<typename P_type>
NullMemoryBlock<P_type> MemoryBlockReference<P_type>::nullBlock_; NullMemoryBlock<P_type> MemoryBlockReference<P_type>::nullBlock_;
template<class P_type> template<typename P_type>
void MemoryBlock<P_type>::deallocate() void MemoryBlock<P_type>::deallocate()
{ {
#ifndef BZ_ALIGN_BLOCKS_ON_CACHELINE_BOUNDARY #ifndef BZ_ALIGN_BLOCKS_ON_CACHELINE_BOUNDARY
delete [] dataBlockAddress_; delete [] dataBlockAddress_;
#else #else
if (!NumericTypeTraits<T_type>::hasTrivialCtor) { if (!NumericTypeTraits<T_type>::hasTrivialCtor) {
for (int i=0; i < length_; ++i) for (int i=0; i < length_; ++i)
data_[i].~T_type(); data_[i].~T_type();
delete [] reinterpret_cast<char*>(dataBlockAddress_); delete [] reinterpret_cast<char*>(dataBlockAddress_);
} }
else { else {
delete [] dataBlockAddress_; delete [] dataBlockAddress_;
} }
#endif #endif
} }
template<class P_type> template<typename P_type>
inline void MemoryBlock<P_type>::allocate(int length) inline void MemoryBlock<P_type>::allocate(size_t length)
{ {
TAU_TYPE_STRING(p1, "MemoryBlock<T>::allocate() [T=" TAU_TYPE_STRING(p1, "MemoryBlock<T>::allocate() [T="
+ CT(P_type) + "]"); + CT(P_type) + "]");
TAU_PROFILE(p1, "void ()", TAU_BLITZ); TAU_PROFILE(p1, "void ()", TAU_BLITZ);
#ifndef BZ_ALIGN_BLOCKS_ON_CACHELINE_BOUNDARY #ifndef BZ_ALIGN_BLOCKS_ON_CACHELINE_BOUNDARY
data_ = new T_type[length]; dataBlockAddress_ = new T_type[length];
dataBlockAddress_ = data_; data_ = dataBlockAddress_;
#else #else
int numBytes = length * sizeof(T_type); size_t numBytes = length * sizeof(T_type);
if (numBytes < 1024) if (numBytes < 1024)
{ {
data_ = new T_type[length]; dataBlockAddress_ = new T_type[length];
dataBlockAddress_ = data_; data_ = dataBlockAddress_;
} }
else else
{ {
// We're allocating a large array. For performance reasons, // We're allocating a large array. For performance reasons,
// it's advantageous to force the array to start on a // it's advantageous to force the array to start on a
// cache line boundary. We do this by allocating a little // cache line boundary. We do this by allocating a little
// more memory than necessary, then shifting the pointer // more memory than necessary, then shifting the pointer
// to the next cache line boundary. // to the next cache line boundary.
// Patches by Petter Urkedal to support types with nontrivial // Patches by Petter Urkedal to support types with nontrivial
// constructors. // constructors.
const int cacheBlockSize = 128; // Will work for 32, 16 also const int cacheBlockSize = 128; // Will work for 32, 16 also
dataBlockAddress_ = reinterpret_cast<T_type*> dataBlockAddress_ = reinterpret_cast<T_type*>
(new char[numBytes + cacheBlockSize - 1]); (new char[numBytes + cacheBlockSize - 1]);
// Shift to the next cache line boundary // Shift to the next cache line boundary
ptrdiff_t offset = ptrdiff_t(dataBlockAddress_) % cacheBlockSize; ptrdiff_t offset = ptrdiff_t(dataBlockAddress_) % cacheBlockSize;
int shift = (offset == 0) ? 0 : (cacheBlockSize - offset); ptrdiff_t shift = (offset == 0) ? 0 : (cacheBlockSize - offset);
data_ = (T_type*)(((char *)dataBlockAddress_) + shift); data_ = reinterpret_cast<T_type*>
(reinterpret_cast<char*>(dataBlockAddress_) + shift);
// Use placement new to construct types with nontrival ctors // Use placement new to construct types with nontrival ctors
if (!NumericTypeTraits<T_type>::hasTrivialCtor) { if (!NumericTypeTraits<T_type>::hasTrivialCtor) {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
new(&data_[i]) T_type; new(&data_[i]) T_type;
} }
} }
#endif #endif
} }
 End of changes. 10 change blocks. 
33 lines changed or deleted 13 lines changed or added


 memblock.h   memblock.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/memblock.h MemoryBlock<T> and MemoryBlockReference<T> * blitz/memblock.h MemoryBlock<T> and MemoryBlockReference<T>
* *
* $Id: memblock.h,v 1.9 2002/07/19 20:42:53 jcumming Exp $ * $Id: memblock.h,v 1.18 2005/10/11 21:54:57 julianc Exp $
* *
* Copyright (C) 1997-1999 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-1999 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: memblock.h,v $
* Revision 1.9 2002/07/19 20:42:53 jcumming
* Removed ending semicolon after invocations of BZ_MUTEX_* macros. This
* is now handled within the definition of these macros. This should get
* rid of compiler warnings from SGI CC and others about extra semicolons
* being ignored, which happened when these macros were defined as blank.
*
* Revision 1.8 2002/07/17 22:10:09 jcumming
* Added missing semicolon after use of BZ_MUTEX_DECLARE macro.
*
* Revision 1.7 2002/05/27 19:35:37 jcumming
* Changed this->addReference() to MemoryBlock<P_type>::addReference().
* Use base class name as scoping qualifier rather than "this" pointer.
*
* Revision 1.6 2002/03/06 18:07:42 patricg
*
* in the constructor
* MemoryBlock(size_t length, T_type* _bz_restrict data)
* dataBlockAddress_ = data replaced by dataBlockAddress_ = 0
* as it was before. (testsuite/extract does not crash then)
*
* Revision 1.5 2002/02/28 23:38:20 tveldhui
* Fixed extra semicolon problem with KCC
*
* Revision 1.4 2001/02/04 16:32:28 tveldhui
* Made memory block reference counting (optionally) threadsafe when
* BZ_THREADSAFE is defined. Currently uses pthread mutex.
* When compiling with gcc -pthread, _REENTRANT automatically causes
* BZ_THREADSAFE to be enabled.
*
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.8 1998/12/06 00:00:35 tveldhui
* Prior to adding UnownedMemoryBlock
*
* Revision 1.7 1998/06/15 16:07:01 tveldhui
* When a memory block is created from an existing block of data,
* add an additional reference count so that makeUnique() will
* create a copy of the data.
*
* Revision 1.6 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.5 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.4 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.3 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
* Revision 1.1 1996/11/11 17:29:13 tveldhui
* Initial revision
*
*
**************************************************************************
*
*
*/
#ifndef __BZ_MEMBLOCK_H__
#define __BZ_MEMBLOCK_H__
#ifndef BZ_BLITZ_H #ifndef BZ_MEMBLOCK_H
#include <blitz/blitz.h> #define BZ_MEMBLOCK_H
#endif
#ifndef BZ_NUMTRAIT_H #include <blitz/blitz.h>
#include <blitz/numtrait.h>
#endif
#include <stddef.h> // ptrdiff_t #include <stddef.h> // ptrdiff_t
#ifdef BZ_THREADSAFE #ifdef BZ_THREADSAFE
#include <pthread.h> #include <pthread.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
enum preexistingMemoryPolicy { enum preexistingMemoryPolicy {
duplicateData, duplicateData,
deleteDataWhenDone, deleteDataWhenDone,
neverDeleteData neverDeleteData
}; };
// Forward declaration of MemoryBlockReference // Forward declaration of MemoryBlockReference
template<class T_type> class MemoryBlockReference; template<typename T_type> class MemoryBlockReference;
// Class MemoryBlock provides a reference-counted block of memory. This bl ock // Class MemoryBlock provides a reference-counted block of memory. This bl ock
// may be referred to by multiple vector, matrix and array objects. The me mory // may be referred to by multiple vector, matrix and array objects. The me mory
// is automatically deallocated when the last referring object is destructe d. // is automatically deallocated when the last referring object is destructe d.
// MemoryBlock may be subclassed to provide special allocators. // MemoryBlock may be subclassed to provide special allocators.
template<class P_type> template<typename P_type>
class MemoryBlock { class MemoryBlock {
friend class MemoryBlockReference<P_type>; friend class MemoryBlockReference<P_type>;
public: public:
typedef P_type T_type; typedef P_type T_type;
protected: protected:
MemoryBlock() MemoryBlock()
{ {
length_ = 0; length_ = 0;
data_ = 0; data_ = 0;
dataBlockAddress_ = 0; dataBlockAddress_ = 0;
references_ = 0; references_ = 0;
BZ_MUTEX_INIT(mutex) BZ_MUTEX_INIT(mutex)
} }
_bz_explicit MemoryBlock(size_t items) explicit MemoryBlock(size_t items)
{ {
length_ = items; length_ = items;
allocate(length_); allocate(length_);
#ifdef BZ_DEBUG_LOG_ALLOCATIONS #ifdef BZ_DEBUG_LOG_ALLOCATIONS
cout << "MemoryBlock: allocated " << setw(8) << length_ cout << "MemoryBlock: allocated " << setw(8) << length_
<< " at " << ((void *)dataBlockAddress_) << endl; << " at " << ((void *)dataBlockAddress_) << endl;
#endif #endif
BZASSERT(dataBlockAddress_ != 0); BZASSERT(dataBlockAddress_ != 0);
references_ = 0; references_ = 0;
BZ_MUTEX_INIT(mutex) BZ_MUTEX_INIT(mutex)
} }
MemoryBlock(size_t length, T_type* _bz_restrict data) MemoryBlock(size_t length, T_type* data)
{ {
length_ = length; length_ = length;
data_ = data; data_ = data;
dataBlockAddress_ = 0; dataBlockAddress_ = data;
references_ = 0; references_ = 0;
BZ_MUTEX_INIT(mutex) BZ_MUTEX_INIT(mutex)
} }
virtual ~MemoryBlock() virtual ~MemoryBlock()
{ {
if (dataBlockAddress_) if (dataBlockAddress_)
{ {
#ifdef BZ_DEBUG_LOG_ALLOCATIONS #ifdef BZ_DEBUG_LOG_ALLOCATIONS
skipping to change at line 196 skipping to change at line 128
#ifdef BZ_DEBUG_LOG_REFERENCES #ifdef BZ_DEBUG_LOG_REFERENCES
cout << "MemoryBlock: reffed " << setw(8) << length_ cout << "MemoryBlock: reffed " << setw(8) << length_
<< " at " << ((void *)dataBlockAddress_) << " (r=" << " at " << ((void *)dataBlockAddress_) << " (r="
<< (int)references_ << ")" << endl; << (int)references_ << ")" << endl;
#endif #endif
BZ_MUTEX_UNLOCK(mutex) BZ_MUTEX_UNLOCK(mutex)
} }
T_type* _bz_restrict data() T_type* restrict data()
{ {
return data_; return data_;
} }
const T_type* _bz_restrict data() const const T_type* restrict data() const
{ {
return data_; return data_;
} }
T_type*& dataBlockAddress()
{
return dataBlockAddress_;
}
size_t length() const size_t length() const
{ {
return length_; return length_;
} }
int removeReference() int removeReference()
{ {
BZ_MUTEX_LOCK(mutex) BZ_MUTEX_LOCK(mutex)
int refcount = --references_; int refcount = --references_;
skipping to change at line 236 skipping to change at line 173
int references() const int references() const
{ {
BZ_MUTEX_LOCK(mutex) BZ_MUTEX_LOCK(mutex)
int refcount = references_; int refcount = references_;
BZ_MUTEX_UNLOCK(mutex) BZ_MUTEX_UNLOCK(mutex)
return refcount; return refcount;
} }
protected: protected:
inline void allocate(int length); inline void allocate(size_t length);
void deallocate(); void deallocate();
private: // Disabled member functions private: // Disabled member functions
MemoryBlock(const MemoryBlock<T_type>&) MemoryBlock(const MemoryBlock<T_type>&)
{ } { }
void operator=(const MemoryBlock<T_type>&) void operator=(const MemoryBlock<T_type>&)
{ } { }
private: // Data members private: // Data members
T_type * _bz_restrict data_; T_type * restrict data_;
T_type * _bz_restrict dataBlockAddress_; T_type * dataBlockAddress_;
#ifdef BZ_DEBUG_REFERENCE_ROLLOVER #ifdef BZ_DEBUG_REFERENCE_ROLLOVER
volatile unsigned char references_; volatile unsigned char references_;
#else #else
volatile int references_; volatile int references_;
#endif #endif
BZ_MUTEX_DECLARE(mutex) BZ_MUTEX_DECLARE(mutex)
size_t length_; size_t length_;
}; };
template<class P_type> template<typename P_type>
class UnownedMemoryBlock : public MemoryBlock<P_type> { class UnownedMemoryBlock : public MemoryBlock<P_type> {
public: public:
UnownedMemoryBlock(size_t length, P_type* _bz_restrict data) UnownedMemoryBlock(size_t length, P_type* data)
: MemoryBlock<P_type>(length,data) : MemoryBlock<P_type>(length,data)
{ {
// This ensures that MemoryBlock destructor will not
// attempt to delete data
MemoryBlock<P_type>::dataBlockAddress() = 0;
} }
virtual ~UnownedMemoryBlock() virtual ~UnownedMemoryBlock()
{ {
} }
}; };
template<class P_type> template<typename P_type>
class NullMemoryBlock : public MemoryBlock<P_type> { class NullMemoryBlock : public MemoryBlock<P_type> {
public: public:
NullMemoryBlock() NullMemoryBlock()
{ {
// This ensures that the delete operator will not be invoked // This ensures that the delete operator will not be invoked
// on an instance of NullMemoryBlock in removeReference(). // on an instance of NullMemoryBlock in removeReference().
MemoryBlock<P_type>::addReference(); MemoryBlock<P_type>::addReference();
} }
virtual ~NullMemoryBlock() virtual ~NullMemoryBlock()
{ } { }
}; };
template<class P_type> template<typename P_type>
class MemoryBlockReference { class MemoryBlockReference {
public: public:
typedef P_type T_type; typedef P_type T_type;
protected: protected:
T_type * _bz_restrict data_; T_type * restrict data_;
private: private:
MemoryBlock<T_type>* block_; MemoryBlock<T_type>* block_;
static NullMemoryBlock<T_type> nullBlock_; static NullMemoryBlock<T_type> nullBlock_;
public: public:
MemoryBlockReference() MemoryBlockReference()
{ {
block_ = &nullBlock_; block_ = &nullBlock_;
block_->addReference(); block_->addReference();
data_ = 0; data_ = 0;
} }
MemoryBlockReference(MemoryBlockReference<T_type>& ref) MemoryBlockReference(MemoryBlockReference<T_type>& ref, size_t offset=0
{ )
block_ = ref.block_;
block_->addReference();
data_ = block_->data();
}
MemoryBlockReference(MemoryBlockReference<T_type>& ref, size_t offset)
{ {
block_ = ref.block_; block_ = ref.block_;
block_->addReference(); block_->addReference();
data_ = block_->data() + offset; data_ = ref.data_ + offset;
} }
MemoryBlockReference(size_t length, T_type* data, MemoryBlockReference(size_t length, T_type* data,
preexistingMemoryPolicy deletionPolicy) preexistingMemoryPolicy deletionPolicy)
{ {
// Create a memory block using already allocated memory. // Create a memory block using already allocated memory.
// Note: if the deletionPolicy is duplicateData, this must // Note: if the deletionPolicy is duplicateData, this must
// be handled by the leaf class. In MemoryBlockReference, // be handled by the leaf class. In MemoryBlockReference,
// this is treated as neverDeleteData; the leaf class (e.g. Array) // this is treated as neverDeleteData; the leaf class (e.g. Array)
skipping to change at line 348 skipping to change at line 281
block_->addReference(); block_->addReference();
#ifdef BZ_DEBUG_LOG_ALLOCATIONS #ifdef BZ_DEBUG_LOG_ALLOCATIONS
cout << "MemoryBlockReference: created MemoryBlock at " cout << "MemoryBlockReference: created MemoryBlock at "
<< ((void*)block_) << endl; << ((void*)block_) << endl;
#endif #endif
data_ = data; data_ = data;
} }
_bz_explicit MemoryBlockReference(size_t items) explicit MemoryBlockReference(size_t items)
{ {
block_ = new MemoryBlock<T_type>(items); block_ = new MemoryBlock<T_type>(items);
block_->addReference(); block_->addReference();
data_ = block_->data(); data_ = block_->data();
#ifdef BZ_DEBUG_LOG_ALLOCATIONS #ifdef BZ_DEBUG_LOG_ALLOCATIONS
cout << "MemoryBlockReference: created MemoryBlock at " cout << "MemoryBlockReference: created MemoryBlock at "
<< ((void*)block_) << endl; << ((void*)block_) << endl;
#endif #endif
skipping to change at line 395 skipping to change at line 328
protected: protected:
void changeToNullBlock() void changeToNullBlock()
{ {
blockRemoveReference(); blockRemoveReference();
block_ = &nullBlock_; block_ = &nullBlock_;
block_->addReference(); block_->addReference();
data_ = 0; data_ = 0;
} }
void changeBlock(MemoryBlockReference<T_type>& ref, size_t offset) void changeBlock(MemoryBlockReference<T_type>& ref, size_t offset=0)
{ {
blockRemoveReference(); blockRemoveReference();
block_ = ref.block_; block_ = ref.block_;
block_->addReference(); block_->addReference();
data_ = block_->data() + offset; data_ = ref.data_ + offset;
} }
void newBlock(size_t items) void newBlock(size_t items)
{ {
blockRemoveReference(); blockRemoveReference();
block_ = new MemoryBlock<T_type>(items); block_ = new MemoryBlock<T_type>(items);
block_->addReference(); block_->addReference();
data_ = block_->data(); data_ = block_->data();
#ifdef BZ_DEBUG_LOG_ALLOCATIONS #ifdef BZ_DEBUG_LOG_ALLOCATIONS
skipping to change at line 425 skipping to change at line 358
private: private:
void operator=(const MemoryBlockReference<T_type>&) void operator=(const MemoryBlockReference<T_type>&)
{ } { }
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#include <blitz/memblock.cc> #include <blitz/memblock.cc>
#endif // __BZ_MEMBLOCK_H__ #endif // BZ_MEMBLOCK_H
 End of changes. 27 change blocks. 
103 lines changed or deleted 36 lines changed or added


 metaprog.h   metaprog.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/meta/metaprog.h Useful metaprogram declarations * blitz/meta/metaprog.h Useful metaprogram declarations
* *
* $Id: metaprog.h,v 1.3 2001/01/26 21:34:59 tveldhui Exp $ * $Id: metaprog.h,v 1.6 2005/05/07 04:17:57 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: metaprog.h,v $
* Revision 1.3 2001/01/26 21:34:59 tveldhui
* Updated docs to reflect isnan -> blitz_isnan change
*
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:08:44 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_META_METAPROG_H #ifndef BZ_META_METAPROG_H
#define BZ_META_METAPROG_H #define BZ_META_METAPROG_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Null Operand // Null Operand
class _bz_meta_nullOperand { class _bz_meta_nullOperand {
public: public:
_bz_meta_nullOperand() { } _bz_meta_nullOperand() { }
}; };
template<class T> inline T operator+(const T& a, _bz_meta_nullOperand) template<typename T> inline T operator+(const T& a, _bz_meta_nullOperand)
{ return a; } { return a; }
template<class T> inline T operator*(const T& a, _bz_meta_nullOperand) template<typename T> inline T operator*(const T& a, _bz_meta_nullOperand)
{ return a; } { return a; }
// MetaMax // MetaMax
template<int N1, int N2> template<int N1, int N2>
class _bz_meta_max { class _bz_meta_max {
public: public:
enum { max = (N1 > N2) ? N1 : N2 }; static const int max = (N1 > N2) ? N1 : N2;
}; };
// MetaMin // MetaMin
template<int N1, int N2> template<int N1, int N2>
class _bz_meta_min { class _bz_meta_min {
public: public:
enum { min = (N1 < N2) ? N1 : N2 }; static const int min = (N1 < N2) ? N1 : N2;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_META_METAPROG_H #endif // BZ_META_METAPROG_H
 End of changes. 7 change blocks. 
24 lines changed or deleted 8 lines changed or added


 methods.cc   methods.cc 
/*
* $Id: methods.cc,v 1.7 2002/08/30 22:14:23 jcumming Exp $
*
* $Log: methods.cc,v $
* Revision 1.7 2002/08/30 22:14:23 jcumming
* Added definition of setStorage() method, which lets user set Array stora
ge
* format after construction. We check that Array is not allocated first.
*
* Revision 1.6 2002/06/27 00:15:35 jcumming
* Changed T_numtype to P_numtype when used outside the argument list or bo
dy
* of a member function definition (i.e., outside the class scope). Inside
* the class scope, we can use the typedef T_numtype. The IBM xlC compiler
* gets confused if P_numtype is used as a template parameter name in a mem
ber
* function declaration and then T_numtype is used as the parameter name in
* the member function definition. Fixed usage to be more consistent.
*
* Revision 1.5 2002/05/27 19:47:22 jcumming
* Removed use of this->. Members of templated base class are now declared
* in derived class Array.
*
* Revision 1.4 2002/03/06 16:16:18 patricg
*
* data_ replaced by this->data_ everywhere
* numReferences() replaced by this->numReferences()
*
* Revision 1.3 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.2 2001/01/24 23:41:53 tveldhui
* Widespread changes to reduce compile time. For backwards
* compatibility, #include <blitz/array.h> enables BZ_GANG_INCLUDE
* mode which includes all array and vector functionality (about
* 120000 lines of code). #include <blitz/Array.h> includes
* a minimal subset of Array funcitonality; other features must
* be included explicitly.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/08/18 19:13:08 tveldhui
* Just prior to implementing fastRead() optimization for array
* expression evaluation.
*
* Revision 1.2 1997/08/15 21:14:10 tveldhui
* Just prior to loop-collapse change
*
*/
#ifndef BZ_ARRAYMETHODS_CC #ifndef BZ_ARRAYMETHODS_CC
#define BZ_ARRAYMETHODS_CC #define BZ_ARRAYMETHODS_CC
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/methods.cc> must be included via <blitz/array.h> #error <blitz/array/methods.cc> must be included via <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
Array<P_numtype,N_rank>::Array(_bz_ArrayExpr<T_expr> expr) Array<P_numtype,N_rank>::Array(_bz_ArrayExpr<T_expr> expr)
{ {
// Determine extent of the array expression // Determine extent of the array expression
TinyVector<int,N_rank> lbound, extent, ordering; TinyVector<int,N_rank> lbound, extent, ordering;
TinyVector<bool,N_rank> ascendingFlag; TinyVector<bool,N_rank> ascendingFlag;
TinyVector<bool,N_rank> in_ordering;
in_ordering = false;
int j = 0;
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
{ {
lbound(i) = expr.lbound(i); lbound(i) = expr.lbound(i);
int ubound = expr.ubound(i); int ubound = expr.ubound(i);
extent(i) = ubound - lbound(i) + 1; extent(i) = ubound - lbound(i) + 1;
ordering(i) = expr.ordering(i); int orderingj = expr.ordering(i);
if (orderingj != INT_MIN && orderingj < N_rank &&
!in_ordering( orderingj )) { // unique value in ordering array
in_ordering( orderingj ) = true;
ordering(j++) = orderingj;
}
int ascending = expr.ascending(i); int ascending = expr.ascending(i);
ascendingFlag(i) = (ascending == 1); ascendingFlag(i) = (ascending == 1);
#ifdef BZ_DEBUG #ifdef BZ_DEBUG
if ((lbound(i) == INT_MIN) || (ubound == INT_MAX) if ((lbound(i) == INT_MIN) || (ubound == INT_MAX)
|| (ordering(i) == INT_MAX) || (ascending == INT_MAX)) || (ordering(i) == INT_MIN) || (ascending == INT_MIN))
{ {
BZPRECHECK(0, BZPRECHECK(0,
"Attempted to construct an array from an expression " << endl "Attempted to construct an array from an expression " << endl
<< "which does not have a shape. To use this constructor, " << "which does not have a shape. To use this constructor, "
<< endl << endl
<< "the expression must contain at least one array operand."); << "the expression must contain at least one array operand.");
return; return;
} }
#endif #endif
} }
// It is possible that ordering is not a permutation of 0,...,N_rank-1.
// In that case j will be less than N_rank. We fill in ordering with th
e
// usused values in decreasing order.
for (int i = N_rank-1; j < N_rank; ++j) {
while (in_ordering(i))
--i;
ordering(j) = i--;
}
Array<T_numtype,N_rank> A(lbound,extent, Array<T_numtype,N_rank> A(lbound,extent,
GeneralArrayStorage<N_rank>(ordering,ascendingFlag)); GeneralArrayStorage<N_rank>(ordering,ascendingFlag));
A = expr; A = expr;
reference(A); reference(A);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
Array<P_numtype,N_rank>::Array(const TinyVector<int, N_rank>& lbounds, Array<P_numtype,N_rank>::Array(const TinyVector<int, N_rank>& lbounds,
const TinyVector<int, N_rank>& extent, const TinyVector<int, N_rank>& extent,
const GeneralArrayStorage<N_rank>& storage) const GeneralArrayStorage<N_rank>& storage)
: storage_(storage) : storage_(storage)
{ {
length_ = extent; length_ = extent;
storage_.setBase(lbounds); storage_.setBase(lbounds);
setupStorage(N_rank - 1); setupStorage(N_rank - 1);
} }
/* /*
* This routine takes the storage information for the array * This routine takes the storage information for the array
* (ascendingFlag_[], base_[], and ordering_[]) and the size * (ascendingFlag_[], base_[], and ordering_[]) and the size
* of the array (length_[]) and computes the stride vector * of the array (length_[]) and computes the stride vector
* (stride_[]) and the zero offset (see explanation in array.h). * (stride_[]) and the zero offset (see explanation in array.h).
*/ */
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
_bz_inline2 void Array<P_numtype, N_rank>::computeStrides() _bz_inline2 void Array<P_numtype, N_rank>::computeStrides()
{ {
if (N_rank > 1) if (N_rank > 1)
{ {
int stride = 1; int stride = 1;
// This flag simplifies the code in the loop, encouraging // This flag simplifies the code in the loop, encouraging
// compile-time computation of strides through constant folding. // compile-time computation of strides through constant folding.
_bz_bool allAscending = storage_.allRanksStoredAscending(); bool allAscending = storage_.allRanksStoredAscending();
// BZ_OLD_FOR_SCOPING // BZ_OLD_FOR_SCOPING
int n; int n;
for (n=0; n < N_rank; ++n) for (n=0; n < N_rank; ++n)
{ {
int strideSign = +1; int strideSign = +1;
// If this rank is stored in descending order, then the stride // If this rank is stored in descending order, then the stride
// will be negative. // will be negative.
if (!allAscending) if (!allAscending)
skipping to change at line 161 skipping to change at line 127
if (isRankStoredAscending(0)) if (isRankStoredAscending(0))
stride_[0] = 1; stride_[0] = 1;
else else
stride_[0] = -1; stride_[0] = -1;
} }
calculateZeroOffset(); calculateZeroOffset();
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::calculateZeroOffset() void Array<P_numtype, N_rank>::calculateZeroOffset()
{ {
// Calculate the offset of (0,0,...,0) // Calculate the offset of (0,0,...,0)
zeroOffset_ = 0; zeroOffset_ = 0;
// zeroOffset_ = - sum(where(ascendingFlag_, stride_ * base_, // zeroOffset_ = - sum(where(ascendingFlag_, stride_ * base_,
// (length_ - 1 + base_) * stride_)) // (length_ - 1 + base_) * stride_))
for (int n=0; n < N_rank; ++n) for (int n=0; n < N_rank; ++n)
{ {
if (!isRankStoredAscending(n)) if (!isRankStoredAscending(n))
zeroOffset_ -= (length_[n] - 1 + base(n)) * stride_[n]; zeroOffset_ -= (length_[n] - 1 + base(n)) * stride_[n];
else else
zeroOffset_ -= stride_[n] * base(n); zeroOffset_ -= stride_[n] * base(n);
} }
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
_bz_bool Array<P_numtype, N_rank>::isStorageContiguous() const bool Array<P_numtype, N_rank>::isStorageContiguous() const
{ {
// The storage is contiguous if for the set // The storage is contiguous if for the set
// { | stride[i] * extent[i] | }, i = 0..N_rank-1, // { | stride[i] * extent[i] | }, i = 0..N_rank-1,
// there is only one value which is not in the set // there is only one value which is not in the set
// of strides; and if there is one stride which is 1. // of strides; and if there is one stride which is 1.
// This algorithm is quadratic in the rank. It is hard // This algorithm is quadratic in the rank. It is hard
// to imagine this being a serious problem. // to imagine this being a serious problem.
int numStridesMissing = 0; int numStridesMissing = 0;
bool haveUnitStride = _bz_false; bool haveUnitStride = false;
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
{ {
int stride = BZ_MATHFN_SCOPE(abs)(stride_[i]); int stride = BZ_MATHFN_SCOPE(abs)(stride_[i]);
if (stride == 1) if (stride == 1)
haveUnitStride = _bz_true; haveUnitStride = true;
int vi = stride * length_[i]; int vi = stride * length_[i];
int j = 0; int j = 0;
for (j=0; j < N_rank; ++j) for (j=0; j < N_rank; ++j)
if (BZ_MATHFN_SCOPE(abs)(stride_[j]) == vi) if (BZ_MATHFN_SCOPE(abs)(stride_[j]) == vi)
break; break;
if (j == N_rank) if (j == N_rank)
{ {
++numStridesMissing; ++numStridesMissing;
if (numStridesMissing == 2) if (numStridesMissing == 2)
return _bz_false; return false;
} }
} }
return haveUnitStride; return haveUnitStride;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::dumpStructureInformation(ostream& os) const void Array<P_numtype, N_rank>::dumpStructureInformation(ostream& os) const
{ {
os << "Dump of Array<" << BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(P_numtype ) os << "Dump of Array<" << BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(P_numtype )
<< ", " << N_rank << ">:" << endl << ", " << N_rank << ">:" << endl
<< "ordering_ = " << storage_.ordering() << endl << "ordering_ = " << storage_.ordering() << endl
<< "ascendingFlag_ = " << storage_.ascendingFlag() << endl << "ascendingFlag_ = " << storage_.ascendingFlag() << endl
<< "base_ = " << storage_.base() << endl << "base_ = " << storage_.base() << endl
<< "length_ = " << length_ << endl << "length_ = " << length_ << endl
<< "stride_ = " << stride_ << endl << "stride_ = " << stride_ << endl
<< "zeroOffset_ = " << zeroOffset_ << endl << "zeroOffset_ = " << zeroOffset_ << endl
<< "numElements() = " << numElements() << endl << "numElements() = " << numElements() << endl
<< "isStorageContiguous() = " << isStorageContiguous() << endl; << "isStorageContiguous() = " << isStorageContiguous() << endl;
} }
/* /*
* Make this array a view of another array's data. * Make this array a view of another array's data.
*/ */
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::reference(const Array<P_numtype, N_rank>& ar ray) void Array<P_numtype, N_rank>::reference(const Array<P_numtype, N_rank>& ar ray)
{ {
storage_ = array.storage_; storage_ = array.storage_;
length_ = array.length_; length_ = array.length_;
stride_ = array.stride_; stride_ = array.stride_;
zeroOffset_ = array.zeroOffset_; zeroOffset_ = array.zeroOffset_;
MemoryBlockReference<P_numtype>::changeBlock(array.noConst(), MemoryBlockReference<P_numtype>::changeBlock(array.noConst());
array.zeroOffset_);
data_ = const_cast<P_numtype*>(array.data_);
} }
/* /*
* Modify the Array storage. Array must be unallocated. * Modify the Array storage. Array must be unallocated.
*/ */
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::setStorage(GeneralArrayStorage<N_rank> x) void Array<P_numtype, N_rank>::setStorage(GeneralArrayStorage<N_rank> x)
{ {
#ifdef BZ_DEBUG #ifdef BZ_DEBUG
if (size() != 0) { if (size() != 0) {
BZPRECHECK(0,"Cannot modify storage format of an Array that has alr eady been allocated!" << endl); BZPRECHECK(0,"Cannot modify storage format of an Array that has alr eady been allocated!" << endl);
return; return;
} }
#endif #endif
storage_ = x; storage_ = x;
return; return;
} }
/* /*
* This method is called to allocate memory for a new array. * This method is called to allocate memory for a new array.
*/ */
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
_bz_inline2 void Array<P_numtype, N_rank>::setupStorage(int lastRankInitial ized) _bz_inline2 void Array<P_numtype, N_rank>::setupStorage(int lastRankInitial ized)
{ {
TAU_TYPE_STRING(p1, "Array<T,N>::setupStorage() [T=" TAU_TYPE_STRING(p1, "Array<T,N>::setupStorage() [T="
+ CT(P_numtype) + ",N=" + CT(N_rank) + "]"); + CT(P_numtype) + ",N=" + CT(N_rank) + "]");
TAU_PROFILE(" ", p1, TAU_BLITZ); TAU_PROFILE(" ", p1, TAU_BLITZ);
/* /*
* If the length of some of the ranks was unspecified, fill these * If the length of some of the ranks was unspecified, fill these
* in using the last specified value. * in using the last specified value.
* *
skipping to change at line 290 skipping to change at line 253
for (int i=lastRankInitialized + 1; i < N_rank; ++i) for (int i=lastRankInitialized + 1; i < N_rank; ++i)
{ {
storage_.setBase(i, storage_.base(lastRankInitialized)); storage_.setBase(i, storage_.base(lastRankInitialized));
length_[i] = length_[lastRankInitialized]; length_[i] = length_[lastRankInitialized];
} }
// Compute strides // Compute strides
computeStrides(); computeStrides();
// Allocate a block of memory // Allocate a block of memory
MemoryBlockReference<P_numtype>::newBlock(numElements()); int numElem = numElements();
if (numElem==0)
MemoryBlockReference<P_numtype>::changeToNullBlock();
else
MemoryBlockReference<P_numtype>::newBlock(numElem);
// Adjust the base of the array to account for non-zero base // Adjust the base of the array to account for non-zero base
// indices and reversals // indices and reversals
data_ += zeroOffset_; data_ += zeroOffset_;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
Array<P_numtype, N_rank> Array<P_numtype, N_rank>::copy() const Array<P_numtype, N_rank> Array<P_numtype, N_rank>::copy() const
{ {
if (numElements()) if (numElements())
{ {
Array<T_numtype, N_rank> z(length_, storage_); Array<T_numtype, N_rank> z(length_, storage_);
z = *this; z = *this;
return z; return z;
} }
else { else {
// Null array-- don't bother allocating an empty block. // Null array-- don't bother allocating an empty block.
return *this; return *this;
} }
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::makeUnique() void Array<P_numtype, N_rank>::makeUnique()
{ {
if (numReferences() > 1) if (numReferences() > 1)
{ {
T_array tmp = copy(); T_array tmp = copy();
reference(tmp); reference(tmp);
} }
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
Array<P_numtype, N_rank> Array<P_numtype, N_rank>::transpose(int r0, int r1 , Array<P_numtype, N_rank> Array<P_numtype, N_rank>::transpose(int r0, int r1 ,
int r2, int r3, int r4, int r5, int r6, int r7, int r8, int r9, int r10 ) int r2, int r3, int r4, int r5, int r6, int r7, int r8, int r9, int r10 )
{ {
T_array B(*this); T_array B(*this);
B.transposeSelf(r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10); B.transposeSelf(r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10);
return B; return B;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::transposeSelf(int r0, int r1, int r2, int r3 , void Array<P_numtype, N_rank>::transposeSelf(int r0, int r1, int r2, int r3 ,
int r4, int r5, int r6, int r7, int r8, int r9, int r10) int r4, int r5, int r6, int r7, int r8, int r9, int r10)
{ {
BZPRECHECK(r0+r1+r2+r3+r4+r5+r6+r7+r8+r9+r10 == N_rank * (N_rank-1) / 2 , BZPRECHECK(r0+r1+r2+r3+r4+r5+r6+r7+r8+r9+r10 == N_rank * (N_rank-1) / 2 ,
"Invalid array transpose() arguments." << endl "Invalid array transpose() arguments." << endl
<< "Arguments must be a permutation of the numerals (0,...," << "Arguments must be a permutation of the numerals (0,...,"
<< (N_rank - 1) << ")"); << (N_rank - 1) << ")");
// Create a temporary reference copy of this array // Create a temporary reference copy of this array
Array<T_numtype, N_rank> x(*this); Array<T_numtype, N_rank> x(*this);
skipping to change at line 357 skipping to change at line 324
doTranspose(3, r3, x); doTranspose(3, r3, x);
doTranspose(4, r4, x); doTranspose(4, r4, x);
doTranspose(5, r5, x); doTranspose(5, r5, x);
doTranspose(6, r6, x); doTranspose(6, r6, x);
doTranspose(7, r7, x); doTranspose(7, r7, x);
doTranspose(8, r8, x); doTranspose(8, r8, x);
doTranspose(9, r9, x); doTranspose(9, r9, x);
doTranspose(10, r10, x); doTranspose(10, r10, x);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::doTranspose(int destRank, int sourceRank, void Array<P_numtype, N_rank>::doTranspose(int destRank, int sourceRank,
Array<T_numtype, N_rank>& array) Array<T_numtype, N_rank>& array)
{ {
// BZ_NEEDS_WORK: precondition check // BZ_NEEDS_WORK: precondition check
if (destRank >= N_rank) if (destRank >= N_rank)
return; return;
length_[destRank] = array.length_[sourceRank]; length_[destRank] = array.length_[sourceRank];
stride_[destRank] = array.stride_[sourceRank]; stride_[destRank] = array.stride_[sourceRank];
skipping to change at line 385 skipping to change at line 352
// Find sourceRank in array.storage_.ordering_ // Find sourceRank in array.storage_.ordering_
int i=0; int i=0;
for (; i < N_rank; ++i) for (; i < N_rank; ++i)
if (array.storage_.ordering(i) == sourceRank) if (array.storage_.ordering(i) == sourceRank)
break; break;
storage_.setOrdering(i, destRank); storage_.setOrdering(i, destRank);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::reverseSelf(int rank) void Array<P_numtype, N_rank>::reverseSelf(int rank)
{ {
BZPRECONDITION(rank < N_rank); BZPRECONDITION(rank < N_rank);
storage_.setAscendingFlag(rank, !isRankStoredAscending(rank)); storage_.setAscendingFlag(rank, !isRankStoredAscending(rank));
int adjustment = stride_[rank] * (lbound(rank) + ubound(rank)); int adjustment = stride_[rank] * (lbound(rank) + ubound(rank));
zeroOffset_ += adjustment; zeroOffset_ += adjustment;
data_ += adjustment; data_ += adjustment;
stride_[rank] *= -1; stride_[rank] *= -1;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
Array<P_numtype, N_rank> Array<P_numtype,N_rank>::reverse(int rank) Array<P_numtype, N_rank> Array<P_numtype,N_rank>::reverse(int rank)
{ {
T_array B(*this); T_array B(*this);
B.reverseSelf(rank); B.reverseSelf(rank);
return B; return B;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
Array<P_numtype2,N_rank> Array<P_numtype,N_rank>::extractComponent(P_numtyp e2, Array<P_numtype2,N_rank> Array<P_numtype,N_rank>::extractComponent(P_numtyp e2,
int componentNumber, int numComponents) const int componentNumber, int numComponents) const
{ {
BZPRECONDITION((componentNumber >= 0) BZPRECONDITION((componentNumber >= 0)
&& (componentNumber < numComponents)); && (componentNumber < numComponents));
TinyVector<int,N_rank> stride2; TinyVector<int,N_rank> stride2;
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
stride2(i) = stride_(i) * numComponents; stride2(i) = stride_(i) * numComponents;
const P_numtype2* dataFirst2 = const P_numtype2* dataFirst2 =
skipping to change at line 428 skipping to change at line 395
return Array<P_numtype2,N_rank>(const_cast<P_numtype2*>(dataFirst2), return Array<P_numtype2,N_rank>(const_cast<P_numtype2*>(dataFirst2),
length_, stride2, storage_); length_, stride2, storage_);
} }
/* /*
* These routines reindex the current array to use a new base vector. * These routines reindex the current array to use a new base vector.
* The first reindexes the array, the second just returns a reindex view * The first reindexes the array, the second just returns a reindex view
* of the current array, leaving the current array unmodified. * of the current array, leaving the current array unmodified.
* (Contributed by Derrick Bass) * (Contributed by Derrick Bass)
*/ */
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
_bz_inline2 void Array<P_numtype, N_rank>::reindexSelf(const _bz_inline2 void Array<P_numtype, N_rank>::reindexSelf(const
TinyVector<int, N_rank>& newBase) TinyVector<int, N_rank>& newBase)
{ {
int delta = 0; int delta = 0;
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
delta += (base(i) - newBase(i)) * stride_(i); delta += (base(i) - newBase(i)) * stride_(i);
data_ += delta; data_ += delta;
// WAS: dot(base() - newBase, stride_); // WAS: dot(base() - newBase, stride_);
storage_.setBase(newBase); storage_.setBase(newBase);
calculateZeroOffset(); calculateZeroOffset();
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
_bz_inline2 Array<P_numtype, N_rank> _bz_inline2 Array<P_numtype, N_rank>
Array<P_numtype, N_rank>::reindex(const TinyVector<int, N_rank>& newBase) Array<P_numtype, N_rank>::reindex(const TinyVector<int, N_rank>& newBase)
{ {
T_array B(*this); T_array B(*this);
B.reindexSelf(newBase); B.reindexSelf(newBase);
return B; return B;
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 31 change blocks. 
85 lines changed or deleted 50 lines changed or added


 minmax.h   minmax.h 
/************************************************************************** * /************************************************************************** *
* blitz/minmax.h Declaration of min and max functions * blitz/minmax.h Declaration of min and max functions
* *
* $Id: minmax.h,v 1.2 2001/01/25 00:25:54 tveldhui Exp $ * $Id: minmax.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: minmax.h,v $
* Revision 1.2 2001/01/25 00:25:54 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_MINMAX_H #ifndef BZ_MINMAX_H
#define BZ_MINMAX_H #define BZ_MINMAX_H
#include <blitz/promote.h> #include <blitz/promote.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* These functions are in their own namespace (blitz::minmax) to avoid * These functions are in their own namespace (blitz::minmax) to avoid
* conflicts with the array reduction operations min and max. * conflicts with the array reduction operations min and max.
*/ */
BZ_NAMESPACE(minmax) BZ_NAMESPACE(minmax)
template<class T1, class T2> template<typename T1, typename T2>
BZ_PROMOTE(T1,T2) min(const T1& a, const T2& b) BZ_PROMOTE(T1,T2) min(const T1& a, const T2& b)
{ {
typedef BZ_PROMOTE(T1,T2) T_promote; typedef BZ_PROMOTE(T1,T2) T_promote;
if (a <= b) if (a <= b)
return T_promote(a); return T_promote(a);
else else
return T_promote(b); return T_promote(b);
} }
template<class T1, class T2> template<typename T1, typename T2>
BZ_PROMOTE(T1,T2) max(const T1& a, const T2& b) BZ_PROMOTE(T1,T2) max(const T1& a, const T2& b)
{ {
typedef BZ_PROMOTE(T1,T2) T_promote; typedef BZ_PROMOTE(T1,T2) T_promote;
if (a >= b) if (a >= b)
return T_promote(a); return T_promote(a);
else else
return T_promote(b); return T_promote(b);
} }
 End of changes. 4 change blocks. 
10 lines changed or deleted 5 lines changed or added


 misc.cc   misc.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/misc.cc Miscellaneous operators for arrays * blitz/array/misc.cc Miscellaneous operators for arrays
* *
* $Id: misc.cc,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: misc.cc,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYMISC_CC #ifndef BZ_ARRAYMISC_CC
#define BZ_ARRAYMISC_CC #define BZ_ARRAYMISC_CC
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/misc.cc> must be included via <blitz/array.h> #error <blitz/array/misc.cc> must be included via <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
#define BZ_ARRAY_DECLARE_UOP(fn, fnobj) \ #define BZ_ARRAY_DECLARE_UOP(fn, fnobj) \
template<class T_numtype, int N_rank> \ template<typename T_numtype, int N_rank> \
inline \ inline \
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<FastArrayIterator<T_numtype,N_rank>, \ _bz_ArrayExpr<_bz_ArrayExprUnaryOp<FastArrayIterator<T_numtype,N_rank>, \
fnobj<T_numtype> > > \ fnobj<T_numtype> > > \
fn(const Array<T_numtype,N_rank>& array) \ fn(const Array<T_numtype,N_rank>& array) \
{ \ { \
return _bz_ArrayExprUnaryOp<FastArrayIterator<T_numtype,N_rank>, \ return _bz_ArrayExprUnaryOp<FastArrayIterator<T_numtype,N_rank>, \
fnobj<T_numtype> >(array.beginFast()); \ fnobj<T_numtype> >(array.beginFast()); \
} \ } \
\ \
template<class T_expr> \ template<typename T_expr> \
inline \ inline \
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<T_expr>, \ _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<T_expr>, \
fnobj<_bz_typename T_expr::T_numtype> > > \ fnobj<_bz_typename T_expr::T_numtype> > > \
fn(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) \ fn(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) \
{ \ { \
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<T_expr>, \ return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<T_expr>, \
fnobj<_bz_typename T_expr::T_numtype> >(expr); \ fnobj<_bz_typename T_expr::T_numtype> >(expr); \
} }
BZ_ARRAY_DECLARE_UOP(operator!, LogicalNot) BZ_ARRAY_DECLARE_UOP(operator!, LogicalNot)
BZ_ARRAY_DECLARE_UOP(operator~, BitwiseNot) BZ_ARRAY_DECLARE_UOP(operator~, BitwiseNot)
BZ_ARRAY_DECLARE_UOP(operator-, Negate) BZ_ARRAY_DECLARE_UOP(operator-, Negate)
/* /*
* cast() functions, for explicit type casting * cast() functions, for explicit type casting
*/ */
template<class T_numtype, int N_rank, class T_cast> template<typename T_numtype, int N_rank, typename T_cast>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<FastArrayIterator<T_numtype,N_rank>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<FastArrayIterator<T_numtype,N_rank>,
Cast<T_numtype, T_cast> > > Cast<T_numtype, T_cast> > >
cast(const Array<T_numtype,N_rank>& array, T_cast) cast(const Array<T_numtype,N_rank>& array, T_cast)
{ {
return _bz_ArrayExprUnaryOp<FastArrayIterator<T_numtype,N_rank>, return _bz_ArrayExprUnaryOp<FastArrayIterator<T_numtype,N_rank>,
Cast<T_numtype,T_cast> >(array.beginFast()); Cast<T_numtype,T_cast> >(array.beginFast());
} }
template<class T_expr, class T_cast> template<typename T_expr, typename T_cast>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<T_expr>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<T_expr>,
Cast<_bz_typename T_expr::T_numtype,T_cast> > > Cast<_bz_typename T_expr::T_numtype,T_cast> > >
cast(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr, T_cast) cast(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr, T_cast)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<T_expr>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<T_expr>,
Cast<_bz_typename T_expr::T_numtype,T_cast> >(expr); Cast<_bz_typename T_expr::T_numtype,T_cast> >(expr);
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 6 change blocks. 
14 lines changed or deleted 6 lines changed or added


 mstruct.h   mstruct.h 
/************************************************************************** * /************************************************************************** *
* blitz/mstruct.h Matrix structure classes * blitz/mstruct.h Matrix structure classes
* *
* $Id: mstruct.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: mstruct.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: mstruct.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.5 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.4 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.3 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_MSTRUCT_H #ifndef BZ_MSTRUCT_H
#define BZ_MSTRUCT_H #define BZ_MSTRUCT_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
#ifndef BZ_ZERO_H #ifndef BZ_ZERO_H
#include <blitz/zero.h> #include <blitz/zero.h>
skipping to change at line 77 skipping to change at line 56
* matrix) * matrix)
* *
* Every matrix structure class must provide these methods: * Every matrix structure class must provide these methods:
* *
* ctor() * ctor()
* ctor(unsigned rows, unsigned cols) * ctor(unsigned rows, unsigned cols)
* unsigned columns() const; * unsigned columns() const;
* unsigned cols() const; * unsigned cols() const;
* unsigned firstInRow() const; * unsigned firstInRow() const;
* unsigned firstInCol() const; * unsigned firstInCol() const;
* template<class T> T& get(T* data, unsigned i, unsigned j); * template<typename T> T& get(T* data, unsigned i, unsigned j);
* template<class T> T get(const T* data, unsigned i, unsigned j) const; * template<typename T> T get(const T* data, unsigned i, unsigned j) const
;
* bool inRange(unsigned i, unsigned j) const * bool inRange(unsigned i, unsigned j) const
* unsigned lastInRow() const; * unsigned lastInRow() const;
* unsigned lastInCol() const; * unsigned lastInCol() const;
* unsigned numElements() const; * unsigned numElements() const;
* void resize(unsigned rows, unsigned cols); * void resize(unsigned rows, unsigned cols);
* unsigned rows() const; * unsigned rows() const;
* *
* Each matrix structure class must declare a public type * Each matrix structure class must declare a public type
* T_iterator which is an iterator to scan through the unique * T_iterator which is an iterator to scan through the unique
* entries of the matrix. The iterator class must provide * entries of the matrix. The iterator class must provide
skipping to change at line 112 skipping to change at line 91
class AsymmetricMatrix : public MatrixStructure { class AsymmetricMatrix : public MatrixStructure {
public: public:
AsymmetricMatrix() AsymmetricMatrix()
: rows_(0), cols_(0) : rows_(0), cols_(0)
{ } { }
AsymmetricMatrix(unsigned rows, unsigned cols) AsymmetricMatrix(unsigned rows, unsigned cols)
: rows_(rows), cols_(cols) : rows_(rows), cols_(cols)
{ } { }
unsigned columns() const unsigned columns() const { return cols_; }
{ return cols_; }
unsigned cols() const unsigned cols() const { return cols_; }
{ return cols_; }
_bz_bool inRange(unsigned i, unsigned j) const bool inRange(const unsigned i,const unsigned j) const {
{ return (i<rows_) && (j<cols_);
return (i < rows_) && (j < cols_);
} }
void resize(unsigned rows, unsigned cols) void resize(unsigned rows, unsigned cols) {
{
rows_ = rows; rows_ = rows;
cols_ = cols; cols_ = cols;
} }
unsigned rows() const unsigned rows() const { return rows_; }
{ return rows_; }
protected: protected:
unsigned rows_, cols_; unsigned rows_, cols_;
}; };
// Still to be implemented: // Still to be implemented:
// SkewSymmetric // SkewSymmetric
// Hermitian // Hermitian
// Tridiagonal // Tridiagonal
// Banded<L,H> // Banded<L,H>
 End of changes. 8 change blocks. 
37 lines changed or deleted 12 lines changed or added


 mt.h   mt.h 
/* A C-program for MT19937: Integer version (1998/4/6) */
/* genrand() generates one pseudorandom unsigned integer (32bit) */
/* which is uniformly distributed among 0 to 2^32-1 for each */
/* call. sgenrand(seed) set initial values to the working area */
/* of 624 words. Before genrand(), sgenrand(seed) must be */
/* called once. (seed is any 32-bit integer except for 0). */
/* Coded by Takuji Nishimura, considering the suggestions by */
/* Topher Cooper and Marc Rieffel in July-Aug. 1997. */
/* This library is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU Library General Public */
/* License as published by the Free Software Foundation; either */
/* version 2 of the License, or (at your option) any later */
/* version. */
/* This library is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */
/* See the GNU Library General Public License for more details. */
/* You should have received a copy of the GNU Library General */
/* Public License along with this library; if not, write to the */
/* Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA */
/* 02111-1307 USA */
/* Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. */
/* When you use this, send an email to: matumoto@math.keio.ac.jp */
/* with an appropriate reference to your work. */
/* REFERENCE */
/* M. Matsumoto and T. Nishimura, */
/* "Mersenne Twister: A 623-Dimensionally Equidistributed Uniform */
/* Pseudo-Random Number Generator", */
/* ACM Transactions on Modeling and Computer Simulation, */
/* Vol. 8, No. 1, January 1998, pp 3--30. */
// See http://www.math.keio.ac.jp/~matumoto/emt.html
// And http://www.acm.org/pubs/citations/journals/tomacs/1998-8-1/p3-matsum
oto/
// 1999-01-25 adapted to STL-like idiom
// allan@stokes.ca (Allan Stokes) www.stokes.ca
/* /*
* $Id: mt.h,v 1.3 2002/03/07 14:37:19 patricg Exp $ * $Id: mt.h,v 1.6 2005/10/13 20:08:53 julianc Exp $
* *
* $Log: mt.h,v $ * A C-program for MT19937: Integer version (1998/4/6)
* Revision 1.3 2002/03/07 14:37:19 patricg * genrand() generates one pseudorandom unsigned integer (32bit)
* which is uniformly distributed among 0 to 2^32-1 for each
* call. sgenrand(seed) set initial values to the working area
* of 624 words. Before genrand(), sgenrand(seed) must be
* called once. (seed is any 32-bit integer except for 0).
* Coded by Takuji Nishimura, considering the suggestions by
* Topher Cooper and Marc Rieffel in July-Aug. 1997.
* *
* fixed use of STL iterator * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later
* version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Library General Public License for more details.
* You should have received a copy of the GNU Library General
* Public License along with this library; if not, write to the
* Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA
* *
* Revision 1.2 2001/01/26 19:52:34 tveldhui * Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura.
* Incorporated changes from Max Domeika for STL compatibility. * When you use this, send an email to: matumoto@math.keio.ac.jp
* with an appropriate reference to your work.
*
* REFERENCE
* M. Matsumoto and T. Nishimura,
* "Mersenne Twister: A 623-Dimensionally Equidistributed Uniform
* Pseudo-Random Number Generator",
* ACM Transactions on Modeling and Computer Simulation,
* Vol. 8, No. 1, January 1998, pp 3--30.
*
* See
* http://www.math.keio.ac.jp/~matumoto/emt.html
* and
* http://www.acm.org/pubs/citations/journals/tomacs/1998-8-1/p3-matsum
oto/
* *
*/ */
#ifndef BZ_RAND_MT #ifndef BZ_RAND_MT
#define BZ_RAND_MT #define BZ_RAND_MT
#ifndef BZ_BLITZ_H #include <blitz/blitz.h>
#include <blitz/blitz.h>
#endif
#include <vector> #include <vector>
#include <string>
#include <sstream>
#include <iostream>
#include <iterator>
#ifndef UINT_MAX #ifndef UINT_MAX
#include <limits.h> #include <limits.h>
#endif #endif
BZ_NAMESPACE(ranlib) BZ_NAMESPACE(ranlib)
class MersenneTwister class MersenneTwister
{ {
public: public:
#if UINT_MAX < 4294967295U #if UINT_MAX < 4294967295U
typedef unsigned long twist_int; // must be at least 32 bits typedef unsigned long twist_int; // must be at least 32 bits
#else #else
typedef unsigned int twist_int; typedef unsigned int twist_int;
#endif #endif
private: private:
#if defined(BZ_NAMESPACES) && defined(BZ_HAVE_STD) #if defined(BZ_HAVE_NAMESPACES) && defined(BZ_HAVE_STD)
typedef std::vector<twist_int> State; typedef std::vector<twist_int> State;
#else #else
typedef vector<twist_int> State; typedef vector<twist_int> State;
#endif #endif
typedef State::iterator Iter; typedef State::iterator Iter;
struct BitMixer { struct BitMixer {
enum { K = 0x9908b0df }; enum { K = 0x9908b0df };
BitMixer() : s0(0) {} BitMixer() : s0(0) {}
skipping to change at line 191 skipping to change at line 185
{ {
if (I >= S.end()) reload(); if (I >= S.end()) reload();
twist_int y = *I++; twist_int y = *I++;
y ^= (y >> 11); y ^= (y >> 11);
y ^= (y << 7) & 0x9D2C5680; y ^= (y << 7) & 0x9D2C5680;
y ^= (y << 15) & 0xEFC60000; y ^= (y << 15) & 0xEFC60000;
y ^= (y >> 18); y ^= (y >> 18);
return y; return y;
} }
// functions for getting/setting state
class mt_state {
friend class MersenneTwister;
private:
State S;
int I;
public:
mt_state() { }
mt_state(State s, int i) : S(s), I(i) { }
mt_state(const std::string& s) {
std::istringstream is(s);
is >> I;
S = State(std::istream_iterator<twist_int>(is),
std::istream_iterator<twist_int>());
assert(!S.empty());
}
operator bool() const { return !S.empty(); }
std::string str() const {
if (S.empty())
return std::string();
std::ostringstream os;
os << I << " ";
std::copy(S.begin(), S.end(),
std::ostream_iterator<twist_int>(os," "));
return os.str();
}
};
typedef mt_state T_state;
T_state getState() const { return T_state(S, I-S.begin()); }
std::string getStateString() const {
T_state tmp(S, I-S.begin());
return tmp.str();
}
void setState(const T_state& s) {
if (!s) {
std::cerr << "Error: state is empty" << std::endl;
return;
}
S = s.S;
I = S.begin() + s.I;
}
void setState(const std::string& s) {
T_state tmp(s);
setState(tmp);
}
private: private:
State S; State S;
Iter I; Iter I;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_RAND_MT #endif // BZ_RAND_MT
 End of changes. 9 change blocks. 
50 lines changed or deleted 91 lines changed or added


 multi.h   multi.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/multi.h Support for multicomponent arrays * blitz/array/multi.h Support for multicomponent arrays
* *
* $Id: multi.h,v 1.2 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: multi.h,v $
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYMULTI_H #ifndef BZ_ARRAYMULTI_H
#define BZ_ARRAYMULTI_H #define BZ_ARRAYMULTI_H
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/multi.h> must be included via <blitz/array.h> #error <blitz/array/multi.h> must be included via <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
skipping to change at line 52 skipping to change at line 45
* tuples to the element type they contain. For example: * tuples to the element type they contain. For example:
* *
* multicomponent_traits<complex<float> >::T_numtype is float, * multicomponent_traits<complex<float> >::T_numtype is float,
* multicomponent_traits<TinyVector<int,3> >::T_numtype is int. * multicomponent_traits<TinyVector<int,3> >::T_numtype is int.
* *
* This is used to support Array<T,N>::operator[], which extracts component s * This is used to support Array<T,N>::operator[], which extracts component s
* from a multicomponent array. * from a multicomponent array.
*/ */
// By default, produce a harmless component type, and zero components. // By default, produce a harmless component type, and zero components.
template<class T_component> template<typename T_component>
struct multicomponent_traits { struct multicomponent_traits {
typedef T_component T_element; typedef T_component T_element;
enum { numComponents = 0 }; static const int numComponents = 0;
}; };
// TinyVector // TinyVector
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
struct multicomponent_traits<TinyVector<T_numtype,N_rank> > { struct multicomponent_traits<TinyVector<T_numtype,N_rank> > {
typedef T_numtype T_element; typedef T_numtype T_element;
enum { numComponents = N_rank }; static const int numComponents = N_rank;
}; };
#ifdef BZ_HAVE_COMPLEX_MATH #ifdef BZ_HAVE_COMPLEX
// complex<T> // complex<T>
template<class T> template<typename T>
struct multicomponent_traits<complex<T> > { struct multicomponent_traits<complex<T> > {
typedef T T_element; typedef T T_element;
enum { numComponents = 2 }; static const int numComponents = 2;
}; };
#endif #endif
// This macro is provided so that users can register their own // This macro is provided so that users can register their own
// multicomponent types. // multicomponent types.
#define BZ_DECLARE_MULTICOMPONENT_TYPE(T_tuple,T,N) \ #define BZ_DECLARE_MULTICOMPONENT_TYPE(T_tuple,T,N) \
BZ_NAMESPACE(blitz) \ BZ_NAMESPACE(blitz) \
template<> \ template<> \
struct multicomponent_traits<T_tuple > { \ struct multicomponent_traits<T_tuple > { \
typedef T T_element; \ typedef T T_element; \
enum { numComponents = N }; \ static const int numComponents = N; \
}; \ }; \
BZ_NAMESPACE_END BZ_NAMESPACE_END
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ARRAYMULTI_H #endif // BZ_ARRAYMULTI_H
 End of changes. 11 change blocks. 
18 lines changed or deleted 11 lines changed or added


 newet-macros.h   newet-macros.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/newet-macros.h Macros for new e.t. implementation * blitz/array/newet-macros.h Macros for new e.t. implementation
* *
* $Id: newet-macros.h,v 1.3 2002/07/02 19:17:17 jcumming Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: newet-macros.h,v $
* Revision 1.3 2002/07/02 19:17:17 jcumming
* Renamed and reorganized new style macros for declaring unary and binary
* functions/operators that act on Array types.
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_NEWET_MACROS_H #ifndef BZ_NEWET_MACROS_H
#define BZ_NEWET_MACROS_H #define BZ_NEWET_MACROS_H
#include <blitz/array/asexpr.h> #include <blitz/array/asexpr.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
#ifdef BZ_HAVE_TEMPLATES_AS_TEMPLATE_ARGUMENTS
/* /*
* Unary functions and operators * Unary functions and operators
*/ */
#define BZ_DECLARE_ARRAY_ET_UNARY(name, functor) \ #define BZ_DECLARE_ARRAY_ET_UNARY(name,functor) \
template<class T1> \ \
template <typename T1> \
_bz_inline_et \ _bz_inline_et \
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_typename asExpr<T1>::T_expr, \ typename BzUnaryExprResult<functor,T1>::T_result \
functor<_bz_typename asExpr<T1>::T_expr::T_numtype> > > \
name(const ETBase<T1>& d1) \ name(const ETBase<T1>& d1) \
{ \ { \
return _bz_ArrayExpr<_bz_ArrayExprUnaryOp< \ typedef typename BzUnaryExprResult<functor,T1>::T_result result; \
_bz_typename asExpr<T1>::T_expr, \ return result(asExpr<T1>::getExpr(d1.unwrap())); \
functor<_bz_typename asExpr<T1>::T_expr::T_numtype> > > \
(static_cast<const T1&>(d1)); \
} }
/* /*
* Array expression templates: the macro BZ_DECLARE_ARRAY_ET_BINARY(X,Y) * Array expression templates: the macro BZ_DECLARE_ARRAY_ET_BINARY(X,Y)
* declares a function or operator which takes two operands. * declares a function or operator which takes two operands.
* X is the function name (or operator), and Y is the functor object * X is the function name (or operator), and Y is the functor object
* which implements the operation. * which implements the operation.
*/ */
#define BZ_DECLARE_ARRAY_ET_BINARY(name, applic) \ #define BZ_DECLARE_ARRAY_ET_BINARY(name, applic) \
\ \
template<class T_numtype1, int N_rank1, class T_other> \ template <typename T1,typename T2> \
_bz_inline_et \ _bz_inline_et \
_bz_ArrayExpr<_bz_ArrayExprOp<FastArrayIterator<T_numtype1, N_rank1>, \ typename BzBinaryExprResult<applic,T1,T2>::T_result \
_bz_typename asExpr<T_other>::T_expr, applic<T_numtype1, \ name(const ETBase<T1>& d1,const ETBase<T2>& d2) \
_bz_typename asExpr<T_other>::T_expr::T_numtype> > > \
name(const Array<T_numtype1,N_rank1>& d1, const T_other& d2) \
{ \ { \
return _bz_ArrayExpr<_bz_ArrayExprOp<FastArrayIterator<T_numtype1, \ typedef typename BzBinaryExprResult<applic,T1,T2>::T_result result; \
N_rank1>, _bz_typename asExpr<T_other>::T_expr, \ return result(asExpr<T1>::getExpr(d1.unwrap()), \
applic<T_numtype1, \ asExpr<T2>::getExpr(d2.unwrap())); \
_bz_typename asExpr<T_other>::T_expr::T_numtype> > > \ }
(d1.beginFast(),d2); \
#define BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(name, applic) \
\
template <typename T1, typename T2, int N> \
_bz_inline_et \
typename BzBinaryExprResult<applic,TinyVector<T2,N>,T1>::T_result \
name(const TinyVector<T2,N> d1, const ETBase<T1>& d2) \
{ \
typedef typename \
BzBinaryExprResult<applic,TinyVector<T2,N>,T1>::T_result result; \
return result(asExpr<TinyVector<T2,N> >::getExpr(d1), \
asExpr<T1>::getExpr(d2.unwrap())); \
} \ } \
\ \
template<class T_expr1, class T_other> \ template <typename T1, typename T2, int N> \
_bz_inline_et \ _bz_inline_et \
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<T_expr1>, \ typename BzBinaryExprResult<applic,T1,TinyVector<T2,N> >::T_result \
_bz_typename asExpr<T_other>::T_expr, \ name(const ETBase<T1>& d1, const TinyVector<T2,N> d2) \
applic<_bz_typename T_expr1::T_numtype, \
_bz_typename asExpr<T_other>::T_expr::T_numtype> > > \
name(const _bz_ArrayExpr<T_expr1>& d1, const T_other& d2) \
{ \ { \
return _bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<T_expr1>, \ typedef typename \
_bz_typename asExpr<T_other>::T_expr, \ BzBinaryExprResult<applic,T1,TinyVector<T2,N> >::T_result result; \
applic<_bz_typename T_expr1::T_numtype, \ return result(asExpr<T1>::getExpr(d1.unwrap()), \
_bz_typename asExpr<T_other>::T_expr::T_numtype> > >(d1,d2); \ asExpr<TinyVector<T2,N> >::getExpr(d2)); \
}
#define BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(name, applic, sca) \
\
template<typename T> \
_bz_inline_et \
typename BzBinaryExprResult<applic,sca,T>::T_result \
name(const sca d1, const ETBase<T>& d2) \
{ \
typedef typename BzBinaryExprResult<applic,sca,T>::T_result result; \
return result(asExpr<sca >::getExpr(d1), \
asExpr<T>::getExpr(d2.unwrap())); \
} \ } \
\ \
template<class T1, class T2> \ template<typename T> \
_bz_inline_et \ _bz_inline_et \
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_typename asExpr<T1>::T_expr, \ typename BzBinaryExprResult<applic,T,sca >::T_result \
name(const ETBase<T>& d1, const sca d2) \
{ \
typedef typename BzBinaryExprResult<applic,T,sca >::T_result result; \
return result(asExpr<T>::getExpr(d1.unwrap()), \
asExpr<sca >::getExpr(d2)); \
}
/*
* Array expression templates: the macro BZ_DECLARE_ARRAY_ET_TERNARY(X,Y)
* declares a function or operator which takes three operands.
* X is the function name (or operator), and Y is the functor object
* which implements the operation.
*/
#define BZ_DECLARE_ARRAY_ET_TERNARY(name, applic)
\
\
template <typename T1, typename T2, typename T3>
\
_bz_inline_et
\
typename BzTernaryExprResult<applic, T1, T2, T3>::T_result
\
name(const ETBase<T1>& d1, const ETBase<T2>& d2, const ETBase<T3>& d3)
\
{
\
typedef typename BzTernaryExprResult<applic,T1,T2,T3>::T_result result;
\
return result(asExpr<T1>::getExpr(d1.unwrap()),
\
asExpr<T2>::getExpr(d2.unwrap()),
\
asExpr<T3>::getExpr(d3.unwrap()));
\
}
#else /* !BZ_HAVE_TEMPLATES_AS_TEMPLATE_ARGUMENTS */
/*
* Unary functions and operators
*/
#define BZ_DECLARE_ARRAY_ET_UNARY(name, functor) \
\
template<typename T1> \
_bz_inline_et \
_bz_ArrayExpr<_bz_ArrayExprUnaryOp< \
_bz_typename asExpr<T1>::T_expr, \
functor<_bz_typename asExpr<T1>::T_expr::T_numtype> > > \
name(const ETBase<T1>& d1) \
{ \
return _bz_ArrayExpr<_bz_ArrayExprUnaryOp< \
_bz_typename asExpr<T1>::T_expr, \
functor<_bz_typename asExpr<T1>::T_expr::T_numtype> > > \
(asExpr<T1>::getExpr(d1.unwrap())); \
}
/*
* Array expression templates: the macro BZ_DECLARE_ARRAY_ET_BINARY(X,Y)
* declares a function or operator which takes two operands.
* X is the function name (or operator), and Y is the functor object
* which implements the operation.
*/
#define BZ_DECLARE_ARRAY_ET_BINARY(name, applic) \
\
template<typename T1, typename T2> \
_bz_inline_et \
_bz_ArrayExpr<_bz_ArrayExprBinaryOp< \
_bz_typename asExpr<T1>::T_expr, \
_bz_typename asExpr<T2>::T_expr, \ _bz_typename asExpr<T2>::T_expr, \
applic<_bz_typename asExpr<T1>::T_expr::T_numtype, \ applic<_bz_typename asExpr<T1>::T_expr::T_numtype, \
_bz_typename asExpr<T2>::T_expr::T_numtype> > > \ _bz_typename asExpr<T2>::T_expr::T_numtype> > > \
name(const ETBase<T1>& d1, const T2& d2) \ name(const ETBase<T1>& d1, const ETBase<T2>& d2) \
{ \ { \
return _bz_ArrayExpr<_bz_ArrayExprOp<_bz_typename asExpr<T1>::T_expr, \ return _bz_ArrayExpr<_bz_ArrayExprBinaryOp< \
_bz_typename asExpr<T1>::T_expr, \
_bz_typename asExpr<T2>::T_expr, \ _bz_typename asExpr<T2>::T_expr, \
applic<_bz_typename asExpr<T1>::T_expr::T_numtype, \ applic<_bz_typename asExpr<T1>::T_expr::T_numtype, \
_bz_typename asExpr<T2>::T_expr::T_numtype> > > \ _bz_typename asExpr<T2>::T_expr::T_numtype> > > \
(static_cast<const T1&>(d1), d2); \ (asExpr<T1>::getExpr(d1.unwrap()), \
asExpr<T2>::getExpr(d2.unwrap())); \
}
#define BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(name, applic) \
\
template <typename T1, typename T2, int N> \
_bz_inline_et \
_bz_ArrayExprBinaryOp< \
_bz_typename asExpr<TinyVector<T2,N> >::T_expr, \
_bz_typename asExpr<T1>::T_expr, \
applic<TinyVector<T2,N>, \
_bz_typename asExpr<T1>::T_expr::T_numtype> > \
name(const TinyVector<T2,N> d1, const ETBase<T1>& d2) \
{ \
return _bz_ArrayExprBinaryOp< \
_bz_typename asExpr<TinyVector<T2,N> >::T_expr, \
_bz_typename asExpr<T1>::T_expr, \
applic<TinyVector<T2,N>, \
_bz_typename asExpr<T1>::T_expr::T_numtype> > \
(asExpr<TinyVector<T2,N> >::getExpr(d1), \
asExpr<T1>::getExpr(d2.unwrap())); \
} \ } \
\ \
template<class T1, class T2> \ template <typename T1, typename T2, int N> \
_bz_inline_et \ _bz_inline_et \
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_typename asExpr<T1>::T_expr, \ _bz_ArrayExprBinaryOp< \
_bz_typename asExpr<T2>::T_expr, \ _bz_typename asExpr<T1>::T_expr, \
_bz_typename asExpr<TinyVector<T2,N> >::T_expr, \
applic<_bz_typename asExpr<T1>::T_expr::T_numtype, \ applic<_bz_typename asExpr<T1>::T_expr::T_numtype, \
_bz_typename asExpr<T2>::T_expr::T_numtype> > > \ TinyVector<T2,N> > > \
name(const T1& d1, const ETBase<T2>& d2) \ name(const ETBase<T1>& d1, const TinyVector<T2,N> d2) \
{ \ { \
return _bz_ArrayExpr<_bz_ArrayExprOp<_bz_typename asExpr<T1>::T_expr, \ return _bz_ArrayExprBinaryOp< \
_bz_typename asExpr<T2>::T_expr, \ _bz_typename asExpr<T1>::T_expr, \
_bz_typename asExpr<TinyVector<T2,N> >::T_expr, \
applic<_bz_typename asExpr<T1>::T_expr::T_numtype, \ applic<_bz_typename asExpr<T1>::T_expr::T_numtype, \
_bz_typename asExpr<T2>::T_expr::T_numtype> > > \ TinyVector<T2,N> > > \
(d1, static_cast<const T2&>(d2)); \ (asExpr<T1>::getExpr(d1.unwrap()), \
asExpr<TinyVector<T2,N> >::getExpr(d2)); \
}
#define BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(name, applic, sca) \
\
template<typename T> \
_bz_inline_et \
_bz_ArrayExprBinaryOp< \
asExpr<sca >::T_expr, \
_bz_typename asExpr<T>::T_expr, \
applic<sca,_bz_typename asExpr<T>::T_expr::T_numtype> > \
name(const sca d1, const ETBase<T>& d2) \
{ \
return _bz_ArrayExprBinaryOp< \
asExpr<sca >::T_expr, \
_bz_typename asExpr<T>::T_expr, \
applic<sca,_bz_typename asExpr<T>::T_expr::T_numtype> > \
(asExpr<sca >::getExpr(d1), \
asExpr<T>::getExpr(d2.unwrap())); \
} \ } \
\ \
template<int N1, class T_other> \ template<typename T> \
_bz_inline_et \ _bz_inline_et \
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N1>, \ _bz_ArrayExprBinaryOp< \
_bz_typename asExpr<T_other>::T_expr, \ _bz_typename asExpr<T>::T_expr, \
applic<int, _bz_typename asExpr<T_other>::T_expr::T_numtype> > > \ asExpr<sca >::T_expr, \
name(IndexPlaceholder<N1> d1, const T_other& d2) \ applic<_bz_typename asExpr<T>::T_expr::T_numtype,sca > > \
name(const ETBase<T>& d1, const sca d2) \
{ \ { \
return _bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N1>, \ return _bz_ArrayExprBinaryOp< \
_bz_typename asExpr<T_other>::T_expr, \ _bz_typename asExpr<T>::T_expr, \
applic<int, _bz_typename asExpr<T_other>::T_expr::T_numtype> > > \ asExpr<sca >::T_expr, \
(d1,d2); \ applic<_bz_typename asExpr<T>::T_expr::T_numtype,sca > > \
(asExpr<T>::getExpr(d1.unwrap()), \
asExpr<sca >::getExpr(d2)); \
} }
/* /*
* User-defined expression template routines * Array expression templates: the macro BZ_DECLARE_ARRAY_ET_TERNARY(X,Y)
* declares a function or operator which takes three operands.
* X is the function name (or operator), and Y is the functor object
* which implements the operation.
*/ */
#define BZ_DECLARE_FUNCTION(name) \ #define BZ_DECLARE_ARRAY_ET_TERNARY(name, applic) \
template<class T_numtype1> \
struct name ## _impl { \
typedef T_numtype1 T_numtype; \
\
static inline T_numtype apply(T_numtype1 x) \
{ return name(x); } \
\
template<class T1> \
static void prettyPrint(string& str, \
prettyPrintFormat& format, const T1& a) \
{ \
str += #name; \
str += "("; \
a.prettyPrint(str,format); \
str += ")"; \
} \
}; \
\ \
BZ_DECLARE_ARRAY_ET_UNARY(name, name ## _impl) template<typename T1, typename T2, typename T3> \
_bz_inline_et \
_bz_ArrayExpr<_bz_ArrayExprTernaryOp< \
_bz_typename asExpr<T1>::T_expr, \
_bz_typename asExpr<T2>::T_expr, \
_bz_typename asExpr<T3>::T_expr, \
applic<_bz_typename asExpr<T1>::T_expr::T_numtype, \
_bz_typename asExpr<T2>::T_expr::T_numtype, \
_bz_typename asExpr<T3>::T_expr::T_numtype> > > \
name(const ETBase<T1>& d1, const ETBase<T2>& d2, const ETBase<T3>& d3) \
{ \
return _bz_ArrayExpr<_bz_ArrayExprTernaryOp< \
_bz_typename asExpr<T1>::T_expr, \
_bz_typename asExpr<T2>::T_expr, \
_bz_typename asExpr<T3>::T_expr, \
applic<_bz_typename asExpr<T1>::T_expr::T_numtype, \
_bz_typename asExpr<T2>::T_expr::T_numtype, \
_bz_typename asExpr<T3>::T_expr::T_numtype> > > \
(asExpr<T1>::getExpr(d1.unwrap()), \
asExpr<T2>::getExpr(d2.unwrap()), \
asExpr<T3>::getExpr(d3.unwrap())); \
}
#define BZ_DECLARE_FUNCTION_RET(name, return_type) \ #endif /* BZ_HAVE_TEMPLATES_AS_TEMPLATE_ARGUMENTS */
template<class T_numtype1> \
struct name ## _impl { \
typedef return_type T_numtype; \
\
static inline T_numtype apply(T_numtype1 x) \
{ return name(x); } \
\
template<class T1> \
static void prettyPrint(string& str, \
prettyPrintFormat& format, const T1& a) \
{ \
str += #name; \
str += "("; \
a.prettyPrint(str,format); \
str += ")"; \
} \
}; \
\
BZ_DECLARE_ARRAY_ET_UNARY(name, name ## _impl)
#define BZ_DECLARE_FUNCTION2(name) \ /*
template<class T_numtype1, class T_numtype2> \ * User-defined expression template routines
struct name ## _impl { \ */
typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype; \
\
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) \
{ return name(x,y); } \
\
template<class T1, class T2> \
static void prettyPrint(string& str, \
prettyPrintFormat& format, const T1& a, const T2& b) \
{ \
str += #name; \
str += "("; \
a.prettyPrint(str,format); \
str += ","; \
b.prettyPrint(str,format); \
str += ")"; \
} \
}; \
\
BZ_DECLARE_ARRAY_ET_BINARY(name, name ## _impl)
#define BZ_DECLARE_FUNCTION2_RET(name, return_type) \ #define BZ_DECLARE_FUNCTION(name) \
template<class T_numtype1, class T_numtype2> \ BZ_DEFINE_UNARY_FUNC(name ## _impl,name) \
struct name ## _impl { \ BZ_DECLARE_ARRAY_ET_UNARY(name,name ## _impl)
typedef return_type T_numtype; \
\ #define BZ_DECLARE_FUNCTION_RET(name,return_type) \
static inline T_numtype apply(T_numtype1 x, T_numtype2 y) \ BZ_DEFINE_UNARY_FUNC_RET(name ## _impl,name,return_type) \
{ return name(x,y); } \ BZ_DECLARE_ARRAY_ET_UNARY(name,name ## _impl)
\
template<class T1, class T2> \ #define BZ_DECLARE_FUNCTION2(name) \
static void prettyPrint(string& str, \ BZ_DEFINE_BINARY_FUNC(name ## _impl,name) \
prettyPrintFormat& format, const T1& a, const T2& b) \ BZ_DECLARE_ARRAY_ET_BINARY(name, name ## _impl)
{ \
str += #name; \ #define BZ_DECLARE_FUNCTION2_RET(name,return_type) \
str += "("; \ BZ_DEFINE_BINARY_FUNC_RET(name ## _impl,name,return_type) \
a.prettyPrint(str,format); \ BZ_DECLARE_ARRAY_ET_BINARY(name, name ## _impl)
str += ","; \
b.prettyPrint(str,format); \ #define BZ_DECLARE_FUNCTION2_SCALAR(name, sca) \
str += ")"; \ BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(name, name ## _impl, sca)
} \
}; \ #define BZ_DECLARE_FUNCTION3(name) \
\ BZ_DEFINE_TERNARY_FUNC(name ## _impl,name) \
BZ_DECLARE_ARRAY_ET_BINARY(name, name ## _impl) BZ_DECLARE_ARRAY_ET_TERNARY(name, name ## _impl)
#define BZ_DECLARE_FUNCTION3_RET(name,return_type) \
BZ_DEFINE_TERNARY_FUNC_RET(name ## _impl,name,return_type) \
BZ_DECLARE_ARRAY_ET_TERNARY(name, name ## _impl)
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif #endif
 End of changes. 32 change blocks. 
151 lines changed or deleted 249 lines changed or added


 newet.h   newet.h 
/************************************************************************** * /************************************************************************** *
* blitz/array/newet.h Gang include of new expression templates implementa tion * blitz/array/newet.h Gang include of new expression templates implementa tion
* *
* $Id: newet.h,v 1.3 2002/07/02 19:15:45 jcumming Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: newet.h,v $
* Revision 1.3 2002/07/02 19:15:45 jcumming
* Added #include of blitz/array/functorExpr.h to support user-defined
* functors and class methods acting on Array types.
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_NEWET_H #ifndef BZ_ARRAY_NEWET_H
#define BZ_ARRAY_NEWET_H #define BZ_ARRAY_NEWET_H
// Gang include of new expression templates implementation. // Gang include of new expression templates implementation.
#include <blitz/array/ops.h> #include <blitz/array/ops.h>
#include <blitz/array/funcs.h> #include <blitz/array/funcs.h>
// ET support for functors acting on Arrays // ET support for functors acting on Arrays
 End of changes. 2 change blocks. 
14 lines changed or deleted 2 lines changed or added


 numinquire.h   numinquire.h 
/************************************************************************** * /************************************************************************** *
* blitz/numinquire.h Numeric inquiry functions * blitz/numinquire.h Numeric inquiry functions
* *
* $Id: numinquire.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: numinquire.h,v 1.5 2005/02/23 12:39:27 patricg Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: numinquire.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
/* /*
* These numeric inquiry functions are provided as an alternative * These numeric inquiry functions are provided as an alternative
* to the somewhat klunky numeric_limits<T>::yadda_yadda syntax. * to the somewhat klunky numeric_limits<T>::yadda_yadda syntax.
* Where a similar Fortran 90 function exists, the same name has * Where a similar Fortran 90 function exists, the same name has
* been used. * been used.
* *
* The argument in all cases is a dummy of the appropriate type * The argument in all cases is a dummy of the appropriate type
* (double, int, etc.) * (double, int, etc.)
* *
* These functions assume that numeric_limits<T> has been specialized * These functions assume that numeric_limits<T> has been specialized
* for the appropriate case. If not, the results are not useful. * for the appropriate case. If not, the results are not useful.
*/ */
#ifndef BZ_NUMINQUIRE_H #ifndef BZ_NUMINQUIRE_H
#define BZ_NUMINQUIRE_H #define BZ_NUMINQUIRE_H
#ifndef BZ_BLITZ_H
#include <blitz/blitz.h>
#endif
#ifndef BZ_HAVE_NUMERIC_LIMITS #ifndef BZ_HAVE_NUMERIC_LIMITS
#include <blitz/limits-hack.h> #include <blitz/limits-hack.h>
#else #else
#include <limits> #include <limits>
#endif #endif
#ifndef BZ_RANGE_H #ifndef BZ_RANGE_H
#include <blitz/range.h> #include <blitz/range.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* This traits class provides zero and one values for numeric * This traits class provides zero and one values for numeric
* types. This was previously a template function with specializations, * types. This was previously a template function with specializations,
* but the specializations were causing multiply-defined symbols * but the specializations were causing multiply-defined symbols
* at link time. TV 980226 * at link time. TV 980226
*/ */
template<class T_numtype> template<typename T_numtype>
struct _bz_OneZeroTraits { struct _bz_OneZeroTraits {
static inline T_numtype zero() { return 0; } static inline T_numtype zero() { return 0; }
static inline T_numtype one() { return 1; } static inline T_numtype one() { return 1; }
}; };
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<> template<>
struct _bz_OneZeroTraits<complex<float> > { struct _bz_OneZeroTraits<complex<float> > {
static inline complex<float> zero() { return complex<float>(0.0f,0.0f); } static inline complex<float> zero() { return complex<float>(0.0f,0.0f); }
skipping to change at line 106 skipping to change at line 96
struct _bz_OneZeroTraits<complex<long double> > { struct _bz_OneZeroTraits<complex<long double> > {
static inline complex<long double> zero() static inline complex<long double> zero()
{ return complex<long double>(0.0,0.0); } { return complex<long double>(0.0,0.0); }
static inline complex<long double> one() static inline complex<long double> one()
{ return complex<long double>(1.0,0.0); } { return complex<long double>(1.0,0.0); }
}; };
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T> template<typename T>
inline T zero(T) inline T zero(T)
{ {
return _bz_OneZeroTraits<T>::zero(); return _bz_OneZeroTraits<T>::zero();
} }
template<class T> template<typename T>
inline T one(T) inline T one(T)
{ {
return _bz_OneZeroTraits<T>::one(); return _bz_OneZeroTraits<T>::one();
} }
template<class T> template<typename T>
inline int digits(T) inline int digits(T)
{ {
return numeric_limits<T>::digits; return numeric_limits<T>::digits;
} }
template<class T> template<typename T>
inline int digits10(T) inline int digits10(T)
{ {
return numeric_limits<T>::digits10; return numeric_limits<T>::digits10;
} }
template<class T> template<typename T>
inline T epsilon(T) BZ_THROW inline T epsilon(T) BZ_THROW
{ {
return numeric_limits<T>::epsilon(); return numeric_limits<T>::epsilon();
} }
// neghuge() by Theodore Papadopoulo, to fix a problem with // neghuge() by Theodore Papadopoulo, to fix a problem with
// max() reductions. // max() reductions.
template<class T> template<typename T>
inline T neghuge(T) BZ_THROW inline T neghuge(T) BZ_THROW
{ {
return numeric_limits<T>::is_integer ? numeric_limits<T>::min() return numeric_limits<T>::is_integer ? numeric_limits<T>::min()
: - numeric_limits<T>::max(); : - numeric_limits<T>::max();
} }
template<class T> template<typename T>
inline T huge(T) BZ_THROW inline T huge(T) BZ_THROW
{ {
return numeric_limits<T>::max(); return numeric_limits<T>::max();
} }
template<class T> template<typename T>
inline T tiny(T) BZ_THROW inline T tiny(T) BZ_THROW
{ {
return numeric_limits<T>::min(); return numeric_limits<T>::min();
} }
template<class T> template<typename T>
inline int max_exponent(T) inline int max_exponent(T)
{ {
return numeric_limits<T>::max_exponent; return numeric_limits<T>::max_exponent;
} }
template<class T> template<typename T>
inline int min_exponent(T) inline int min_exponent(T)
{ {
return numeric_limits<T>::min_exponent; return numeric_limits<T>::min_exponent;
} }
template<class T> template<typename T>
inline int min_exponent10(T) inline int min_exponent10(T)
{ {
return numeric_limits<T>::min_exponent10; return numeric_limits<T>::min_exponent10;
} }
template<class T> template<typename T>
inline int max_exponent10(T) inline int max_exponent10(T)
{ {
return numeric_limits<T>::max_exponent10; return numeric_limits<T>::max_exponent10;
} }
template<class T> template<typename T>
inline int precision(T) inline int precision(T)
{ {
return numeric_limits<T>::digits10; return numeric_limits<T>::digits10;
} }
template<class T> template<typename T>
inline int radix(T) inline int radix(T)
{ {
return numeric_limits<T>::radix; return numeric_limits<T>::radix;
} }
template<class T> template<typename T>
inline Range range(T) inline Range range(T)
{ {
return Range(numeric_limits<T>::min_exponent10, return Range(numeric_limits<T>::min_exponent10,
numeric_limits<T>::max_exponent10); numeric_limits<T>::max_exponent10);
} }
template<class T> template<typename T>
inline bool is_signed(T) inline bool is_signed(T) {
{
return numeric_limits<T>::is_signed; return numeric_limits<T>::is_signed;
} }
template<class T> template<typename T>
inline bool is_integer(T) inline bool is_integer(T) {
{
return numeric_limits<T>::is_integer; return numeric_limits<T>::is_integer;
} }
template<class T> template<typename T>
inline bool is_exact(T) inline bool is_exact(T) {
{
return numeric_limits<T>::is_exact; return numeric_limits<T>::is_exact;
} }
template<class T> template<typename T>
inline T round_error(T) BZ_THROW inline T round_error(T) BZ_THROW
{ {
return numeric_limits<T>::round_error(); return numeric_limits<T>::round_error();
} }
template<class T> template<typename T>
inline bool has_infinity(T) inline bool has_infinity(T) {
{
return numeric_limits<T>::has_infinity; return numeric_limits<T>::has_infinity;
} }
template<class T> template<typename T>
inline bool has_quiet_NaN(T) inline bool has_quiet_NaN(T) {
{
return numeric_limits<T>::has_quiet_NaN; return numeric_limits<T>::has_quiet_NaN;
} }
template<class T> template<typename T>
inline bool has_signaling_NaN(T) inline bool has_signaling_NaN(T) {
{
return numeric_limits<T>::has_signaling_NaN; return numeric_limits<T>::has_signaling_NaN;
} }
// Provided for non-US english users // Provided for non-US english users
template<class T> template<typename T>
inline bool has_signalling_NaN(T) inline bool has_signalling_NaN(T) {
{
return numeric_limits<T>::has_signaling_NaN; return numeric_limits<T>::has_signaling_NaN;
} }
template<class T> template<typename T>
inline bool has_denorm(T) inline bool has_denorm(T) {
{
return numeric_limits<T>::has_denorm; return numeric_limits<T>::has_denorm;
} }
template<class T> template<typename T>
inline bool has_denorm_loss(T) inline bool has_denorm_loss(T) {
{
return numeric_limits<T>::has_denorm_loss; return numeric_limits<T>::has_denorm_loss;
} }
template<class T> template<typename T>
inline T infinity(T) BZ_THROW inline T infinity(T) BZ_THROW
{ {
return numeric_limits<T>::infinity(); return numeric_limits<T>::infinity();
} }
template<class T> template<typename T>
inline T quiet_NaN(T) BZ_THROW inline T quiet_NaN(T) BZ_THROW
{ {
return numeric_limits<T>::quiet_NaN(); return numeric_limits<T>::quiet_NaN();
} }
template<class T> template<typename T>
inline T signaling_NaN(T) BZ_THROW inline T signaling_NaN(T) BZ_THROW
{ {
return numeric_limits<T>::signaling_NaN(); return numeric_limits<T>::signaling_NaN();
} }
template<class T> template<typename T>
inline T signalling_NaN(T) BZ_THROW inline T signalling_NaN(T) BZ_THROW
{ {
return numeric_limits<T>::signaling_NaN(); return numeric_limits<T>::signaling_NaN();
} }
template<class T> template<typename T>
inline T denorm_min(T) BZ_THROW inline T denorm_min(T) BZ_THROW
{ {
return numeric_limits<T>::denorm_min(); return numeric_limits<T>::denorm_min();
} }
template<class T> template<typename T>
inline bool is_iec559(T) inline bool is_iec559(T) {
{
return numeric_limits<T>::is_iec559; return numeric_limits<T>::is_iec559;
} }
template<class T> template<typename T>
inline bool is_bounded(T) inline bool is_bounded(T) {
{
return numeric_limits<T>::is_bounded; return numeric_limits<T>::is_bounded;
} }
template<class T> template<typename T>
inline bool is_modulo(T) inline bool is_modulo(T) {
{
return numeric_limits<T>::is_modulo; return numeric_limits<T>::is_modulo;
} }
template<class T> template<typename T>
inline bool traps(T) inline bool traps(T) {
{
return numeric_limits<T>::traps; return numeric_limits<T>::traps;
} }
template<class T> template<typename T>
inline bool tinyness_before(T) inline bool tinyness_before(T) {
{
return numeric_limits<T>::tinyness_before; return numeric_limits<T>::tinyness_before;
} }
template<class T> template<typename T>
inline BZ_STD_SCOPE(float_round_style) round_style(T) inline BZ_STD_SCOPE(float_round_style) round_style(T)
{ {
return numeric_limits<T>::round_style; return numeric_limits<T>::round_style;
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_NUMINQUIRE_H #endif // BZ_NUMINQUIRE_H
 End of changes. 40 change blocks. 
82 lines changed or deleted 58 lines changed or added


 numtrait.h   numtrait.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/numtrait.h Declaration of the NumericTypeTraits class * blitz/numtrait.h Declaration of the NumericTypeTraits class
* *
* $Id: numtrait.h,v 1.2 2001/01/24 20:22:49 tveldhui Exp $ * $Id: numtrait.h,v 1.6 2005/05/07 04:17:56 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: numtrait.h,v $
* Revision 1.2 2001/01/24 20:22:49 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.5 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.4 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.3 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_NUMTRAIT_H #ifndef BZ_NUMTRAIT_H
#define BZ_NUMTRAIT_H #define BZ_NUMTRAIT_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
skipping to change at line 71 skipping to change at line 48
#define BZ_DIFFTYPE(X) X #define BZ_DIFFTYPE(X) X
#define BZ_FLOATTYPE(X) X #define BZ_FLOATTYPE(X) X
#define BZ_SIGNEDTYPE(X) X #define BZ_SIGNEDTYPE(X) X
#else #else
#define BZ_SUMTYPE(X) _bz_typename NumericTypeTraits<X>::T_sumtype #define BZ_SUMTYPE(X) _bz_typename NumericTypeTraits<X>::T_sumtype
#define BZ_DIFFTYPE(X) _bz_typename NumericTypeTraits<X>::T_difftype #define BZ_DIFFTYPE(X) _bz_typename NumericTypeTraits<X>::T_difftype
#define BZ_FLOATTYPE(X) _bz_typename NumericTypeTraits<X>::T_floattype #define BZ_FLOATTYPE(X) _bz_typename NumericTypeTraits<X>::T_floattype
#define BZ_SIGNEDTYPE(X) _bz_typename NumericTypeTraits<X>::T_signedtype #define BZ_SIGNEDTYPE(X) _bz_typename NumericTypeTraits<X>::T_signedtype
template<class P_numtype> template<typename P_numtype>
class NumericTypeTraits { class NumericTypeTraits {
public: public:
typedef P_numtype T_sumtype; // Type to be used for summing typedef P_numtype T_sumtype; // Type to be used for summing
typedef P_numtype T_difftype; // Type to be used for difference typedef P_numtype T_difftype; // Type to be used for difference
typedef P_numtype T_floattype; // Type to be used for floating-point typedef P_numtype T_floattype; // Type to be used for floating-point
// calculations // calculations
typedef P_numtype T_signedtype; // Type to be used for signed calculati ons typedef P_numtype T_signedtype; // Type to be used for signed calculati ons
enum { hasTrivialCtor = 0 }; // Assume the worst enum { hasTrivialCtor = 0 }; // Assume the worst
}; };
skipping to change at line 93 skipping to change at line 70
template<> \ template<> \
class NumericTypeTraits<X> { \ class NumericTypeTraits<X> { \
public: \ public: \
typedef Y T_sumtype; \ typedef Y T_sumtype; \
typedef Z T_difftype; \ typedef Z T_difftype; \
typedef W T_floattype; \ typedef W T_floattype; \
typedef U T_signedtype; \ typedef U T_signedtype; \
enum { hasTrivialCtor = 1 }; \ enum { hasTrivialCtor = 1 }; \
} }
#ifdef BZ_BOOL #ifdef BZ_HAVE_BOOL
BZDECLNUMTRAIT(bool,unsigned,int,float,int); BZDECLNUMTRAIT(bool,unsigned,int,float,int);
#endif #endif
BZDECLNUMTRAIT(char,int,int,float,char); BZDECLNUMTRAIT(char,int,int,float,char);
BZDECLNUMTRAIT(unsigned char, unsigned, int, float,int); BZDECLNUMTRAIT(unsigned char, unsigned, int, float,int);
BZDECLNUMTRAIT(short int, int, int, float, short int); BZDECLNUMTRAIT(short int, int, int, float, short int);
BZDECLNUMTRAIT(short unsigned int, unsigned int, int, float, int); BZDECLNUMTRAIT(short unsigned int, unsigned int, int, float, int);
BZDECLNUMTRAIT(int, long, int, float, int); BZDECLNUMTRAIT(int, long, int, float, int);
BZDECLNUMTRAIT(unsigned int, unsigned long, int, float, long); BZDECLNUMTRAIT(unsigned int, unsigned long, int, float, long);
BZDECLNUMTRAIT(long, long, long, double, long); BZDECLNUMTRAIT(long, long, long, double, long);
 End of changes. 5 change blocks. 
29 lines changed or deleted 6 lines changed or added


 ops.cc   ops.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/ops.cc Basic operators for arrays. * blitz/array/ops.cc Basic operators for arrays.
* *
* $Id: ops.cc,v 1.3 2002/06/27 00:11:52 jcumming Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: ops.cc,v $
* Revision 1.3 2002/06/27 00:11:52 jcumming
* Changed T_numtype to P_numtype when used outside the argument list or bo
dy
* of a member function definition (i.e., outside the class scope). Inside
* the class scope, we can use the typedef T_numtype. The IBM xlC compiler
* gets confused if P_numtype is used as a template parameter name in a mem
ber
* function declaration and then T_numtype is used as the parameter name in
* the member function definition. Fixed usage to be more consistent.
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYOPS_CC #ifndef BZ_ARRAYOPS_CC
#define BZ_ARRAYOPS_CC #define BZ_ARRAYOPS_CC
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/ops.cc> must be included via <blitz/array.h> #error <blitz/array/ops.cc> must be included via <blitz/array.h>
#endif #endif
#ifndef BZ_UPDATE_H #include <blitz/update.h>
#include <blitz/update.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* Constant operands * Constant operands
*/ */
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& Array<P_numtype,N_rank>::initialize( Array<P_numtype, N_rank>& Array<P_numtype,N_rank>::initialize(T_numtype x)
T_numtype x)
{ {
(*this) = _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) = _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
#ifdef BZ_NEW_EXPRESSION_TEMPLATES #ifdef BZ_NEW_EXPRESSION_TEMPLATES
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype,N_rank>& inline Array<P_numtype,N_rank>&
Array<P_numtype,N_rank>::operator=(const ETBase<T_expr>& expr) Array<P_numtype,N_rank>::operator=(const ETBase<T_expr>& expr)
{ {
evaluate(static_cast<const T_expr&>(expr), evaluate(expr.unwrap(),
_bz_update<T_numtype, _bz_typename T_expr::T_numtype>()); _bz_update<T_numtype, _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator=(const Array<T_numtype,N_rank>& x) Array<P_numtype, N_rank>::operator=(const Array<T_numtype,N_rank>& x)
{ {
(*this) = _bz_ArrayExpr<FastArrayIterator<T_numtype, N_rank> > (*this) = _bz_ArrayExpr<FastArrayIterator<T_numtype, N_rank> >
(x.beginFast()); (x.beginFast());
return *this; return *this;
} }
#define BZ_ARRAY_UPDATE(op,name) \ #define BZ_ARRAY_UPDATE(op,name) \
template<class P_numtype, int N_rank> \ template<typename P_numtype, int N_rank> \
template<class T> \ template<typename T> \
inline Array<P_numtype,N_rank>& \ inline Array<P_numtype,N_rank>& \
Array<P_numtype,N_rank>::operator op(const T& expr) \ Array<P_numtype,N_rank>::operator op(const T& expr) \
{ \ { \
evaluate(_bz_typename asExpr<T>::T_expr(expr), \ evaluate(_bz_typename asExpr<T>::T_expr(expr), \
name<T_numtype, _bz_typename asExpr<T>::T_expr::T_numtype>()); \ name<T_numtype, _bz_typename asExpr<T>::T_expr::T_numtype>()); \
return *this; \ return *this; \
} }
BZ_ARRAY_UPDATE(+=, _bz_plus_update) BZ_ARRAY_UPDATE(+=, _bz_plus_update)
BZ_ARRAY_UPDATE(-=, _bz_minus_update) BZ_ARRAY_UPDATE(-=, _bz_minus_update)
skipping to change at line 108 skipping to change at line 89
BZ_ARRAY_UPDATE(/=, _bz_divide_update) BZ_ARRAY_UPDATE(/=, _bz_divide_update)
BZ_ARRAY_UPDATE(%=, _bz_mod_update) BZ_ARRAY_UPDATE(%=, _bz_mod_update)
BZ_ARRAY_UPDATE(^=, _bz_xor_update) BZ_ARRAY_UPDATE(^=, _bz_xor_update)
BZ_ARRAY_UPDATE(&=, _bz_bitand_update) BZ_ARRAY_UPDATE(&=, _bz_bitand_update)
BZ_ARRAY_UPDATE(|=, _bz_bitor_update) BZ_ARRAY_UPDATE(|=, _bz_bitor_update)
BZ_ARRAY_UPDATE(<<=, _bz_shiftl_update) BZ_ARRAY_UPDATE(<<=, _bz_shiftl_update)
BZ_ARRAY_UPDATE(>>=, _bz_shiftr_update) BZ_ARRAY_UPDATE(>>=, _bz_shiftr_update)
#else #else
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype,N_rank>::operator+=(T_numtype x) Array<P_numtype,N_rank>::operator+=(T_numtype x)
{ {
(*this) += _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) += _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype,N_rank>::operator-=(T_numtype x) Array<P_numtype,N_rank>::operator-=(T_numtype x)
{ {
(*this) -= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) -= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype,N_rank>::operator*=(T_numtype x) Array<P_numtype,N_rank>::operator*=(T_numtype x)
{ {
(*this) *= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) *= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype,N_rank>::operator/=(T_numtype x) Array<P_numtype,N_rank>::operator/=(T_numtype x)
{ {
(*this) /= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) /= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype,N_rank>::operator%=(T_numtype x) Array<P_numtype,N_rank>::operator%=(T_numtype x)
{ {
(*this) %= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) %= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype,N_rank>::operator^=(T_numtype x) Array<P_numtype,N_rank>::operator^=(T_numtype x)
{ {
(*this) ^= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) ^= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype,N_rank>::operator&=(T_numtype x) Array<P_numtype,N_rank>::operator&=(T_numtype x)
{ {
(*this) &= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) &= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype,N_rank>::operator|=(T_numtype x) Array<P_numtype,N_rank>::operator|=(T_numtype x)
{ {
(*this) |= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) |= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype,N_rank>::operator>>=(T_numtype x) Array<P_numtype,N_rank>::operator>>=(T_numtype x)
{ {
(*this) <<= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) <<= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype,N_rank>::operator<<=(T_numtype x) Array<P_numtype,N_rank>::operator<<=(T_numtype x)
{ {
(*this) <<= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x); (*this) <<= _bz_ArrayExpr<_bz_ArrayExprConstant<T_numtype> >(x);
return *this; return *this;
} }
/* /*
* Array operands * Array operands
*/ */
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator=(const Array<T_numtype,N_rank>& x) Array<P_numtype, N_rank>::operator=(const Array<T_numtype,N_rank>& x)
{ {
(*this) = _bz_ArrayExpr<FastArrayIterator<T_numtype, N_rank> >(x.beginF ast()); (*this) = _bz_ArrayExpr<FastArrayIterator<T_numtype, N_rank> >(x.beginF ast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) = _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begin Fast()); (*this) = _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begin Fast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator+=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator+=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) += _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast()); (*this) += _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator-=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator-=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) -= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast()); (*this) -= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator*=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator*=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) *= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast()); (*this) *= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator/=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator/=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) /= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast()); (*this) /= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator%=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator%=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) %= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast()); (*this) %= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator^=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator^=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) ^= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast()); (*this) ^= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator&=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator&=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) &= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast()); (*this) &= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator|=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator|=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) |= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast()); (*this) |= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.begi nFast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator>>=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator>>=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) >>= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.beg inFast()); (*this) >>= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.beg inFast());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class P_numtype2> template<typename P_numtype, int N_rank> template<typename P_numtype2>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator<<=(const Array<P_numtype2,N_rank>& x) Array<P_numtype, N_rank>::operator<<=(const Array<P_numtype2,N_rank>& x)
{ {
(*this) <<= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.beg inFast()); (*this) <<= _bz_ArrayExpr<FastArrayIterator<P_numtype2, N_rank> >(x.beg inFast());
return *this; return *this;
} }
/* /*
* Array expression operands * Array expression operands
*/ */
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) Array<P_numtype, N_rank>::operator=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr)
{ {
evaluate(expr, _bz_update<T_numtype, _bz_typename T_expr::T_numtype>()) ; evaluate(expr, _bz_update<T_numtype, _bz_typename T_expr::T_numtype>()) ;
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator+=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) Array<P_numtype, N_rank>::operator+=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr)
{ {
evaluate(expr, _bz_plus_update<T_numtype, _bz_typename T_expr::T_numtyp e>()); evaluate(expr, _bz_plus_update<T_numtype, _bz_typename T_expr::T_numtyp e>());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator-=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) Array<P_numtype, N_rank>::operator-=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr)
{ {
evaluate(expr, _bz_minus_update<T_numtype, evaluate(expr, _bz_minus_update<T_numtype,
_bz_typename T_expr::T_numtype>()); _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator*=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) Array<P_numtype, N_rank>::operator*=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr)
{ {
evaluate(expr, _bz_multiply_update<T_numtype, evaluate(expr, _bz_multiply_update<T_numtype,
_bz_typename T_expr::T_numtype>()); _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator/=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) Array<P_numtype, N_rank>::operator/=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr)
{ {
evaluate(expr, _bz_divide_update<T_numtype, evaluate(expr, _bz_divide_update<T_numtype,
_bz_typename T_expr::T_numtype>()); _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator%=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) Array<P_numtype, N_rank>::operator%=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr)
{ {
evaluate(expr, _bz_mod_update<T_numtype, evaluate(expr, _bz_mod_update<T_numtype,
_bz_typename T_expr::T_numtype>()); _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator^=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) Array<P_numtype, N_rank>::operator^=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr)
{ {
evaluate(expr, _bz_xor_update<T_numtype, evaluate(expr, _bz_xor_update<T_numtype,
_bz_typename T_expr::T_numtype>()); _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator&=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) Array<P_numtype, N_rank>::operator&=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr)
{ {
evaluate(expr, _bz_bitand_update<T_numtype, evaluate(expr, _bz_bitand_update<T_numtype,
_bz_typename T_expr::T_numtype>()); _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator|=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr) Array<P_numtype, N_rank>::operator|=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr)
{ {
evaluate(expr, _bz_bitor_update<T_numtype, evaluate(expr, _bz_bitor_update<T_numtype,
_bz_typename T_expr::T_numtype>()); _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator>>=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr ) Array<P_numtype, N_rank>::operator>>=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr )
{ {
evaluate(expr, _bz_shiftr_update<T_numtype, evaluate(expr, _bz_shiftr_update<T_numtype,
_bz_typename T_expr::T_numtype>()); _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_rank> template<class T_expr> template<typename P_numtype, int N_rank> template<typename T_expr>
inline Array<P_numtype, N_rank>& inline Array<P_numtype, N_rank>&
Array<P_numtype, N_rank>::operator<<=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr ) Array<P_numtype, N_rank>::operator<<=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr )
{ {
evaluate(expr, _bz_shiftl_update<T_numtype, evaluate(expr, _bz_shiftl_update<T_numtype,
_bz_typename T_expr::T_numtype>()); _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
#endif // BZ_NEW_EXPRESSION_TEMPLATES #endif // BZ_NEW_EXPRESSION_TEMPLATES
 End of changes. 41 change blocks. 
64 lines changed or deleted 43 lines changed or added


 ops.h   ops.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/ops.h Array operators * blitz/array/ops.h Array operators
* *
* $Id: ops.h,v 1.3 2002/07/02 19:12:50 jcumming Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: ops.h,v $
* Revision 1.3 2002/07/02 19:12:50 jcumming
* Use new style of Array ET macros to create unary and binary operators
* that act on Array types.
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_OPS_H #ifndef BZ_ARRAY_OPS_H
#define BZ_ARRAY_OPS_H #define BZ_ARRAY_OPS_H
#ifndef BZ_OPS_H #include <blitz/ops.h>
#include <blitz/ops.h> #include <blitz/array/newet-macros.h>
#endif
#ifndef BZ_NEWET_MACROS_H
#include <blitz/array/newet-macros.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// unary operators // unary operators
BZ_DECLARE_ARRAY_ET_UNARY(operator~, BitwiseNot) BZ_DECLARE_ARRAY_ET_UNARY(operator~, BitwiseNot)
BZ_DECLARE_ARRAY_ET_UNARY(operator!, LogicalNot) BZ_DECLARE_ARRAY_ET_UNARY(operator!, LogicalNot)
BZ_DECLARE_ARRAY_ET_UNARY(operator+, UnaryPlus) BZ_DECLARE_ARRAY_ET_UNARY(operator+, UnaryPlus)
BZ_DECLARE_ARRAY_ET_UNARY(operator-, UnaryMinus) BZ_DECLARE_ARRAY_ET_UNARY(operator-, UnaryMinus)
skipping to change at line 80 skipping to change at line 64
// BZ_DECLARE_ARRAY_ET_BINARY(operator<<, ShiftLeft) // BZ_DECLARE_ARRAY_ET_BINARY(operator<<, ShiftLeft)
BZ_DECLARE_ARRAY_ET_BINARY(operator>, Greater) BZ_DECLARE_ARRAY_ET_BINARY(operator>, Greater)
BZ_DECLARE_ARRAY_ET_BINARY(operator<, Less) BZ_DECLARE_ARRAY_ET_BINARY(operator<, Less)
BZ_DECLARE_ARRAY_ET_BINARY(operator>=, GreaterOrEqual) BZ_DECLARE_ARRAY_ET_BINARY(operator>=, GreaterOrEqual)
BZ_DECLARE_ARRAY_ET_BINARY(operator<=, LessOrEqual) BZ_DECLARE_ARRAY_ET_BINARY(operator<=, LessOrEqual)
BZ_DECLARE_ARRAY_ET_BINARY(operator==, Equal) BZ_DECLARE_ARRAY_ET_BINARY(operator==, Equal)
BZ_DECLARE_ARRAY_ET_BINARY(operator!=, NotEqual) BZ_DECLARE_ARRAY_ET_BINARY(operator!=, NotEqual)
BZ_DECLARE_ARRAY_ET_BINARY(operator&&, LogicalAnd) BZ_DECLARE_ARRAY_ET_BINARY(operator&&, LogicalAnd)
BZ_DECLARE_ARRAY_ET_BINARY(operator||, LogicalOr) BZ_DECLARE_ARRAY_ET_BINARY(operator||, LogicalOr)
BZ_DECLARE_ARRAY_ET_BINARY(min, _bz_Min)
BZ_DECLARE_ARRAY_ET_BINARY(max, _bz_Max)
// Declare binary ops between Array and "scalar-like" TinyVector
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator+, Add)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator-, Subtract)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator*, Multiply)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator/, Divide)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator%, Modulo)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator^, BitwiseXor)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator&, BitwiseAnd)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator|, BitwiseOr)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator>, Greater)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator<, Less)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator>=, GreaterOrEqual)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator<=, LessOrEqual)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator==, Equal)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator!=, NotEqual)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator&&, LogicalAnd)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(operator||, LogicalOr)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(min, _bz_Min)
BZ_DECLARE_ARRAY_ET_BINARY_TINYVEC(max, _bz_Max)
#define BZ_DECLARE_ARRAY_ET_SCALAR_OPS(sca) \
\
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator+, Add, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator-, Subtract, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator*, Multiply, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator/, Divide, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator%, Modulo, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator^, BitwiseXor, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator&, BitwiseAnd, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator|, BitwiseOr, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator>, Greater, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator<, Less, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator>=, GreaterOrEqual, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator<=, LessOrEqual, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator==, Equal, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator!=, NotEqual, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator&&, LogicalAnd, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(operator||, LogicalOr, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(min, _bz_Min, sca) \
BZ_DECLARE_ARRAY_ET_BINARY_SCALAR(max, _bz_Max, sca) \
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(char)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(unsigned char)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(short)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(unsigned short)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(int)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(unsigned int)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(long)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(unsigned long)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(float)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(double)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(long double)
#ifdef BZ_HAVE_COMPLEX
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(complex<float>)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(complex<double>)
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(complex<long double>)
#endif
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ARRAY_OPS_H #endif // BZ_ARRAY_OPS_H
 End of changes. 5 change blocks. 
21 lines changed or deleted 66 lines changed or added


 prettyprint.h   prettyprint.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/prettyprint.h Format object for pretty-printing of * blitz/prettyprint.h Format object for pretty-printing of
* array expressions * array expressions
* *
* $Id: prettyprint.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: prettyprint.h,v 1.5 2004/03/09 23:23:43 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: prettyprint.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
*/
#ifndef BZ_PRETTYPRINT_H #ifndef BZ_PRETTYPRINT_H
#define BZ_PRETTYPRINT_H #define BZ_PRETTYPRINT_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
class prettyPrintFormat { class prettyPrintFormat {
public: public:
prettyPrintFormat(_bz_bool terse = _bz_false) prettyPrintFormat(const bool terse = false)
: tersePrintingSelected_(terse) : tersePrintingSelected_(terse)
{ {
arrayOperandCounter_ = 0; arrayOperandCounter_ = 0;
scalarOperandCounter_ = 0; scalarOperandCounter_ = 0;
dumpArrayShapes_ = _bz_false; dumpArrayShapes_ = false;
}
void setDumpArrayShapesMode()
{
dumpArrayShapes_ = _bz_true;
} }
void setDumpArrayShapesMode() { dumpArrayShapes_ = true; }
char nextArrayOperandSymbol() char nextArrayOperandSymbol()
{ {
return 'A' + ((arrayOperandCounter_++) % 26); return static_cast<char>('A' + ((arrayOperandCounter_++) % 26));
} }
char nextScalarOperandSymbol() char nextScalarOperandSymbol()
{ {
return 's' + ((scalarOperandCounter_++) % 26); return static_cast<char>('s' + ((scalarOperandCounter_++) % 26));
}
_bz_bool tersePrintingSelected() const
{
return tersePrintingSelected_;
} }
_bz_bool dumpArrayShapesMode() const bool tersePrintingSelected() const { return tersePrintingSelected_; }
{ bool dumpArrayShapesMode() const { return dumpArrayShapes_; }
return dumpArrayShapes_;
}
private: private:
_bz_bool tersePrintingSelected_; bool tersePrintingSelected_;
_bz_bool dumpArrayShapes_; bool dumpArrayShapes_;
int arrayOperandCounter_; int arrayOperandCounter_;
int scalarOperandCounter_; int scalarOperandCounter_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_PRETTYPRINT_H #endif // BZ_PRETTYPRINT_H
 End of changes. 11 change blocks. 
36 lines changed or deleted 14 lines changed or added


 product.h   product.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/meta/product.h TinyVector product metaprogram * blitz/meta/product.h TinyVector product metaprogram
* *
* $Id: product.h,v 1.2 2001/01/24 20:22:51 tveldhui Exp $ * $Id: product.h,v 1.5 2005/05/07 04:17:57 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: product.h,v $
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:08:44 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_META_PRODUCT_H #ifndef BZ_META_PRODUCT_H
#define BZ_META_PRODUCT_H #define BZ_META_PRODUCT_H
#ifndef BZ_PROMOTE_H #ifndef BZ_PROMOTE_H
#include <blitz/promote.h> #include <blitz/promote.h>
#endif #endif
#ifndef BZ_METAPROG_H #ifndef BZ_METAPROG_H
#include <blitz/meta/metaprog.h> #include <blitz/meta/metaprog.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<int N, int I> template<int N, int I>
class _bz_meta_vectorProduct { class _bz_meta_vectorProduct {
public: public:
enum { loopFlag = (I < N-1) ? 1 : 0 }; static const int loopFlag = (I < N-1) ? 1 : 0;
template<class T_expr1> template<typename T_expr1>
static inline BZ_SUMTYPE(_bz_typename T_expr1::T_numtype) static inline BZ_SUMTYPE(_bz_typename T_expr1::T_numtype)
f(const T_expr1& a) f(const T_expr1& a)
{ {
return a[I] * _bz_meta_vectorProduct<loopFlag * N, return a[I] * _bz_meta_vectorProduct<loopFlag * N,
loopFlag * (I+1)>::f(a); loopFlag * (I+1)>::f(a);
} }
}; };
template<> template<>
class _bz_meta_vectorProduct<0,0> { class _bz_meta_vectorProduct<0,0> {
public: public:
template<class T_expr1> template<typename T_expr1>
static inline _bz_meta_nullOperand f(const T_expr1&) static inline _bz_meta_nullOperand f(const T_expr1&)
{ return _bz_meta_nullOperand(); } { return _bz_meta_nullOperand(); }
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_META_PRODUCT_H #endif // BZ_META_PRODUCT_H
 End of changes. 6 change blocks. 
20 lines changed or deleted 7 lines changed or added


 promote-old.h   promote-old.h 
skipping to change at line 26 skipping to change at line 26
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** * ************************************************************************** *
*/ */
// Generated: genpromote.cpp Aug 7 1997 14:59:32 // Generated: genpromote.cpp Dec 10 2003 17:58:28
template<typename A, typename B>
template<class A, class B>
class promote_trait { class promote_trait {
public: public:
typedef A T_promote; typedef A T_promote;
}; };
template<> template<>
class promote_trait<char, char> { class promote_trait<char, char> {
public: public:
typedef int T_promote; typedef int T_promote;
}; };
 End of changes. 1 change blocks. 
3 lines changed or deleted 2 lines changed or added


 promote.h   promote.h 
// -*- C++ -*-
/*********************************************************************** /***********************************************************************
* promote.h Arithmetic type promotion trait class * promote.h Arithmetic type promotion trait class
* Author: Todd Veldhuizen (tveldhui@oonumerics.org) * Author: Todd Veldhuizen (tveldhui@oonumerics.org)
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
skipping to change at line 23 skipping to change at line 24
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Id: promote.h,v 1.5 2002/07/02 19:34:50 jcumming Exp $
*
* $Log: promote.h,v $
* Revision 1.5 2002/07/02 19:34:50 jcumming
* Added BZ_BLITZ_SCOPE to promote_trait in BZ_PROMOTE macro definition
* so that this macro works correctly outside the blitz namespace.
*
* Revision 1.4 2002/03/06 16:58:19 patricg
*
* typename replaced by _bz_typename
*
* Revision 1.3 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_PROMOTE_H #ifndef BZ_PROMOTE_H
#define BZ_PROMOTE_H #define BZ_PROMOTE_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
#ifdef BZ_TEMPLATE_QUALIFIED_RETURN_TYPE #ifdef BZ_HAVE_TEMPLATE_QUALIFIED_RETURN_TYPE
#define BZ_PROMOTE(A,B) _bz_typename BZ_BLITZ_SCOPE(promote_trait)<A,B> ::T_promote #define BZ_PROMOTE(A,B) _bz_typename BZ_BLITZ_SCOPE(promote_trait)<A,B> ::T_promote
#else #else
#define BZ_PROMOTE(A,B) A #define BZ_PROMOTE(A,B) A
#endif #endif
#if defined(BZ_PARTIAL_SPECIALIZATION) && !defined(BZ_DISABLE_NEW_PROMOTE) #if defined(BZ_HAVE_PARTIAL_SPECIALIZATION) && !defined(BZ_DISABLE_NEW_PROM OTE)
/* /*
* This compiler supports partial specialization, so type promotion * This compiler supports partial specialization, so type promotion
* can be done the elegant way. This implementation is after ideas * can be done the elegant way. This implementation is after ideas
* by Jean-Louis Leroy. * by Jean-Louis Leroy.
*/ */
template<class T> template<typename T>
struct precision_trait { struct precision_trait {
enum { precisionRank = 0, static const int precisionRank = 0;
knowPrecisionRank = 0 }; static const bool knowPrecisionRank = false;
}; };
#define BZ_DECLARE_PRECISION(T,rank) \ #define BZ_DECLARE_PRECISION(T,rank) \
template<> \ template<> \
struct precision_trait< T > { \ struct precision_trait< T > { \
enum { precisionRank = rank, \ static const int precisionRank = rank; \
knowPrecisionRank = 1 }; \ static const bool knowPrecisionRank = true; \
}; };
BZ_DECLARE_PRECISION(int,100) BZ_DECLARE_PRECISION(int,100)
BZ_DECLARE_PRECISION(unsigned int,200) BZ_DECLARE_PRECISION(unsigned int,200)
BZ_DECLARE_PRECISION(long,300) BZ_DECLARE_PRECISION(long,300)
BZ_DECLARE_PRECISION(unsigned long,400) BZ_DECLARE_PRECISION(unsigned long,400)
BZ_DECLARE_PRECISION(float,500) BZ_DECLARE_PRECISION(float,500)
BZ_DECLARE_PRECISION(double,600) BZ_DECLARE_PRECISION(double,600)
BZ_DECLARE_PRECISION(long double,700) BZ_DECLARE_PRECISION(long double,700)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
BZ_DECLARE_PRECISION(complex<float>,800) BZ_DECLARE_PRECISION(complex<float>,800)
BZ_DECLARE_PRECISION(complex<double>,900) BZ_DECLARE_PRECISION(complex<double>,900)
BZ_DECLARE_PRECISION(complex<long double>,1000) BZ_DECLARE_PRECISION(complex<long double>,1000)
#endif #endif
template<class T> template<typename T>
struct autopromote_trait { struct autopromote_trait {
typedef T T_numtype; typedef T T_numtype;
}; };
#define BZ_DECLARE_AUTOPROMOTE(T1,T2) \ #define BZ_DECLARE_AUTOPROMOTE(T1,T2) \
template<> \ template<> \
struct autopromote_trait<T1> { \ struct autopromote_trait<T1> { \
typedef T2 T_numtype; \ typedef T2 T_numtype; \
}; };
// These are the odd cases where small integer types // These are the odd cases where small integer types
// are automatically promoted to int or unsigned int for // are automatically promoted to int or unsigned int for
// arithmetic. // arithmetic.
BZ_DECLARE_AUTOPROMOTE(bool, int) BZ_DECLARE_AUTOPROMOTE(bool, int)
BZ_DECLARE_AUTOPROMOTE(char, int) BZ_DECLARE_AUTOPROMOTE(char, int)
BZ_DECLARE_AUTOPROMOTE(unsigned char, int) BZ_DECLARE_AUTOPROMOTE(unsigned char, int)
BZ_DECLARE_AUTOPROMOTE(short int, int) BZ_DECLARE_AUTOPROMOTE(short int, int)
BZ_DECLARE_AUTOPROMOTE(short unsigned int, unsigned int) BZ_DECLARE_AUTOPROMOTE(short unsigned int, unsigned int)
template<class T1, class T2, int promoteToT1> template<typename T1, typename T2, bool promoteToT1>
struct _bz_promote2 { struct _bz_promote2 {
typedef T1 T_promote; typedef T1 T_promote;
}; };
template<class T1, class T2> template<typename T1, typename T2>
struct _bz_promote2<T1,T2,0> { struct _bz_promote2<T1,T2,false> {
typedef T2 T_promote; typedef T2 T_promote;
}; };
template<class T1_orig, class T2_orig> template<typename T1_orig, typename T2_orig>
struct promote_trait { struct promote_trait {
// Handle promotion of small integers to int/unsigned int // Handle promotion of small integers to int/unsigned int
typedef _bz_typename autopromote_trait<T1_orig>::T_numtype T1; typedef _bz_typename autopromote_trait<T1_orig>::T_numtype T1;
typedef _bz_typename autopromote_trait<T2_orig>::T_numtype T2; typedef _bz_typename autopromote_trait<T2_orig>::T_numtype T2;
// True if T1 is higher ranked // True if T1 is higher ranked
enum { static const bool
T1IsBetter = T1IsBetter =
BZ_ENUM_CAST(precision_trait<T1>::precisionRank) > precision_trait<T1>::precisionRank >
BZ_ENUM_CAST(precision_trait<T2>::precisionRank), precision_trait<T2>::precisionRank;
// True if we know ranks for both T1 and T2 // True if we know ranks for both T1 and T2
knowBothRanks = static const bool
BZ_ENUM_CAST(precision_trait<T1>::knowPrecisionRank) knowBothRanks =
&& BZ_ENUM_CAST(precision_trait<T2>::knowPrecisionRank), precision_trait<T1>::knowPrecisionRank &&
precision_trait<T2>::knowPrecisionRank;
// True if we know T1 but not T2 // True if we know T1 but not T2
knowT1butNotT2 = BZ_ENUM_CAST(precision_trait<T1>::knowPrecisionRank static const bool
) knowT1butNotT2 =
&& !(BZ_ENUM_CAST(precision_trait<T2>::knowPrecisionRank)), precision_trait<T1>::knowPrecisionRank &&
!precision_trait<T2>::knowPrecisionRank;
// True if we know T2 but not T1 // True if we know T2 but not T1
knowT2butNotT1 = BZ_ENUM_CAST(precision_trait<T2>::knowPrecisionRank static const bool
) knowT2butNotT1 =
&& !(BZ_ENUM_CAST(precision_trait<T1>::knowPrecisionRank)), precision_trait<T2>::knowPrecisionRank &&
!precision_trait<T1>::knowPrecisionRank;
// True if T1 is bigger than T2 // True if T1 is bigger than T2
T1IsLarger = sizeof(T1) >= sizeof(T2), static const bool
T1IsLarger = sizeof(T1) >= sizeof(T2);
// We know T1 but not T2: true // We know T1 but not T2: false
// We know T2 but not T1: false // We know T2 but not T1: true
// Otherwise, if T1 is bigger than T2: true // Otherwise, if T1 is bigger than T2: true
defaultPromotion = knowT1butNotT2 ? _bz_false : // static const bool
(knowT2butNotT1 ? _bz_true : T1IsLarger) // defaultPromotion = knowT1butNotT2 ? false :
}; // (knowT2butNotT1 ? true : T1IsLarger);
// If we have both ranks, then use them. // If we have both ranks, then use them.
// If we have only one rank, then use the unknown type. // If we have only one rank, then use the unknown type.
// If we have neither rank, then promote to the larger type. // If we have neither rank, then promote to the larger type.
static const bool
enum { promoteToT1 = knowBothRanks ? T1IsBetter : (knowT1butNotT2 ? false
promoteToT1 = (BZ_ENUM_CAST(knowBothRanks) ? BZ_ENUM_CAST(T1IsBetter) :
: BZ_ENUM_CAST(defaultPromotion)) ? 1 : 0 (knowT2butNotT1 ? true : T1IsLarger));
}; // static const bool
// promoteToT1 = knowBothRanks ? T1IsBetter : defaultPromotion;
typedef _bz_typename _bz_promote2<T1,T2,promoteToT1>::T_promote T_promo te; typedef _bz_typename _bz_promote2<T1,T2,promoteToT1>::T_promote T_promo te;
}; };
#else // !BZ_PARTIAL_SPECIALIZATION #else // !BZ_HAVE_PARTIAL_SPECIALIZATION
// No partial specialization -- have to do it the ugly way. // No partial specialization -- have to do it the ugly way.
#include <blitz/promote-old.h> #include <blitz/promote-old.h>
#endif // !BZ_PARTIAL_SPECIALIZATION #endif // !BZ_HAVE_PARTIAL_SPECIALIZATION
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_PROMOTE_H #endif // BZ_PROMOTE_H
 End of changes. 21 change blocks. 
58 lines changed or deleted 49 lines changed or added


 rand-dunif.h   rand-dunif.h 
/************************************************************************** * /************************************************************************** *
* blitz/rand-dunif.h Discrete uniform generator * blitz/rand-dunif.h Discrete uniform generator
* *
* $Id: rand-dunif.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: rand-dunif.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: rand-dunif.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_RAND_DUNIF_H #ifndef BZ_RAND_DUNIF_H
#define BZ_RAND_DUNIF_H #define BZ_RAND_DUNIF_H
#ifndef BZ_RANDOM_H #ifndef BZ_RANDOM_H
#include <blitz/random.h> #include <blitz/random.h>
#endif #endif
#ifndef BZ_RAND_UNIFORM_H #ifndef BZ_RAND_UNIFORM_H
#include <blitz/rand-uniform.h> #include <blitz/rand-uniform.h>
#endif #endif
#include <math.h> #include <math.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_uniform BZ_TEMPLATE_DEFAULT(Uniform)> template<typename P_uniform BZ_TEMPLATE_DEFAULT(Uniform)>
class DiscreteUniform { class DiscreteUniform {
public: public:
typedef int T_numtype; typedef int T_numtype;
typedef P_uniform T_uniform; typedef P_uniform T_uniform;
DiscreteUniform(int low, int high, double=0) DiscreteUniform(int low, int high, double=0)
: low_(low), range_(high-low+1) : low_(low), range_(high-low+1)
{ {
} }
 End of changes. 3 change blocks. 
18 lines changed or deleted 4 lines changed or added


 rand-mt.h   rand-mt.h 
skipping to change at line 87 skipping to change at line 87
twist_int s0; twist_int s0;
}; };
enum { N = 624, PF = 397, reference_seed = 4357 }; enum { N = 624, PF = 397, reference_seed = 4357 };
public: public:
MersenneTwister () {} // S empty will trigger auto-seed MersenneTwister () {} // S empty will trigger auto-seed
void seed (twist_int seed = reference_seed) void seed (twist_int seed = reference_seed)
{ {
if (!S.size()) S.resize (N); if (!S.size()) S.resize(N);
enum { Knuth_A = 69069 }; enum { Knuth_A = 69069 };
twist_int x = seed & 0xFFFFFFFF; twist_int x = seed & 0xFFFFFFFF;
Iter s = &S[0]; Iter s = S.begin();
twist_int mask = (seed == reference_seed) ? 0 : 0xFFFFFFFF; twist_int mask = (seed == reference_seed) ? 0 : 0xFFFFFFFF;
for (int j = 0; j < N; ++j) { for (int j = 0; j < N; ++j) {
// adding j here avoids the risk of all zeros // adding j here avoids the risk of all zeros
// we suppress this term in "compatibility" mode // we suppress this term in "compatibility" mode
*s++ = (x + (mask & j)) & 0xFFFFFFFF; *s++ = (x + (mask & j)) & 0xFFFFFFFF;
x *= Knuth_A; x *= Knuth_A;
} }
reload();
} }
void reload (void) void reload (void)
{ {
if (!S.size()) seed (); // auto-seed detection if (!S.size()) seed (); // auto-seed detection
Iter p0 = &S[0]; Iter p0 = S.begin();
Iter pM = p0 + PF; Iter pM = p0 + PF;
BitMixer twist; BitMixer twist;
twist (S[0]); // prime the pump twist (S[0]); // prime the pump
for (Iter pf_end = &S[N-PF]; p0 != pf_end; ++p0, ++pM) for (Iter pf_end = S.begin()+(N-PF); p0 != pf_end; ++p0, ++pM)
*p0 = *pM ^ twist (p0[1]); *p0 = *pM ^ twist (p0[1]);
pM = S.begin(); pM = S.begin();
for (Iter s_end = &S[N-1]; p0 != s_end; ++p0, ++pM) for (Iter s_end = S.begin()+(N-1); p0 != s_end; ++p0, ++pM)
*p0 = *pM ^ twist (p0[1]); *p0 = *pM ^ twist (p0[1]);
*p0 = *pM ^ twist (S[0]); *p0 = *pM ^ twist (S[0]);
I = &S[0]; I = S.begin();
} }
inline twist_int random (void) inline twist_int random (void)
{ {
if (I >= S.end()) reload(); if (I >= S.end()) reload();
twist_int y = *I++; twist_int y = *I++;
y ^= (y >> 11); y ^= (y >> 11);
y ^= (y << 7) & 0x9D2C5680; y ^= (y << 7) & 0x9D2C5680;
y ^= (y << 15) & 0xEFC60000; y ^= (y << 15) & 0xEFC60000;
y ^= (y >> 18); y ^= (y >> 18);
 End of changes. 7 change blocks. 
6 lines changed or deleted 7 lines changed or added


 rand-normal.h   rand-normal.h 
/************************************************************************** * /************************************************************************** *
* blitz/rand-normal.h Random Gaussian (Normal) generator * blitz/rand-normal.h Random Gaussian (Normal) generator
* *
* $Id: rand-normal.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: rand-normal.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 36 skipping to change at line 36
* This generator transforms a (0,1] uniform distribution into * This generator transforms a (0,1] uniform distribution into
* a Normal distribution. Let u,v be (0,1] random variables. Then * a Normal distribution. Let u,v be (0,1] random variables. Then
* *
* x = sqrt(-2 ln v) cos(pi (2u-1)) * x = sqrt(-2 ln v) cos(pi (2u-1))
* *
* is N(0,1) distributed. * is N(0,1) distributed.
* *
* Reference: Athanasios Papoulis, "Probability, random variables, * Reference: Athanasios Papoulis, "Probability, random variables,
* and stochastic processes," McGraw-Hill : Toronto, 1991. * and stochastic processes," McGraw-Hill : Toronto, 1991.
* *
************************************************************************** **************************************************************************
* */
*
* $Log: rand-normal.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/
#ifndef BZ_RAND_NORMAL_H #ifndef BZ_RAND_NORMAL_H
#define BZ_RAND_NORMAL_H #define BZ_RAND_NORMAL_H
#ifndef BZ_RANDOM_H #ifndef BZ_RANDOM_H
#include <blitz/random.h> #include <blitz/random.h>
#endif #endif
#ifndef BZ_RAND_UNIFORM_H #ifndef BZ_RAND_UNIFORM_H
#include <blitz/rand-uniform.h> #include <blitz/rand-uniform.h>
#endif #endif
#include <math.h> #include <math.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_uniform BZ_TEMPLATE_DEFAULT(Uniform)> template<typename P_uniform BZ_TEMPLATE_DEFAULT(Uniform)>
class Normal { class Normal {
public: public:
typedef double T_numtype; typedef double T_numtype;
Normal(double mean = 0.0, double variance = 1.0, double = 0.0) Normal(double mean = 0.0, double variance = 1.0, double = 0.0)
: mean_(mean), sigma_(::sqrt(variance)) : mean_(mean), sigma_(::sqrt(variance))
{ {
} }
 End of changes. 3 change blocks. 
22 lines changed or deleted 4 lines changed or added


 rand-tt800.h   rand-tt800.h 
/************************************************************************** * /************************************************************************** *
* blitz/rand-tt800.h Matsumoto and Kurita's TT800 uniform random * blitz/rand-tt800.h Matsumoto and Kurita's TT800 uniform random
* number generator. * number generator.
* *
* $Id: rand-tt800.h,v 1.1.1.1 2000/06/19 12:26:12 tveldhui Exp $ * $Id: rand-tt800.h,v 1.2 2003/01/14 11:29:18 patricg Exp $
* *
************************************************************************** * ************************************************************************** *
* *
* The class TT800 encapsulates Makoto Matsumoto and Yoshiharu Kurita's * The class TT800 encapsulates Makoto Matsumoto and Yoshiharu Kurita's
* TT800 twisted generalized feedback shift register (TGFSR) random number * TT800 twisted generalized feedback shift register (TGFSR) random number
* generator. The generator has period 2^800 - 1. * generator. The generator has period 2^800 - 1.
* *
* Contact: M. Matsumoto <matumoto@math.keio.ac.jp> * Contact: M. Matsumoto <matumoto@math.keio.ac.jp>
* *
* See: M. Matsumoto and Y. Kurita, Twisted GFSR Generators II, * See: M. Matsumoto and Y. Kurita, Twisted GFSR Generators II,
* ACM Transactions on Modelling and Computer Simulation, * ACM Transactions on Modelling and Computer Simulation,
* Vol. 4, No. 3, 1994, pages 254-266. * Vol. 4, No. 3, 1994, pages 254-266.
* *
* (c) 1994 Association for Computing Machinery. * (c) 1994 Association for Computing Machinery.
* *
* Distributed with consent of the authors. * Distributed with consent of the authors.
* *
************************************************************************** **************************************************************************
* */
*
* $Log: rand-tt800.h,v $
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.1 1997/02/28 13:39:51 tveldhui
* Initial revision
*
*/
#ifndef BZ_RAND_TT800_H #ifndef BZ_RAND_TT800_H
#define BZ_RAND_TT800_H #define BZ_RAND_TT800_H
#ifndef BZ_RANDOM_H #ifndef BZ_RANDOM_H
#include <blitz/random.h> #include <blitz/random.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
 End of changes. 2 change blocks. 
15 lines changed or deleted 3 lines changed or added


 rand-uniform.h   rand-uniform.h 
/************************************************************************** * /************************************************************************** *
* blitz/rand-uniform.h Uniform class, which provides uniformly * blitz/rand-uniform.h Uniform class, which provides uniformly
* distributed random numbers. * distributed random numbers.
* *
* $Id: rand-uniform.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: rand-uniform.h,v 1.3 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 40 skipping to change at line 40
* *
* See also: G. S. Fishman, Multiplicative congruential random number * See also: G. S. Fishman, Multiplicative congruential random number
* generators with modulus 2^b: an exhaustive analysis for b=32 and * generators with modulus 2^b: an exhaustive analysis for b=32 and
* a partial analysis for b=48, Math. Comp. 189, pp 331-344, 1990. * a partial analysis for b=48, Math. Comp. 189, pp 331-344, 1990.
* *
* This routine requires 32-bit integers. * This routine requires 32-bit integers.
* *
* The generated number lies in the open interval (low,high). i.e. low and * The generated number lies in the open interval (low,high). i.e. low and
* high themselves will never be generated. * high themselves will never be generated.
* *
************************************************************************** **************************************************************************
* */
*
* $Log: rand-uniform.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/
#ifndef BZ_RAND_UNIFORM_H #ifndef BZ_RAND_UNIFORM_H
#define BZ_RAND_UNIFORM_H #define BZ_RAND_UNIFORM_H
#ifndef BZ_RANDOM_H #ifndef BZ_RANDOM_H
#include <blitz/random.h> #include <blitz/random.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
 End of changes. 2 change blocks. 
21 lines changed or deleted 3 lines changed or added


 random.h   random.h 
/************************************************************************** * /************************************************************************** *
* blitz/random.h Random number generator wrapper class * blitz/random.h Random number generator wrapper class
* *
* $Id: random.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: random.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: random.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/
#ifndef BZ_RANDOM_H #ifndef BZ_RANDOM_H
#define BZ_RANDOM_H #define BZ_RANDOM_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_distribution> template<typename P_distribution>
class Random { class Random {
public: public:
typedef P_distribution T_distribution; typedef P_distribution T_distribution;
typedef _bz_typename T_distribution::T_numtype T_numtype; typedef _bz_typename T_distribution::T_numtype T_numtype;
Random(double parm1=0.0, double parm2=1.0, double parm3=0.0) Random(double parm1=0.0, double parm2=1.0, double parm3=0.0)
: generator_(parm1, parm2, parm3) : generator_(parm1, parm2, parm3)
{ } { }
 End of changes. 3 change blocks. 
21 lines changed or deleted 4 lines changed or added


 randref.h   randref.h 
/************************************************************************** * /************************************************************************** *
* blitz/randref.h Random number generators, expression templates * blitz/randref.h Random number generators, expression templates
* wrapper * wrapper
* *
* $Id: randref.h,v 1.3 2002/05/10 14:31:20 patricg Exp $ * $Id: randref.h,v 1.5 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: randref.h,v $
* Revision 1.3 2002/05/10 14:31:20 patricg
*
* private constructor for template class _bz_VecExprRandom did not had an
* explicit initialiser for the private member random_, added one
* Compaq C++ V6.5-014 for Compaq Tru64 UNIX V5.1A (Rev. 1885) complained a
bout
* this.
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.3 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/
#ifndef BZ_RANDREF_H #ifndef BZ_RANDREF_H
#define BZ_RANDREF_H #define BZ_RANDREF_H
#ifndef BZ_RANDOM_H #ifndef BZ_RANDOM_H
#error <blitz/randref.h> must be included via <blitz/random.h> #error <blitz/randref.h> must be included via <blitz/random.h>
#endif // BZ_RANDOM_H #endif // BZ_RANDOM_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_distribution> template<typename P_distribution>
class _bz_VecExprRandom { class _bz_VecExprRandom {
public: public:
typedef _bz_typename Random<P_distribution>::T_numtype T_numtype; typedef _bz_typename Random<P_distribution>::T_numtype T_numtype;
_bz_VecExprRandom(Random<P_distribution>& random) _bz_VecExprRandom(Random<P_distribution>& random)
: random_(random) : random_(random)
{ } { }
#ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
skipping to change at line 85 skipping to change at line 64
T_numtype operator()(unsigned) const T_numtype operator()(unsigned) const
{ return random_.random(); } { return random_.random(); }
unsigned length(unsigned recommendedLength) const unsigned length(unsigned recommendedLength) const
{ return recommendedLength; } { return recommendedLength; }
unsigned _bz_suggestLength() const unsigned _bz_suggestLength() const
{ return 0; } { return 0; }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return 1; } { return 1; }
T_numtype _bz_fastAccess(unsigned) const T_numtype _bz_fastAccess(unsigned) const
{ return random_.random(); } { return random_.random(); }
private: private:
_bz_VecExprRandom() : random_( Random<P_distribution>() ) { } _bz_VecExprRandom() : random_( Random<P_distribution>() ) { }
Random<P_distribution>& random_; Random<P_distribution>& random_;
}; };
 End of changes. 4 change blocks. 
27 lines changed or deleted 5 lines changed or added


 range.h   range.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/range.h Declaration of the Range class * blitz/range.h Declaration of the Range class
* *
* $Id: range.h,v 1.3 2001/01/26 18:30:50 tveldhui Exp $ * $Id: range.h,v 1.9 2005/05/07 04:17:56 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: range.h,v $
* Revision 1.3 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.6 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.5 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.4 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.3 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
* Revision 1.1 1996/11/11 17:29:13 tveldhui
* Initial revision
*
*
*/
#ifndef BZ_RANGE_H #ifndef BZ_RANGE_H
#define BZ_RANGE_H #define BZ_RANGE_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
#ifndef BZ_VECEXPRWRAP_H #ifndef BZ_VECEXPRWRAP_H
#include <blitz/vecexprwrap.h> // _bz_VecExpr wrapper #include <blitz/vecexprwrap.h> // _bz_VecExpr wrapper
skipping to change at line 110 skipping to change at line 81
// Range(Range r): allow default copy constructor to be used // Range(Range r): allow default copy constructor to be used
#ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
Range(const Range& r) Range(const Range& r)
{ {
first_ = r.first_; first_ = r.first_;
last_ = r.last_; last_ = r.last_;
stride_ = r.stride_; stride_ = r.stride_;
} }
#endif #endif
_bz_explicit Range(int slicePosition) explicit Range(int slicePosition)
{ {
first_ = slicePosition; first_ = slicePosition;
last_ = slicePosition; last_ = slicePosition;
stride_ = 1; stride_ = 1;
} }
Range(int first, int last, int stride=1) Range(int first, int last, int stride=1)
: first_(first), last_(last), stride_(stride) : first_(first), last_(last), stride_(stride)
{ {
BZPRECHECK((first == fromStart) || (last == toEnd) || BZPRECHECK((first == fromStart) || (last == toEnd) ||
skipping to change at line 142 skipping to change at line 113
return first_; return first_;
} }
int last(int highRange = 0) const int last(int highRange = 0) const
{ {
if (last_ == toEnd) if (last_ == toEnd)
return highRange; return highRange;
return last_; return last_;
} }
unsigned length(int recommendedLength = 0) const unsigned length(int =0) const
{ {
BZPRECONDITION(first_ != fromStart); BZPRECONDITION(first_ != fromStart);
BZPRECONDITION(last_ != toEnd); BZPRECONDITION(last_ != toEnd);
BZPRECONDITION((last_ - first_) % stride_ == 0); BZPRECONDITION((last_ - first_) % stride_ == 0);
return (last_ - first_) / stride_ + 1; return (last_ - first_) / stride_ + 1;
} }
int stride() const int stride() const
{ return stride_; } { return stride_; }
_bz_bool isAscendingContiguous() const bool isAscendingContiguous() const
{ {
return (first_ < last_) && (stride_ == 1); return ((first_ < last_) && (stride_ == 1) || (first_ == last_));
} }
void setRange(int first, int last, int stride=1) void setRange(int first, int last, int stride=1)
{ {
BZPRECONDITION((first < last) && (stride > 0) || BZPRECONDITION((first < last) && (stride > 0) ||
(first > last) && (stride < 0) || (first > last) && (stride < 0) ||
(first == last)); (first == last));
BZPRECONDITION((last-first) % stride == 0); BZPRECONDITION((last-first) % stride == 0);
first_ = first; first_ = first;
last_ = last; last_ = last;
skipping to change at line 214 skipping to change at line 185
return os; return os;
} }
///////////////////////////////////////////// /////////////////////////////////////////////
// Library-internal member functions // Library-internal member functions
// These are undocumented and may change or // These are undocumented and may change or
// disappear in future releases. // disappear in future releases.
///////////////////////////////////////////// /////////////////////////////////////////////
enum { _bz_staticLengthCount = 0, static const int
_bz_dynamicLengthCount = 0, _bz_staticLengthCount = 0,
_bz_staticLength = 0 }; _bz_dynamicLengthCount = 0,
_bz_staticLength = 0;
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return stride_ == 1; } { return stride_ == 1; }
T_numtype _bz_fastAccess(unsigned i) const T_numtype _bz_fastAccess(unsigned i) const
{ return first_ + i; } { return first_ + i; }
unsigned _bz_suggestLength() const unsigned _bz_suggestLength() const
{ {
return length(); return length();
} }
 End of changes. 9 change blocks. 
41 lines changed or deleted 13 lines changed or added


 reduce.cc   reduce.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/reduce.cc Array reductions. * blitz/array/reduce.cc Array reductions.
* *
* $Id: reduce.cc,v 1.3 2002/03/06 17:00:35 patricg Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: reduce.cc,v $
* Revision 1.3 2002/03/06 17:00:35 patricg
*
* TinyVector<int,rank> replaced by TinyVector<int,T_expr::rank>
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYREDUCE_H #ifndef BZ_ARRAYREDUCE_H
#error <blitz/array/reduce.cc> must be included via <blitz/array/reduce.h> #error <blitz/array/reduce.cc> must be included via <blitz/array/reduce.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T_expr, class T_reduction> template<typename T_expr, typename T_reduction>
_bz_typename T_reduction::T_resulttype _bz_typename T_reduction::T_resulttype
_bz_reduceWithIndexTraversal(T_expr expr, T_reduction reduction); _bz_reduceWithIndexTraversal(T_expr expr, T_reduction reduction);
template<class T_expr, class T_reduction> template<typename T_expr, typename T_reduction>
_bz_typename T_reduction::T_resulttype _bz_typename T_reduction::T_resulttype
_bz_reduceWithStackTraversal(T_expr expr, T_reduction reduction); _bz_reduceWithStackTraversal(T_expr expr, T_reduction reduction);
template<class T_expr, class T_reduction> template<typename T_expr, typename T_reduction>
_bz_typename T_reduction::T_resulttype _bz_typename T_reduction::T_resulttype
_bz_ArrayExprFullReduce(T_expr expr, T_reduction reduction) _bz_ArrayExprFullReduce(T_expr expr, T_reduction reduction)
{ {
#ifdef BZ_TAU_PROFILING #ifdef BZ_TAU_PROFILING
// Tau profiling code. Provide Tau with a pretty-printed version of // Tau profiling code. Provide Tau with a pretty-printed version of
// the expression. // the expression.
static string exprDescription; static BZ_STD_SCOPE(string) exprDescription;
if (!exprDescription.length()) // faked static initializer if (!exprDescription.length()) // faked static initializer
{ {
exprDescription = T_reduction::name(); exprDescription = T_reduction::name();
exprDescription += "("; exprDescription += "(";
prettyPrintFormat format(_bz_true); // Terse mode on prettyPrintFormat format(true); // Terse mode on
expr.prettyPrint(exprDescription, format); expr.prettyPrint(exprDescription, format);
exprDescription += ")"; exprDescription += ")";
} }
TAU_PROFILE(" ", exprDescription, TAU_BLITZ); TAU_PROFILE(" ", exprDescription, TAU_BLITZ);
#endif // BZ_TAU_PROFILING #endif // BZ_TAU_PROFILING
return _bz_reduceWithIndexTraversal(expr, reduction); return _bz_reduceWithIndexTraversal(expr, reduction);
#ifdef BZ_NOT_IMPLEMENTED_FLAG #ifdef BZ_NOT_IMPLEMENTED_FLAG
if ((T_expr::numIndexPlaceholders > 0) || (T_reduction::needIndex)) if ((T_expr::numIndexPlaceholders > 0) || (T_reduction::needIndex))
skipping to change at line 84 skipping to change at line 72
// use index traversal rather than stack traversal. // use index traversal rather than stack traversal.
return reduceWithIndexTraversal(expr, reduction); return reduceWithIndexTraversal(expr, reduction);
} }
else { else {
// Use a stack traversal // Use a stack traversal
return reduceWithStackTraversal(expr, reduction); return reduceWithStackTraversal(expr, reduction);
} }
#endif #endif
} }
template<class T_expr, class T_reduction> template<typename T_expr, typename T_reduction>
_bz_typename T_reduction::T_resulttype _bz_typename T_reduction::T_resulttype
_bz_reduceWithIndexTraversal(T_expr expr, T_reduction reduction) _bz_reduceWithIndexTraversal(T_expr expr, T_reduction reduction)
{ {
// This is optimized assuming C-style arrays. // This is optimized assuming C-style arrays.
reduction.reset(); reduction.reset();
const int rank = T_expr::rank; const int rank = T_expr::rank;
TinyVector<int,T_expr::rank> index, first, last; TinyVector<int,T_expr::rank> index, first, last;
skipping to change at line 112 skipping to change at line 100
last(i) = expr.ubound(i) + 1; last(i) = expr.ubound(i) + 1;
count *= last(i) - first(i); count *= last(i) - first(i);
} }
const int maxRank = rank - 1; const int maxRank = rank - 1;
int lastlbound = expr.lbound(maxRank); int lastlbound = expr.lbound(maxRank);
int lastubound = expr.ubound(maxRank); int lastubound = expr.ubound(maxRank);
int lastIndex = lastubound + 1; int lastIndex = lastubound + 1;
_bz_bool loopFlag = _bz_true; bool loopFlag = true;
while(loopFlag) { while(loopFlag) {
for (index[maxRank] = lastlbound; index[maxRank] < lastIndex; for (index[maxRank]=lastlbound;index[maxRank]<lastIndex;++index[max
++index[maxRank]) Rank])
{ if (!reduction(expr(index), index[maxRank])) {
if (!reduction(expr(index), index[maxRank])) loopFlag = false;
{
loopFlag = _bz_false;
break; break;
} }
}
int j = rank-2; int j = rank-2;
for (; j >= 0; --j) for (; j >= 0; --j) {
{
index(j+1) = first(j+1); index(j+1) = first(j+1);
++index(j); ++index(j);
if (index(j) != last(j)) if (index(j) != last(j))
break; break;
} }
if (j < 0) if (j < 0)
break; break;
} }
return reduction.result(count); return reduction.result(count);
} }
template<class T_expr, class T_reduction> template<typename T_expr, typename T_reduction>
_bz_typename T_reduction::T_resulttype _bz_typename T_reduction::T_resulttype
_bz_reduceWithIndexVectorTraversal(T_expr expr, T_reduction reduction) _bz_reduceWithIndexVectorTraversal(T_expr expr, T_reduction reduction)
{ {
// This version is for reductions that require a vector // This version is for reductions that require a vector
// of index positions. // of index positions.
reduction.reset(); reduction.reset();
const int rank = T_expr::rank; const int rank = T_expr::rank;
skipping to change at line 170 skipping to change at line 153
last(i) = expr.ubound(i) + 1; last(i) = expr.ubound(i) + 1;
count *= last(i) - first(i); count *= last(i) - first(i);
} }
const int maxRank = rank - 1; const int maxRank = rank - 1;
int lastlbound = expr.lbound(maxRank); int lastlbound = expr.lbound(maxRank);
int lastubound = expr.ubound(maxRank); int lastubound = expr.ubound(maxRank);
int lastIndex = lastubound + 1; int lastIndex = lastubound + 1;
_bz_bool loopFlag = _bz_true; bool loopFlag = true;
while(loopFlag) { while(loopFlag) {
for (index[maxRank] = lastlbound; index[maxRank] < lastIndex; for (index[maxRank]=lastlbound;index[maxRank]<lastIndex;++index[max
++index[maxRank]) Rank])
{ if (!reduction(expr(index),index)) {
if (!reduction(expr(index), index)) loopFlag = false;
{
loopFlag = _bz_false;
break; break;
} }
}
int j = rank-2; int j = rank-2;
for (; j >= 0; --j) for (; j >= 0; --j) {
{
index(j+1) = first(j+1); index(j+1) = first(j+1);
++index(j); ++index(j);
if (index(j) != last(j)) if (index(j) != last(j))
break; break;
} }
if (j < 0) if (j < 0)
break; break;
} }
 End of changes. 17 change blocks. 
41 lines changed or deleted 21 lines changed or added


 reduce.h   reduce.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/reduce.h Reductions of an array (or array expression) in a * blitz/array/reduce.h Reductions of an array (or array expression) in a
* single rank: sum, mean, min, minIndex, max, maxIn dex, * single rank: sum, mean, min, minIndex, max, maxIn dex,
* product, count, any, all * product, count, any, all
* *
* $Id: reduce.h,v 1.2 2001/01/24 20:22:51 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: reduce.h,v $
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:14 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_ARRAYREDUCE_H #ifndef BZ_ARRAYREDUCE_H
#define BZ_ARRAYREDUCE_H #define BZ_ARRAYREDUCE_H
#ifndef BZ_ARRAYEXPR_H #ifndef BZ_ARRAYEXPR_H
#error <blitz/array/reduce.h> must be included after <blitz/array/expr.h> #error <blitz/array/reduce.h> must be included after <blitz/array/expr.h>
#endif #endif
#ifndef BZ_REDUCE_H #include <blitz/reduce.h>
#include <blitz/reduce.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T_expr, int N_index, class T_reduction> template<typename T_expr, int N_index, typename T_reduction>
class _bz_ArrayExprReduce { class _bz_ArrayExprReduce {
public: public:
typedef _bz_typename T_reduction::T_numtype T_numtype; typedef _bz_typename T_reduction::T_numtype T_numtype;
typedef T_expr T_ctorArg1; typedef T_expr T_ctorArg1;
typedef T_reduction T_ctorArg2; typedef T_reduction T_ctorArg2;
enum { numArrayOperands = BZ_ENUM_CAST(T_expr::numArrayOperands), static const int
numIndexPlaceholders = BZ_ENUM_CAST(T_expr::numIndexPlaceholders) + numArrayOperands = T_expr::numArrayOperands,
1, numIndexPlaceholders = T_expr::numIndexPlaceholders + 1,
rank = BZ_ENUM_CAST(T_expr::rank) - 1 }; rank = T_expr::rank - 1;
_bz_ArrayExprReduce(const _bz_ArrayExprReduce<T_expr,N_index,T_reductio n>& _bz_ArrayExprReduce(const _bz_ArrayExprReduce<T_expr,N_index,T_reductio n>&
reduce) reduce)
: reduce_(reduce.reduce_), iter_(reduce.iter_) : reduce_(reduce.reduce_), iter_(reduce.iter_), ordering_(reduce.or dering_)
{ {
} }
_bz_ArrayExprReduce(T_expr expr) _bz_ArrayExprReduce(T_expr expr)
: iter_(expr) : iter_(expr)
{ } { computeOrdering(); }
_bz_ArrayExprReduce(T_expr expr, T_reduction reduce) _bz_ArrayExprReduce(T_expr expr, T_reduction reduce)
: iter_(expr), reduce_(reduce) : iter_(expr), reduce_(reduce)
{ } { computeOrdering(); }
int ascending(int rank) int ascending(int r)
{ return iter_.ascending(rank); } { return iter_.ascending(r); }
int ordering(int rank) int ordering(int r)
{ return iter_.ordering(rank); } { return ordering_[r]; }
int lbound(int rank) int lbound(int r)
{ return iter_.lbound(rank); } { return iter_.lbound(r); }
int ubound(int rank) int ubound(int r)
{ return iter_.ubound(rank); } { return iter_.ubound(r); }
template<int N_destRank> template<int N_destRank>
T_numtype operator()(const TinyVector<int, N_destRank>& destIndex) T_numtype operator()(const TinyVector<int, N_destRank>& destIndex)
{ {
BZPRECHECK(N_destRank == N_index, BZPRECHECK(N_destRank == N_index,
"Array reduction performed over rank " << N_index "Array reduction performed over rank " << N_index
<< " to produce a rank " << N_destRank << " expression." << end l << " to produce a rank " << N_destRank << " expression." << end l
<< "You must reduce over rank " << N_destRank << " instead."); << "You must reduce over rank " << N_destRank << " instead.");
TinyVector<int, N_destRank + 1> index; TinyVector<int, N_destRank + 1> index;
skipping to change at line 170 skipping to change at line 153
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
} }
// See operator*() note // See operator*() note
void loadStride(int) void loadStride(int)
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
} }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int) const
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return false; return false;
} }
void advanceUnitStride() void advanceUnitStride()
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
} }
_bz_bool canCollapse(int,int) const bool canCollapse(int,int) const
{ BZPRECONDITION(0); return _bz_false; } { BZPRECONDITION(0); return false; }
T_numtype operator[](int) T_numtype operator[](int)
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return T_numtype(); return T_numtype();
} }
T_numtype fastRead(int) T_numtype fastRead(int)
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return T_numtype(); return T_numtype();
} }
int suggestStride(int) const int suggestStride(int) const
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return 0; return 0;
} }
_bz_bool isStride(int,int) const bool isStride(int,int) const
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return _bz_true; return true;
} }
template<int N_rank> template<int N_rank>
void moveTo(const TinyVector<int,N_rank>& i) void moveTo(const TinyVector<int,N_rank>&)
{ {
BZPRECONDITION(0); BZPRECONDITION(0);
return; return;
} }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format) const
{ {
// NEEDS_WORK-- do real formatting for reductions // NEEDS_WORK-- do real formatting for reductions
str += "reduce[NEEDS_WORK]("; str += "reduce[NEEDS_WORK](";
iter_.prettyPrint(str,format); iter_.prettyPrint(str,format);
str += ")"; str += ")";
} }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) const bool shapeCheck(const T_shape&) const
{ {
// NEEDS_WORK-- do a real shape check (tricky) // NEEDS_WORK-- do a real shape check (tricky)
return _bz_true; return true;
} }
private: private:
_bz_ArrayExprReduce() { } _bz_ArrayExprReduce() { }
// method for properly initializing the ordering values
void computeOrdering()
{
TinyVector<bool,rank> in_ordering;
in_ordering = false;
int j = 0;
for (int i=0; i<rank; ++i)
{
int orderingj = iter_.ordering(i);
if (orderingj != INT_MIN && orderingj < rank &&
!in_ordering(orderingj)) { // unique value in ordering arra
y
in_ordering(orderingj) = true;
ordering_(j++) = orderingj;
}
}
// It is possible that ordering is not a permutation of 0,...,rank-
1.
// In that case j will be less than rank. We fill in ordering with
// the unused values in decreasing order.
for (int i = rank-1; j < rank; ++j) {
while (in_ordering(i))
--i;
ordering_(j) = i--;
}
}
T_reduction reduce_; T_reduction reduce_;
T_expr iter_; T_expr iter_;
TinyVector<int,rank> ordering_;
}; };
#define BZ_DECL_ARRAY_PARTIAL_REDUCE(fn,reduction) \ #define BZ_DECL_ARRAY_PARTIAL_REDUCE(fn,reduction) \
template<class T_expr, int N_index> \ template<typename T_expr, int N_index> \
inline \ inline \
_bz_ArrayExpr<_bz_ArrayExprReduce<_bz_ArrayExpr<T_expr>, N_index, \ _bz_ArrayExpr<_bz_ArrayExprReduce<_bz_ArrayExpr<T_expr>, N_index, \
reduction<_bz_typename T_expr::T_numtype> > > \ reduction<_bz_typename T_expr::T_numtype> > > \
fn(_bz_ArrayExpr<T_expr> expr, const IndexPlaceholder<N_index>&) \ fn(_bz_ArrayExpr<T_expr> expr, const IndexPlaceholder<N_index>&) \
{ \ { \
return _bz_ArrayExprReduce<_bz_ArrayExpr<T_expr>, N_index, \ return _bz_ArrayExprReduce<_bz_ArrayExpr<T_expr>, N_index, \
reduction<_bz_typename T_expr::T_numtype> >(expr); \ reduction<_bz_typename T_expr::T_numtype> >(expr); \
} \ } \
\ \
template<class T_numtype, int N_rank, int N_index> \ template<typename T_numtype, int N_rank, int N_index> \
inline \ inline \
_bz_ArrayExpr<_bz_ArrayExprReduce<FastArrayIterator<T_numtype,N_rank>, \ _bz_ArrayExpr<_bz_ArrayExprReduce<FastArrayIterator<T_numtype,N_rank>, \
N_index, reduction<T_numtype> > > \ N_index, reduction<T_numtype> > > \
fn(const Array<T_numtype, N_rank>& array, \ fn(const Array<T_numtype, N_rank>& array, \
const IndexPlaceholder<N_index>&) \ const IndexPlaceholder<N_index>&) \
{ \ { \
return _bz_ArrayExprReduce<FastArrayIterator<T_numtype,N_rank>, \ return _bz_ArrayExprReduce<FastArrayIterator<T_numtype,N_rank>, \
N_index, reduction<T_numtype> > (array.beginFast()); \ N_index, reduction<T_numtype> > (array.beginFast()); \
} }
skipping to change at line 277 skipping to change at line 289
BZ_DECL_ARRAY_PARTIAL_REDUCE(any, ReduceAny) BZ_DECL_ARRAY_PARTIAL_REDUCE(any, ReduceAny)
BZ_DECL_ARRAY_PARTIAL_REDUCE(all, ReduceAll) BZ_DECL_ARRAY_PARTIAL_REDUCE(all, ReduceAll)
BZ_DECL_ARRAY_PARTIAL_REDUCE(first, ReduceFirst) BZ_DECL_ARRAY_PARTIAL_REDUCE(first, ReduceFirst)
BZ_DECL_ARRAY_PARTIAL_REDUCE(last, ReduceLast) BZ_DECL_ARRAY_PARTIAL_REDUCE(last, ReduceLast)
/* /*
* Complete reductions * Complete reductions
*/ */
// Prototype of reduction function // Prototype of reduction function
template<class T_expr, class T_reduction> template<typename T_expr, typename T_reduction>
_bz_typename T_reduction::T_resulttype _bz_typename T_reduction::T_resulttype
_bz_ArrayExprFullReduce(T_expr expr, T_reduction reduction); _bz_ArrayExprFullReduce(T_expr expr, T_reduction reduction);
#define BZ_DECL_ARRAY_FULL_REDUCE(fn,reduction) \ #define BZ_DECL_ARRAY_FULL_REDUCE(fn,reduction) \
template<class T_expr> \ template<typename T_expr> \
inline \ inline \
_bz_typename reduction<_bz_typename T_expr::T_numtype>::T_resulttype \ _bz_typename reduction<_bz_typename T_expr::T_numtype>::T_resulttype \
fn(_bz_ArrayExpr<T_expr> expr) \ fn(_bz_ArrayExpr<T_expr> expr) \
{ \ { \
return _bz_ArrayExprFullReduce(expr, \ return _bz_ArrayExprFullReduce(expr, \
reduction<_bz_typename T_expr::T_numtype>()); \ reduction<_bz_typename T_expr::T_numtype>()); \
} \ } \
\ \
template<class T_numtype, int N_rank> \ template<typename T_numtype, int N_rank> \
inline \ inline \
_bz_typename reduction<T_numtype>::T_resulttype \ _bz_typename reduction<T_numtype>::T_resulttype \
fn(const Array<T_numtype, N_rank>& array) \ fn(const Array<T_numtype, N_rank>& array) \
{ \ { \
return _bz_ArrayExprFullReduce(array.beginFast(), \ return _bz_ArrayExprFullReduce(array.beginFast(), \
reduction<T_numtype>()); \ reduction<T_numtype>()); \
} }
BZ_DECL_ARRAY_FULL_REDUCE(sum, ReduceSum) BZ_DECL_ARRAY_FULL_REDUCE(sum, ReduceSum)
BZ_DECL_ARRAY_FULL_REDUCE(mean, ReduceMean) BZ_DECL_ARRAY_FULL_REDUCE(mean, ReduceMean)
skipping to change at line 315 skipping to change at line 327
BZ_DECL_ARRAY_FULL_REDUCE(count, ReduceCount) BZ_DECL_ARRAY_FULL_REDUCE(count, ReduceCount)
BZ_DECL_ARRAY_FULL_REDUCE(any, ReduceAny) BZ_DECL_ARRAY_FULL_REDUCE(any, ReduceAny)
BZ_DECL_ARRAY_FULL_REDUCE(all, ReduceAll) BZ_DECL_ARRAY_FULL_REDUCE(all, ReduceAll)
BZ_DECL_ARRAY_FULL_REDUCE(first, ReduceFirst) BZ_DECL_ARRAY_FULL_REDUCE(first, ReduceFirst)
BZ_DECL_ARRAY_FULL_REDUCE(last, ReduceLast) BZ_DECL_ARRAY_FULL_REDUCE(last, ReduceLast)
// Special versions of complete reductions: minIndex and // Special versions of complete reductions: minIndex and
// maxIndex // maxIndex
#define BZ_DECL_ARRAY_FULL_REDUCE_INDEXVECTOR(fn,reduction) \ #define BZ_DECL_ARRAY_FULL_REDUCE_INDEXVECTOR(fn,reduction) \
template<class T_expr> \ template<typename T_expr> \
inline \ inline \
_bz_typename reduction<_bz_typename T_expr::T_numtype, \ _bz_typename reduction<_bz_typename T_expr::T_numtype, \
T_expr::rank>::T_resulttype \ T_expr::rank>::T_resulttype \
fn(_bz_ArrayExpr<T_expr> expr) \ fn(_bz_ArrayExpr<T_expr> expr) \
{ \ { \
return _bz_reduceWithIndexVectorTraversal(expr, \ return _bz_reduceWithIndexVectorTraversal(expr, \
reduction<_bz_typename T_expr::T_numtype, T_expr::rank>()); \ reduction<_bz_typename T_expr::T_numtype, T_expr::rank>()); \
} \ } \
\ \
template<class T_numtype, int N_rank> \ template<typename T_numtype, int N_rank> \
inline \ inline \
_bz_typename reduction<T_numtype,N_rank>::T_resulttype \ _bz_typename reduction<T_numtype,N_rank>::T_resulttype \
fn(const Array<T_numtype, N_rank>& array) \ fn(const Array<T_numtype, N_rank>& array) \
{ \ { \
return _bz_reduceWithIndexVectorTraversal( array.beginFast(), \ return _bz_reduceWithIndexVectorTraversal( array.beginFast(), \
reduction<T_numtype,N_rank>()); \ reduction<T_numtype,N_rank>()); \
} }
BZ_DECL_ARRAY_FULL_REDUCE_INDEXVECTOR(minIndex, ReduceMinIndexVector) BZ_DECL_ARRAY_FULL_REDUCE_INDEXVECTOR(minIndex, ReduceMinIndexVector)
BZ_DECL_ARRAY_FULL_REDUCE_INDEXVECTOR(maxIndex, ReduceMaxIndexVector) BZ_DECL_ARRAY_FULL_REDUCE_INDEXVECTOR(maxIndex, ReduceMaxIndexVector)
 End of changes. 30 change blocks. 
55 lines changed or deleted 68 lines changed or added


 resize.cc   resize.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/resize.cc Resizing of arrays * blitz/array/resize.cc Resizing of arrays
* *
* $Id: resize.cc,v 1.4 2002/03/06 15:50:41 patricg Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: resize.cc,v $
* Revision 1.4 2002/03/06 15:50:41 patricg
*
* for (d=0; d < N_rank; ++d) replaced by for (int d=0; d < N_rank; ++d)
* (for scoping problem)
*
* Revision 1.3 2001/02/11 15:43:39 tveldhui
* Additions from Julian Cummings:
* - StridedDomain class
* - more versions of resizeAndPreserve
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYRESIZE_CC #ifndef BZ_ARRAYRESIZE_CC
#define BZ_ARRAYRESIZE_CC #define BZ_ARRAYRESIZE_CC
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/resize.cc> must be included via <blitz/array.h> #error <blitz/array/resize.cc> must be included via <blitz/array.h>
#endif #endif
#include <blitz/minmax.h> #include <blitz/minmax.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int length0) void Array<T_numtype, N_rank>::resize(int extent0)
{ {
BZPRECONDITION(length0 > 0); BZPRECONDITION(extent0 >= 0);
BZPRECONDITION(N_rank == 1); BZPRECONDITION(N_rank == 1);
if (length0 != length_[firstRank]) if (extent0 != length_[0])
{ {
length_[firstRank] = length0; length_[0] = extent0;
setupStorage(0); setupStorage(0);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int extent0, int extent1) void Array<T_numtype, N_rank>::resize(int extent0, int extent1)
{ {
BZPRECONDITION((extent0 > 0) && (extent1 > 0)); BZPRECONDITION((extent0 >= 0) && (extent1 >= 0));
BZPRECONDITION(N_rank == 2); BZPRECONDITION(N_rank == 2);
if ((extent0 != length_[0]) || (extent1 != length_[1])) if ((extent0 != length_[0]) || (extent1 != length_[1]))
{ {
length_[0] = extent0; length_[0] = extent0;
length_[1] = extent1; length_[1] = extent1;
setupStorage(1); setupStorage(1);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int extent0, int extent1, void Array<T_numtype, N_rank>::resize(int extent0, int extent1,
int extent2) int extent2)
{ {
BZPRECONDITION((extent0 > 0) && (extent1 > 0) && (extent2 > 0)); BZPRECONDITION((extent0 >= 0) && (extent1 >= 0) && (extent2 >= 0));
BZPRECONDITION(N_rank == 3); BZPRECONDITION(N_rank == 3);
if ((extent0 != length_[0]) || (extent1 != length_[1]) if ((extent0 != length_[0]) || (extent1 != length_[1])
|| (extent2 != length_[2])) || (extent2 != length_[2]))
{ {
length_[0] = extent0; length_[0] = extent0;
length_[1] = extent1; length_[1] = extent1;
length_[2] = extent2; length_[2] = extent2;
setupStorage(2); setupStorage(2);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int extent0, int extent1, void Array<T_numtype, N_rank>::resize(int extent0, int extent1,
int extent2, int extent3) int extent2, int extent3)
{ {
BZPRECONDITION((extent0 > 0) && (extent1 > 0) && (extent2 > 0) BZPRECONDITION((extent0 >= 0) && (extent1 >= 0) && (extent2 >= 0)
&& (extent3 > 0)); && (extent3 >= 0));
BZPRECONDITION(N_rank == 4); BZPRECONDITION(N_rank == 4);
if ((extent0 != length_[0]) || (extent1 != length_[1]) if ((extent0 != length_[0]) || (extent1 != length_[1])
|| (extent2 != length_[2]) || (extent3 != length_[3])) || (extent2 != length_[2]) || (extent3 != length_[3]))
{ {
length_[0] = extent0; length_[0] = extent0;
length_[1] = extent1; length_[1] = extent1;
length_[2] = extent2; length_[2] = extent2;
length_[3] = extent3; length_[3] = extent3;
setupStorage(3); setupStorage(3);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int extent0, int extent1, void Array<T_numtype, N_rank>::resize(int extent0, int extent1,
int extent2, int extent3, int extent4) int extent2, int extent3, int extent4)
{ {
BZPRECONDITION((extent0 > 0) && (extent1 > 0) && (extent2 > 0) BZPRECONDITION((extent0 >= 0) && (extent1 >= 0) && (extent2 >= 0)
&& (extent3 > 0) && (extent4 > 0)); && (extent3 >= 0) && (extent4 >= 0));
BZPRECONDITION(N_rank == 5); BZPRECONDITION(N_rank == 5);
if ((extent0 != length_[0]) || (extent1 != length_[1]) if ((extent0 != length_[0]) || (extent1 != length_[1])
|| (extent2 != length_[2]) || (extent3 != length_[3]) || (extent2 != length_[2]) || (extent3 != length_[3])
|| (extent4 != length_[4])) || (extent4 != length_[4]))
{ {
length_[0] = extent0; length_[0] = extent0;
length_[1] = extent1; length_[1] = extent1;
length_[2] = extent2; length_[2] = extent2;
length_[3] = extent3; length_[3] = extent3;
length_[4] = extent4; length_[4] = extent4;
setupStorage(4); setupStorage(4);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int extent0, int extent1, void Array<T_numtype, N_rank>::resize(int extent0, int extent1,
int extent2, int extent3, int extent4, int extent5) int extent2, int extent3, int extent4, int extent5)
{ {
BZPRECONDITION((extent0 > 0) && (extent1 > 0) && (extent2 > 0) BZPRECONDITION((extent0 >= 0) && (extent1 >= 0) && (extent2 >= 0)
&& (extent3 > 0) && (extent4 > 0) && (extent5 > 0)); && (extent3 >= 0) && (extent4 >= 0) && (extent5 >= 0));
BZPRECONDITION(N_rank == 6); BZPRECONDITION(N_rank == 6);
if ((extent0 != length_[0]) || (extent1 != length_[1]) if ((extent0 != length_[0]) || (extent1 != length_[1])
|| (extent2 != length_[2]) || (extent3 != length_[3]) || (extent2 != length_[2]) || (extent3 != length_[3])
|| (extent4 != length_[4]) || (extent5 != length_[5])) || (extent4 != length_[4]) || (extent5 != length_[5]))
{ {
length_[0] = extent0; length_[0] = extent0;
length_[1] = extent1; length_[1] = extent1;
length_[2] = extent2; length_[2] = extent2;
length_[3] = extent3; length_[3] = extent3;
length_[4] = extent4; length_[4] = extent4;
length_[5] = extent5; length_[5] = extent5;
setupStorage(5); setupStorage(5);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int extent0, int extent1, void Array<T_numtype, N_rank>::resize(int extent0, int extent1,
int extent2, int extent3, int extent4, int extent5, int extent2, int extent3, int extent4, int extent5,
int extent6) int extent6)
{ {
BZPRECONDITION((extent0 > 0) && (extent1 > 0) && (extent2 > 0) BZPRECONDITION((extent0 >= 0) && (extent1 >= 0) && (extent2 >= 0)
&& (extent3 > 0) && (extent4 > 0) && (extent5 > 0) && (extent3 >= 0) && (extent4 >= 0) && (extent5 >= 0)
&& (extent6 > 0)); && (extent6 >= 0));
BZPRECONDITION(N_rank == 7); BZPRECONDITION(N_rank == 7);
if ((extent0 != length_[0]) || (extent1 != length_[1]) if ((extent0 != length_[0]) || (extent1 != length_[1])
|| (extent2 != length_[2]) || (extent3 != length_[3]) || (extent2 != length_[2]) || (extent3 != length_[3])
|| (extent4 != length_[4]) || (extent5 != length_[5]) || (extent4 != length_[4]) || (extent5 != length_[5])
|| (extent6 != length_[6])) || (extent6 != length_[6]))
{ {
length_[0] = extent0; length_[0] = extent0;
length_[1] = extent1; length_[1] = extent1;
length_[2] = extent2; length_[2] = extent2;
length_[3] = extent3; length_[3] = extent3;
length_[4] = extent4; length_[4] = extent4;
length_[5] = extent5; length_[5] = extent5;
length_[6] = extent6; length_[6] = extent6;
setupStorage(6); setupStorage(6);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int extent0, int extent1, void Array<T_numtype, N_rank>::resize(int extent0, int extent1,
int extent2, int extent3, int extent4, int extent5, int extent2, int extent3, int extent4, int extent5,
int extent6, int extent7) int extent6, int extent7)
{ {
BZPRECONDITION((extent0 > 0) && (extent1 > 0) && (extent2 > 0) BZPRECONDITION((extent0 >= 0) && (extent1 >= 0) && (extent2 >= 0)
&& (extent3 > 0) && (extent4 > 0) && (extent5 > 0) && (extent3 >= 0) && (extent4 >= 0) && (extent5 >= 0)
&& (extent6 > 0) && (extent7 > 0)); && (extent6 >= 0) && (extent7 >= 0));
BZPRECONDITION(N_rank == 8); BZPRECONDITION(N_rank == 8);
if ((extent0 != length_[0]) || (extent1 != length_[1]) if ((extent0 != length_[0]) || (extent1 != length_[1])
|| (extent2 != length_[2]) || (extent3 != length_[3]) || (extent2 != length_[2]) || (extent3 != length_[3])
|| (extent4 != length_[4]) || (extent5 != length_[5]) || (extent4 != length_[4]) || (extent5 != length_[5])
|| (extent6 != length_[6]) || (extent7 != length_[7])) || (extent6 != length_[6]) || (extent7 != length_[7]))
{ {
length_[0] = extent0; length_[0] = extent0;
length_[1] = extent1; length_[1] = extent1;
length_[2] = extent2; length_[2] = extent2;
length_[3] = extent3; length_[3] = extent3;
length_[4] = extent4; length_[4] = extent4;
length_[5] = extent5; length_[5] = extent5;
length_[6] = extent6; length_[6] = extent6;
length_[7] = extent7; length_[7] = extent7;
setupStorage(7); setupStorage(7);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int extent0, int extent1, void Array<T_numtype, N_rank>::resize(int extent0, int extent1,
int extent2, int extent3, int extent4, int extent5, int extent2, int extent3, int extent4, int extent5,
int extent6, int extent7, int extent8) int extent6, int extent7, int extent8)
{ {
BZPRECONDITION((extent0 > 0) && (extent1 > 0) && (extent2 > 0) BZPRECONDITION((extent0 >= 0) && (extent1 >= 0) && (extent2 >= 0)
&& (extent3 > 0) && (extent4 > 0) && (extent5 > 0) && (extent3 >= 0) && (extent4 >= 0) && (extent5 >= 0)
&& (extent6 > 0) && (extent7 > 0) && (extent8 > 0)); && (extent6 >= 0) && (extent7 >= 0) && (extent8 >= 0));
BZPRECONDITION(N_rank == 9); BZPRECONDITION(N_rank == 9);
if ((extent0 != length_[0]) || (extent1 != length_[1]) if ((extent0 != length_[0]) || (extent1 != length_[1])
|| (extent2 != length_[2]) || (extent3 != length_[3]) || (extent2 != length_[2]) || (extent3 != length_[3])
|| (extent4 != length_[4]) || (extent5 != length_[5]) || (extent4 != length_[4]) || (extent5 != length_[5])
|| (extent6 != length_[6]) || (extent7 != length_[7]) || (extent6 != length_[6]) || (extent7 != length_[7])
|| (extent8 != length_[8])) || (extent8 != length_[8]))
{ {
length_[0] = extent0; length_[0] = extent0;
length_[1] = extent1; length_[1] = extent1;
skipping to change at line 240 skipping to change at line 222
length_[3] = extent3; length_[3] = extent3;
length_[4] = extent4; length_[4] = extent4;
length_[5] = extent5; length_[5] = extent5;
length_[6] = extent6; length_[6] = extent6;
length_[7] = extent7; length_[7] = extent7;
length_[8] = extent8; length_[8] = extent8;
setupStorage(8); setupStorage(8);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int extent0, int extent1, void Array<T_numtype, N_rank>::resize(int extent0, int extent1,
int extent2, int extent3, int extent4, int extent5, int extent2, int extent3, int extent4, int extent5,
int extent6, int extent7, int extent8, int extent9) int extent6, int extent7, int extent8, int extent9)
{ {
BZPRECONDITION((extent0 > 0) && (extent1 > 0) && (extent2 > 0) BZPRECONDITION((extent0 >= 0) && (extent1 >= 0) && (extent2 >= 0)
&& (extent3 > 0) && (extent4 > 0) && (extent5 > 0) && (extent3 >= 0) && (extent4 >= 0) && (extent5 >= 0)
&& (extent6 > 0) && (extent7 > 0) && (extent8 > 0) && (extent6 >= 0) && (extent7 >= 0) && (extent8 >= 0)
&& (extent9 > 0)); && (extent9 >= 0));
BZPRECONDITION(N_rank == 10); BZPRECONDITION(N_rank == 10);
if ((extent0 != length_[0]) || (extent1 != length_[1]) if ((extent0 != length_[0]) || (extent1 != length_[1])
|| (extent2 != length_[2]) || (extent3 != length_[3]) || (extent2 != length_[2]) || (extent3 != length_[3])
|| (extent4 != length_[4]) || (extent5 != length_[5]) || (extent4 != length_[4]) || (extent5 != length_[5])
|| (extent6 != length_[6]) || (extent7 != length_[7]) || (extent6 != length_[6]) || (extent7 != length_[7])
|| (extent8 != length_[8]) || (extent9 != length_[9])) || (extent8 != length_[8]) || (extent9 != length_[9]))
{ {
length_[0] = extent0; length_[0] = extent0;
length_[1] = extent1; length_[1] = extent1;
skipping to change at line 271 skipping to change at line 253
length_[4] = extent4; length_[4] = extent4;
length_[5] = extent5; length_[5] = extent5;
length_[6] = extent6; length_[6] = extent6;
length_[7] = extent7; length_[7] = extent7;
length_[8] = extent8; length_[8] = extent8;
length_[9] = extent9; length_[9] = extent9;
setupStorage(9); setupStorage(9);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(int extent0, int extent1, void Array<T_numtype, N_rank>::resize(int extent0, int extent1,
int extent2, int extent3, int extent4, int extent5, int extent2, int extent3, int extent4, int extent5,
int extent6, int extent7, int extent8, int extent9, int extent6, int extent7, int extent8, int extent9,
int extent10) int extent10)
{ {
BZPRECONDITION((extent0 > 0) && (extent1 > 0) && (extent2 > 0) BZPRECONDITION((extent0 >= 0) && (extent1 >= 0) && (extent2 >= 0)
&& (extent3 > 0) && (extent4 > 0) && (extent5 > 0) && (extent3 >= 0) && (extent4 >= 0) && (extent5 >= 0)
&& (extent6 > 0) && (extent7 > 0) && (extent8 > 0) && (extent6 >= 0) && (extent7 >= 0) && (extent8 >= 0)
&& (extent9 > 0) && (extent10 > 0)); && (extent9 >= 0) && (extent10 >= 0));
BZPRECONDITION(N_rank == 11); BZPRECONDITION(N_rank == 11);
if ((extent0 != length_[0]) || (extent1 != length_[1]) if ((extent0 != length_[0]) || (extent1 != length_[1])
|| (extent2 != length_[2]) || (extent3 != length_[3]) || (extent2 != length_[2]) || (extent3 != length_[3])
|| (extent4 != length_[4]) || (extent5 != length_[5]) || (extent4 != length_[4]) || (extent5 != length_[5])
|| (extent6 != length_[6]) || (extent7 != length_[7]) || (extent6 != length_[6]) || (extent7 != length_[7])
|| (extent8 != length_[8]) || (extent9 != length_[9]) || (extent8 != length_[8]) || (extent9 != length_[9])
|| (extent10 != length_[10])) || (extent10 != length_[10]))
{ {
length_[0] = extent0; length_[0] = extent0;
skipping to change at line 305 skipping to change at line 287
length_[5] = extent5; length_[5] = extent5;
length_[6] = extent6; length_[6] = extent6;
length_[7] = extent7; length_[7] = extent7;
length_[8] = extent8; length_[8] = extent8;
length_[9] = extent9; length_[9] = extent9;
length_[10] = extent10; length_[10] = extent10;
setupStorage(10); setupStorage(10);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0)
{
BZPRECONDITION(r0.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
setupStorage(0);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0, Range r1)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
setupStorage(1);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0, Range r1, Range r2)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguo
us());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
setupStorage(2);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0, Range r1, Range r2,
Range r3)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguo
us()
&& r3.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
setupStorage(3);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0, Range r1, Range r2,
Range r3, Range r4)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguo
us()
&& r3.isAscendingContiguous() && r4.isAscendingConti
guous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
setupStorage(4);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguo
us()
&& r3.isAscendingContiguous() && r4.isAscendingConti
guous()
&& r5.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
setupStorage(5);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5, Range r6)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguo
us()
&& r3.isAscendingContiguous() && r4.isAscendingConti
guous()
&& r5.isAscendingContiguous() && r6.isAscendingConti
guous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
length_[6] = r6.length();
storage_.setBase(6, r6.first());
setupStorage(6);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5, Range r6, Range r7)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguo
us()
&& r3.isAscendingContiguous() && r4.isAscendingConti
guous()
&& r5.isAscendingContiguous() && r6.isAscendingConti
guous()
&& r7.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
length_[6] = r6.length();
storage_.setBase(6, r6.first());
length_[7] = r7.length();
storage_.setBase(7, r7.first());
setupStorage(7);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5, Range r6, Range r7, Range r8)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguo
us()
&& r3.isAscendingContiguous() && r4.isAscendingConti
guous()
&& r5.isAscendingContiguous() && r6.isAscendingConti
guous()
&& r7.isAscendingContiguous() && r8.isAscendingConti
guous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
length_[6] = r6.length();
storage_.setBase(6, r6.first());
length_[7] = r7.length();
storage_.setBase(7, r7.first());
length_[8] = r8.length();
storage_.setBase(8, r8.first());
setupStorage(8);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5, Range r6, Range r7, Range r8,
Range r9)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguo
us()
&& r3.isAscendingContiguous() && r4.isAscendingConti
guous()
&& r5.isAscendingContiguous() && r6.isAscendingConti
guous()
&& r7.isAscendingContiguous() && r8.isAscendingConti
guous()
&& r9.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
length_[6] = r6.length();
storage_.setBase(6, r6.first());
length_[7] = r7.length();
storage_.setBase(7, r7.first());
length_[8] = r8.length();
storage_.setBase(8, r8.first());
length_[9] = r9.length();
storage_.setBase(9, r9.first());
setupStorage(9);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5, Range r6, Range r7, Range r8,
Range r9, Range r10)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguo
us()
&& r3.isAscendingContiguous() && r4.isAscendingConti
guous()
&& r5.isAscendingContiguous() && r6.isAscendingConti
guous()
&& r7.isAscendingContiguous() && r8.isAscendingConti
guous()
&& r9.isAscendingContiguous() && r10.isAscendingCont
iguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
length_[6] = r6.length();
storage_.setBase(6, r6.first());
length_[7] = r7.length();
storage_.setBase(7, r7.first());
length_[8] = r8.length();
storage_.setBase(8, r8.first());
length_[9] = r9.length();
storage_.setBase(9, r9.first());
length_[10] = r10.length();
storage_.setBase(10, r10.first());
setupStorage(10);
}
template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0) void Array<T_numtype, N_rank>::resizeAndPreserve(int length0)
{ {
BZPRECONDITION(length0 > 0); BZPRECONDITION(length0 > 0);
BZPRECONDITION(N_rank == 1); BZPRECONDITION(N_rank == 1);
if (length0 != length_[firstRank]) if (length0 != length_[firstRank])
{ {
#if defined(__KCC) || defined(__DECCXX) #if defined(__KCC) || defined(__DECCXX)
// NEEDS_WORK: have to discard the base() parameter for EDG, // NEEDS_WORK: have to discard the base() parameter for EDG,
// because it gives the following bizarre error: // because it gives the following bizarre error:
skipping to change at line 342 skipping to change at line 595
if (numElements()) if (numElements())
{ {
Range overlap0 = Range(fromStart, minmax::min(B.ubound(0), Range overlap0 = Range(fromStart, minmax::min(B.ubound(0),
ubound(0))); ubound(0)));
B(overlap0) = (*this)(overlap0); B(overlap0) = (*this)(overlap0);
} }
reference(B); reference(B);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1) void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1)
{ {
BZPRECONDITION((length0 > 0) && (length1 > 0)); BZPRECONDITION((length0 > 0) && (length1 > 0));
BZPRECONDITION(N_rank == 2); BZPRECONDITION(N_rank == 2);
if ((length0 != length_[0]) || (length1 != length_[1])) if ((length0 != length_[0]) || (length1 != length_[1]))
{ {
T_array B(base(), BZ_BLITZ_SCOPE(shape)(length0, length1), storage_ ); T_array B(base(), BZ_BLITZ_SCOPE(shape)(length0, length1), storage_ );
if (numElements()) if (numElements())
skipping to change at line 364 skipping to change at line 617
Range overlap0 = Range(fromStart, minmax::min(B.ubound(0), Range overlap0 = Range(fromStart, minmax::min(B.ubound(0),
ubound(0))); ubound(0)));
Range overlap1 = Range(fromStart, minmax::min(B.ubound(1), Range overlap1 = Range(fromStart, minmax::min(B.ubound(1),
ubound(1))); ubound(1)));
B(overlap0, overlap1) = (*this)(overlap0, overlap1); B(overlap0, overlap1) = (*this)(overlap0, overlap1);
} }
reference(B); reference(B);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1, void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1,
int length2) int length2)
{ {
BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0)); BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0));
BZPRECONDITION(N_rank == 3); BZPRECONDITION(N_rank == 3);
if ((length0 != length_[0]) || (length1 != length_[1]) if ((length0 != length_[0]) || (length1 != length_[1])
|| (length2 != length_[2])) || (length2 != length_[2]))
{ {
T_array B(base(), BZ_BLITZ_SCOPE(shape)(length0, length1, length2), T_array B(base(), BZ_BLITZ_SCOPE(shape)(length0, length1, length2),
skipping to change at line 391 skipping to change at line 644
ubound(1))); ubound(1)));
Range overlap2 = Range(fromStart, minmax::min(B.ubound(2), Range overlap2 = Range(fromStart, minmax::min(B.ubound(2),
ubound(2))); ubound(2)));
B(overlap0, overlap1, overlap2) = (*this)(overlap0, overlap1, B(overlap0, overlap1, overlap2) = (*this)(overlap0, overlap1,
overlap2); overlap2);
} }
reference(B); reference(B);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1, void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1,
int length2, int length3) int length2, int length3)
{ {
BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0) BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0)
&& (length3 > 0)); && (length3 > 0));
BZPRECONDITION(N_rank == 4); BZPRECONDITION(N_rank == 4);
if ((length0 != length_[0]) || (length1 != length_[1]) if ((length0 != length_[0]) || (length1 != length_[1])
|| (length2 != length_[2]) || (length3 != length_[3])) || (length2 != length_[2]) || (length3 != length_[3]))
{ {
skipping to change at line 418 skipping to change at line 671
Range overlap1 = Range(fromStart, minmax::min(B.ubound(1), ubou nd(1))); Range overlap1 = Range(fromStart, minmax::min(B.ubound(1), ubou nd(1)));
Range overlap2 = Range(fromStart, minmax::min(B.ubound(2), ubou nd(2))); Range overlap2 = Range(fromStart, minmax::min(B.ubound(2), ubou nd(2)));
Range overlap3 = Range(fromStart, minmax::min(B.ubound(3), ubou nd(3))); Range overlap3 = Range(fromStart, minmax::min(B.ubound(3), ubou nd(3)));
B(overlap0, overlap1, overlap2, overlap3) = (*this)(overlap0, B(overlap0, overlap1, overlap2, overlap3) = (*this)(overlap0,
overlap1, overlap2, overlap3); overlap1, overlap2, overlap3);
} }
reference(B); reference(B);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1, void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1,
int length2, int length3, int length4) int length2, int length3, int length4)
{ {
BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0) BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0)
&& (length3 > 0) && (length4 > 0)); && (length3 > 0) && (length4 > 0));
BZPRECONDITION(N_rank == 5); BZPRECONDITION(N_rank == 5);
if ((length0 != length_[0]) || (length1 != length_[1]) if ((length0 != length_[0]) || (length1 != length_[1])
|| (length2 != length_[2]) || (length3 != length_[3]) || (length2 != length_[2]) || (length3 != length_[3])
|| (length4 != length_[4])) || (length4 != length_[4]))
skipping to change at line 447 skipping to change at line 700
Range overlap2 = Range(fromStart, minmax::min(B.ubound(2), ubou nd(2))); Range overlap2 = Range(fromStart, minmax::min(B.ubound(2), ubou nd(2)));
Range overlap3 = Range(fromStart, minmax::min(B.ubound(3), ubou nd(3))); Range overlap3 = Range(fromStart, minmax::min(B.ubound(3), ubou nd(3)));
Range overlap4 = Range(fromStart, minmax::min(B.ubound(4), ubou nd(4))); Range overlap4 = Range(fromStart, minmax::min(B.ubound(4), ubou nd(4)));
B(overlap0, overlap1, overlap2, overlap3, overlap4) = (*this) B(overlap0, overlap1, overlap2, overlap3, overlap4) = (*this)
(overlap0, overlap1, overlap2, overlap3, overlap4); (overlap0, overlap1, overlap2, overlap3, overlap4);
} }
reference(B); reference(B);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1, void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1,
int length2, int length3, int length4, int length5) int length2, int length3, int length4, int length5)
{ {
BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0) BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0)
&& (length3 > 0) && (length4 > 0) && (length5 > 0)); && (length3 > 0) && (length4 > 0) && (length5 > 0));
BZPRECONDITION(N_rank == 6); BZPRECONDITION(N_rank == 6);
if ((length0 != length_[0]) || (length1 != length_[1]) if ((length0 != length_[0]) || (length1 != length_[1])
|| (length2 != length_[2]) || (length3 != length_[3]) || (length2 != length_[2]) || (length3 != length_[3])
|| (length4 != length_[4]) || (length5 != length_[5])) || (length4 != length_[4]) || (length5 != length_[5]))
skipping to change at line 479 skipping to change at line 732
Range overlap5 = Range(fromStart, minmax::min(B.ubound(5), ubou nd(5))); Range overlap5 = Range(fromStart, minmax::min(B.ubound(5), ubou nd(5)));
B(overlap0, overlap1, overlap2, overlap3, overlap4, overlap5) B(overlap0, overlap1, overlap2, overlap3, overlap4, overlap5)
= (*this)(overlap0, overlap1, overlap2, overlap3, overlap4, = (*this)(overlap0, overlap1, overlap2, overlap3, overlap4,
overlap5); overlap5);
} }
reference(B); reference(B);
} }
} }
/* Added by Julian Cummings */ /* Added by Julian Cummings */
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1, void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1,
int length2, int length3, int length4, int length5, int length6) int length2, int length3, int length4, int length5, int length6)
{ {
BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0) BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0)
&& (length3 > 0) && (length4 > 0) && (length5 > 0) && (length6 > 0) ); && (length3 > 0) && (length4 > 0) && (length5 > 0) && (length6 > 0) );
BZPRECONDITION(N_rank == 7); BZPRECONDITION(N_rank == 7);
if ((length0 != length_[0]) || (length1 != length_[1]) if ((length0 != length_[0]) || (length1 != length_[1])
|| (length2 != length_[2]) || (length3 != length_[3]) || (length2 != length_[2]) || (length3 != length_[3])
|| (length4 != length_[4]) || (length5 != length_[5]) || (length4 != length_[4]) || (length5 != length_[5])
skipping to change at line 521 skipping to change at line 774
B(overlap0, overlap1, overlap2, overlap3, overlap4, overlap5, B(overlap0, overlap1, overlap2, overlap3, overlap4, overlap5,
overlap6) overlap6)
= (*this)(overlap0, overlap1, overlap2, overlap3, overlap4, = (*this)(overlap0, overlap1, overlap2, overlap3, overlap4,
overlap5, overlap6); overlap5, overlap6);
} }
reference(B); reference(B);
} }
} }
/* Added by Julian Cummings */ /* Added by Julian Cummings */
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1, void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1,
int length2, int length3, int length4, int length5, int length6, int length2, int length3, int length4, int length5, int length6,
int length7) int length7)
{ {
BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0) BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0)
&& (length3 > 0) && (length4 > 0) && (length5 > 0) && (length6 > 0) && (length3 > 0) && (length4 > 0) && (length5 > 0) && (length6 > 0)
&& (length7 > 0)); && (length7 > 0));
BZPRECONDITION(N_rank == 8); BZPRECONDITION(N_rank == 8);
if ((length0 != length_[0]) || (length1 != length_[1]) if ((length0 != length_[0]) || (length1 != length_[1])
skipping to change at line 567 skipping to change at line 820
B(overlap0, overlap1, overlap2, overlap3, overlap4, overlap5, B(overlap0, overlap1, overlap2, overlap3, overlap4, overlap5,
overlap6, overlap7) overlap6, overlap7)
= (*this)(overlap0, overlap1, overlap2, overlap3, overlap4, = (*this)(overlap0, overlap1, overlap2, overlap3, overlap4,
overlap5, overlap6, overlap7); overlap5, overlap6, overlap7);
} }
reference(B); reference(B);
} }
} }
/* Added by Julian Cummings */ /* Added by Julian Cummings */
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1, void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1,
int length2, int length3, int length4, int length5, int length6, int length2, int length3, int length4, int length5, int length6,
int length7, int length8) int length7, int length8)
{ {
BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0) BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0)
&& (length3 > 0) && (length4 > 0) && (length5 > 0) && (length6 > 0) && (length3 > 0) && (length4 > 0) && (length5 > 0) && (length6 > 0)
&& (length7 > 0) && (length8 > 0)); && (length7 > 0) && (length8 > 0));
BZPRECONDITION(N_rank == 9); BZPRECONDITION(N_rank == 9);
if ((length0 != length_[0]) || (length1 != length_[1]) if ((length0 != length_[0]) || (length1 != length_[1])
skipping to change at line 616 skipping to change at line 869
B(overlap0, overlap1, overlap2, overlap3, overlap4, overlap5, B(overlap0, overlap1, overlap2, overlap3, overlap4, overlap5,
overlap6, overlap7, overlap8) overlap6, overlap7, overlap8)
= (*this)(overlap0, overlap1, overlap2, overlap3, overlap4, = (*this)(overlap0, overlap1, overlap2, overlap3, overlap4,
overlap5, overlap6, overlap7, overlap8); overlap5, overlap6, overlap7, overlap8);
} }
reference(B); reference(B);
} }
} }
/* Added by Julian Cummings */ /* Added by Julian Cummings */
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1, void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1,
int length2, int length3, int length4, int length5, int length6, int length2, int length3, int length4, int length5, int length6,
int length7, int length8, int length9) int length7, int length8, int length9)
{ {
BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0) BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0)
&& (length3 > 0) && (length4 > 0) && (length5 > 0) && (length6 > 0) && (length3 > 0) && (length4 > 0) && (length5 > 0) && (length6 > 0)
&& (length7 > 0) && (length8 > 0) && (length9 > 0)); && (length7 > 0) && (length8 > 0) && (length9 > 0));
BZPRECONDITION(N_rank == 10); BZPRECONDITION(N_rank == 10);
if ((length0 != length_[0]) || (length1 != length_[1]) if ((length0 != length_[0]) || (length1 != length_[1])
skipping to change at line 668 skipping to change at line 921
B(overlap0, overlap1, overlap2, overlap3, overlap4, overlap5, B(overlap0, overlap1, overlap2, overlap3, overlap4, overlap5,
overlap6, overlap7, overlap8, overlap9) overlap6, overlap7, overlap8, overlap9)
= (*this)(overlap0, overlap1, overlap2, overlap3, overlap4, = (*this)(overlap0, overlap1, overlap2, overlap3, overlap4,
overlap5, overlap6, overlap7, overlap8, overlap9); overlap5, overlap6, overlap7, overlap8, overlap9);
} }
reference(B); reference(B);
} }
} }
/* Added by Julian Cummings */ /* Added by Julian Cummings */
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1, void Array<T_numtype, N_rank>::resizeAndPreserve(int length0, int length1,
int length2, int length3, int length4, int length5, int length6, int length2, int length3, int length4, int length5, int length6,
int length7, int length8, int length9, int length10) int length7, int length8, int length9, int length10)
{ {
BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0) BZPRECONDITION((length0 > 0) && (length1 > 0) && (length2 > 0)
&& (length3 > 0) && (length4 > 0) && (length5 > 0) && (length6 > 0) && (length3 > 0) && (length4 > 0) && (length5 > 0) && (length6 > 0)
&& (length7 > 0) && (length8 > 0) && (length9 > 0) && (length10 > 0 )); && (length7 > 0) && (length8 > 0) && (length9 > 0) && (length10 > 0 ));
BZPRECONDITION(N_rank == 11); BZPRECONDITION(N_rank == 11);
if ((length0 != length_[0]) || (length1 != length_[1]) if ((length0 != length_[0]) || (length1 != length_[1])
skipping to change at line 718 skipping to change at line 971
ubound(8))); ubound(8)));
Range overlap9 = Range(fromStart, minmax::min(B.ubound(9), Range overlap9 = Range(fromStart, minmax::min(B.ubound(9),
ubound(9))); ubound(9)));
Range overlap10 = Range(fromStart, minmax::min(B.ubound(10), Range overlap10 = Range(fromStart, minmax::min(B.ubound(10),
ubound(10))); ubound(10)));
} }
reference(B); reference(B);
} }
} }
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resize(const TinyVector<int,N_rank>& extent) void Array<T_numtype, N_rank>::resize(const TinyVector<int,N_rank>& extent)
{ {
// NEEDS_WORK -- don't resize if unnecessary // NEEDS_WORK -- don't resize if unnecessary
// BZPRECONDITION(all(extent > 0)); // BZPRECONDITION(all(extent > 0));
// if (any(extent != length_)) // if (any(extent != length_))
// { // {
length_ = extent; length_ = extent;
setupStorage(N_rank); setupStorage(N_rank);
// } // }
} }
/* Added by Julian Cummings */ /* Added by Julian Cummings */
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
void Array<T_numtype, N_rank>::resizeAndPreserve( void Array<T_numtype, N_rank>::resizeAndPreserve(
const TinyVector<int,N_rank>& extent) const TinyVector<int,N_rank>& extent)
{ {
// NEEDS_WORK -- don't resize if unnecessary // NEEDS_WORK -- don't resize if unnecessary
// BZPRECONDITION(all(extent > 0)); // BZPRECONDITION(all(extent > 0));
// if (any(extent != length_)) // if (any(extent != length_))
// { // {
T_array B(base(), extent, storage_); T_array B(base(), extent, storage_);
if (numElements()) if (numElements())
 End of changes. 39 change blocks. 
73 lines changed or deleted 351 lines changed or added


 shape.h   shape.h 
/************************************************************************** * /************************************************************************** *
* blitz/array/shape.h * blitz/array/shape.h
* *
* $Id: shape.h,v 1.2 2001/01/24 20:22:51 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: shape.h,v $
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:14 tveldhui
* Imported sources
*
* Revision 1.1 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
*/
#ifndef BZ_ARRAYSHAPE_H #ifndef BZ_ARRAYSHAPE_H
#define BZ_ARRAYSHAPE_H #define BZ_ARRAYSHAPE_H
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/shape.h> must be included via <blitz/array.h> #error <blitz/array/shape.h> must be included via <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
 End of changes. 2 change blocks. 
16 lines changed or deleted 2 lines changed or added


 shapecheck.h   shapecheck.h 
/************************************************************************** * /************************************************************************** *
* blitz/shapecheck.h Functions for checking conformability of arrays * blitz/shapecheck.h Functions for checking conformability of arrays
* *
* $Id: shapecheck.h,v 1.3 2002/06/28 01:35:59 jcumming Exp $ * $Id: shapecheck.h,v 1.5 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: shapecheck.h,v $
* Revision 1.3 2002/06/28 01:35:59 jcumming
* Changed loop variable i to unsigned to avoid unsigned/signed comparisons
.
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.1 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
*/
#ifndef BZ_SHAPECHECK_H #ifndef BZ_SHAPECHECK_H
#define BZ_SHAPECHECK_H #define BZ_SHAPECHECK_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* The function areShapesConformable(A,B) checks that the shapes * The function areShapesConformable(A,B) checks that the shapes
* A and B are conformable (i.e. the same size/geometry). Typically * A and B are conformable (i.e. the same size/geometry). Typically
* the A and B parameters are of type TinyVector<int,N_rank> and represent * the A and B parameters are of type TinyVector<int,N_rank> and represent
* the extent of the arrays. It's possible that in the future jagged-edged * the extent of the arrays. It's possible that in the future jagged-edged
* arrays will be supported, in which case shapes may be lists * arrays will be supported, in which case shapes may be lists
* of subdomains. * of subdomains.
*/ */
template<class T_shape1, class T_shape2> template<typename T_shape1, typename T_shape2>
inline _bz_bool areShapesConformable(const T_shape1&, const T_shape2&) inline bool areShapesConformable(const T_shape1&, const T_shape2&)
{ {
// If the shape objects are different types, this means // If the shape objects are different types, this means
// that the arrays are different ranks, or one is jagged // that the arrays are different ranks, or one is jagged
// edged, etc. In this case the two arrays are not // edged, etc. In this case the two arrays are not
// conformable. // conformable.
return _bz_false; return false;
} }
template<class T_shape> template<typename T_shape>
inline _bz_bool areShapesConformable(const T_shape& a, const T_shape& b) inline bool areShapesConformable(const T_shape& a, const T_shape& b)
{ {
// The shape objects are the same type, so compare them. // The shape objects are the same type, so compare them.
// NEEDS_WORK-- once the "all" reduction is implemented, should // NEEDS_WORK-- once the "all" reduction is implemented, should
// use it. // use it.
// return all(a == b); // return all(a == b);
for (unsigned i=0; i < a.length(); ++i) for (unsigned i=0; i < a.length(); ++i)
{ {
if (a[i] != b[i]) if (a[i] != b[i])
{ {
BZ_DEBUG_MESSAGE("Incompatible shapes detected: " << endl BZ_DEBUG_MESSAGE("Incompatible shapes detected: " << endl
<< a << endl << b << endl); << a << endl << b << endl);
return _bz_false; return false;
} }
} }
return _bz_true; return true;
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif #endif
 End of changes. 7 change blocks. 
25 lines changed or deleted 10 lines changed or added


 slice.h   slice.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/slice.h Helper classes for slicing arrays * blitz/array/slice.h Helper classes for slicing arrays
* *
* $Id: slice.h,v 1.2 2001/01/24 20:22:51 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: slice.h,v $
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:14 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_ARRAYSLICE_H #ifndef BZ_ARRAYSLICE_H
#define BZ_ARRAYSLICE_H #define BZ_ARRAYSLICE_H
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/slice.h> must be included via <blitz/array.h> #error <blitz/array/slice.h> must be included via <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Forward declaration // Forward declaration
template<class T, int N> template<typename T, int N>
class Array; class Array;
class nilArraySection { }; class nilArraySection { };
template<class T> template<typename T>
class ArraySectionInfo { class ArraySectionInfo {
public: public:
enum { isValidType = 0, rank = 0, isPick = 0 }; static const int isValidType = 0, rank = 0, isPick = 0;
}; };
template<> template<>
class ArraySectionInfo<Range> { class ArraySectionInfo<Range> {
public: public:
enum { isValidType = 1, rank = 1, isPick = 0 }; static const int isValidType = 1, rank = 1, isPick = 0;
}; };
template<> template<>
class ArraySectionInfo<int> { class ArraySectionInfo<int> {
public: public:
enum { isValidType = 1, rank = 0, isPick = 0 }; static const int isValidType = 1, rank = 0, isPick = 0;
}; };
template<> template<>
class ArraySectionInfo<nilArraySection> { class ArraySectionInfo<nilArraySection> {
public: public:
enum { isValidType = 1, rank = 0, isPick = 0 }; static const int isValidType = 1, rank = 0, isPick = 0;
}; };
template<class T_numtype, class T1, class T2 = nilArraySection, template<typename T_numtype, typename T1, typename T2 = nilArraySection,
class T3 = nilArraySection, class T4 = nilArraySection, class T3 = nilArraySection, typename T4 = nilArraySection,
class T5 = nilArraySection, class T6 = nilArraySection, class T5 = nilArraySection, typename T6 = nilArraySection,
class T7 = nilArraySection, class T8 = nilArraySection, class T7 = nilArraySection, typename T8 = nilArraySection,
class T9 = nilArraySection, class T10 = nilArraySection, class T9 = nilArraySection, typename T10 = nilArraySection,
class T11 = nilArraySection> class T11 = nilArraySection>
class SliceInfo { class SliceInfo {
public: public:
enum { static const int
numValidTypes = ArraySectionInfo<T1>::isValidType numValidTypes = ArraySectionInfo<T1>::isValidType
+ ArraySectionInfo<T2>::isValidType + ArraySectionInfo<T2>::isValidType
+ ArraySectionInfo<T3>::isValidType + ArraySectionInfo<T3>::isValidType
+ ArraySectionInfo<T4>::isValidType + ArraySectionInfo<T4>::isValidType
+ ArraySectionInfo<T5>::isValidType + ArraySectionInfo<T5>::isValidType
+ ArraySectionInfo<T6>::isValidType + ArraySectionInfo<T6>::isValidType
+ ArraySectionInfo<T7>::isValidType + ArraySectionInfo<T7>::isValidType
+ ArraySectionInfo<T8>::isValidType + ArraySectionInfo<T8>::isValidType
+ ArraySectionInfo<T9>::isValidType + ArraySectionInfo<T9>::isValidType
+ ArraySectionInfo<T10>::isValidType + ArraySectionInfo<T10>::isValidType
skipping to change at line 122 skipping to change at line 106
isPick = ArraySectionInfo<T1>::isPick isPick = ArraySectionInfo<T1>::isPick
+ ArraySectionInfo<T2>::isPick + ArraySectionInfo<T2>::isPick
+ ArraySectionInfo<T3>::isPick + ArraySectionInfo<T3>::isPick
+ ArraySectionInfo<T4>::isPick + ArraySectionInfo<T4>::isPick
+ ArraySectionInfo<T5>::isPick + ArraySectionInfo<T5>::isPick
+ ArraySectionInfo<T6>::isPick + ArraySectionInfo<T6>::isPick
+ ArraySectionInfo<T7>::isPick + ArraySectionInfo<T7>::isPick
+ ArraySectionInfo<T8>::isPick + ArraySectionInfo<T8>::isPick
+ ArraySectionInfo<T9>::isPick + ArraySectionInfo<T9>::isPick
+ ArraySectionInfo<T10>::isPick + ArraySectionInfo<T10>::isPick
+ ArraySectionInfo<T11>::isPick + ArraySectionInfo<T11>::isPick;
};
typedef Array<T_numtype,numValidTypes> T_array; typedef Array<T_numtype,numValidTypes> T_array;
typedef Array<T_numtype,rank> T_slice; typedef Array<T_numtype,rank> T_slice;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ARRAYSLICE_H #endif // BZ_ARRAYSLICE_H
 End of changes. 12 change blocks. 
33 lines changed or deleted 16 lines changed or added


 slicing.cc   slicing.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/slicing.cc Slicing of arrays * blitz/array/slicing.cc Slicing of arrays
* *
* $Id: slicing.cc,v 1.7 2002/06/28 01:37:40 jcumming Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: slicing.cc,v $
* Revision 1.7 2002/06/28 01:37:40 jcumming
* Modified valid indexing check to avoid casting to unsigned.
*
* Revision 1.6 2002/06/27 00:18:10 jcumming
* Changed T_numtype to P_numtype when used outside the argument list or bo
dy
* of a member function definition (i.e., outside the class scope). Inside
* the class scope, we can use the typedef T_numtype. The IBM xlC compiler
* gets confused if P_numtype is used as a template parameter name in a mem
ber
* function declaration and then T_numtype is used as the parameter name in
* the member function definition. Fixed usage to be more consistent.
*
* Revision 1.5 2002/05/27 19:49:27 jcumming
* Removed use of this->. Member data_ of templated base class is now decl
ared
* in derived class Array.
*
* Revision 1.4 2002/03/06 16:12:06 patricg
*
* data_ replaced by this->data_ everywhere
*
* Revision 1.3 2001/02/11 15:43:39 tveldhui
* Additions from Julian Cummings:
* - StridedDomain class
* - more versions of resizeAndPreserve
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYSLICING_CC #ifndef BZ_ARRAYSLICING_CC
#define BZ_ARRAYSLICING_CC #define BZ_ARRAYSLICING_CC
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/slicing.cc> must be included via <blitz/array.h> #error <blitz/array/slicing.cc> must be included via <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* These routines make the array a view of a portion of another array. * These routines make the array a view of a portion of another array.
* They all work by first referencing the other array, and then slicing. * They all work by first referencing the other array, and then slicing.
*/ */
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, const RectDomain<N_rank>& subdomain) Array<T_numtype, N_rank>& array, const RectDomain<N_rank>& subdomain)
{ {
reference(array); reference(array);
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
slice(i, subdomain[i]); slice(i, subdomain[i]);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, const StridedDomain<N_rank>& subdomain ) Array<T_numtype, N_rank>& array, const StridedDomain<N_rank>& subdomain )
{ {
reference(array); reference(array);
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
slice(i, subdomain[i]); slice(i, subdomain[i]);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0) Array<T_numtype, N_rank>& array, Range r0)
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0, Range r1) Array<T_numtype, N_rank>& array, Range r0, Range r1)
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
slice(1, r1); slice(1, r1);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2) Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2)
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
slice(1, r1); slice(1, r1);
slice(2, r2); slice(2, r2);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 ) Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 )
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
slice(1, r1); slice(1, r1);
slice(2, r2); slice(2, r2);
slice(3, r3); slice(3, r3);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 , Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 ,
Range r4) Range r4)
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
slice(1, r1); slice(1, r1);
slice(2, r2); slice(2, r2);
slice(3, r3); slice(3, r3);
slice(4, r4); slice(4, r4);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 , Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 ,
Range r4, Range r5) Range r4, Range r5)
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
slice(1, r1); slice(1, r1);
slice(2, r2); slice(2, r2);
slice(3, r3); slice(3, r3);
slice(4, r4); slice(4, r4);
slice(5, r5); slice(5, r5);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 , Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 ,
Range r4, Range r5, Range r6) Range r4, Range r5, Range r6)
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
slice(1, r1); slice(1, r1);
slice(2, r2); slice(2, r2);
slice(3, r3); slice(3, r3);
slice(4, r4); slice(4, r4);
slice(5, r5); slice(5, r5);
slice(6, r6); slice(6, r6);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 , Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 ,
Range r4, Range r5, Range r6, Range r7) Range r4, Range r5, Range r6, Range r7)
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
slice(1, r1); slice(1, r1);
slice(2, r2); slice(2, r2);
slice(3, r3); slice(3, r3);
slice(4, r4); slice(4, r4);
slice(5, r5); slice(5, r5);
slice(6, r6); slice(6, r6);
slice(7, r7); slice(7, r7);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 , Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 ,
Range r4, Range r5, Range r6, Range r7, Range r8) Range r4, Range r5, Range r6, Range r7, Range r8)
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
slice(1, r1); slice(1, r1);
slice(2, r2); slice(2, r2);
slice(3, r3); slice(3, r3);
slice(4, r4); slice(4, r4);
slice(5, r5); slice(5, r5);
slice(6, r6); slice(6, r6);
slice(7, r7); slice(7, r7);
slice(8, r8); slice(8, r8);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 , Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 ,
Range r4, Range r5, Range r6, Range r7, Range r8, Range r9) Range r4, Range r5, Range r6, Range r7, Range r8, Range r9)
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
slice(1, r1); slice(1, r1);
slice(2, r2); slice(2, r2);
slice(3, r3); slice(3, r3);
slice(4, r4); slice(4, r4);
slice(5, r5); slice(5, r5);
slice(6, r6); slice(6, r6);
slice(7, r7); slice(7, r7);
slice(8, r8); slice(8, r8);
slice(9, r9); slice(9, r9);
} }
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::constructSubarray( void Array<P_numtype, N_rank>::constructSubarray(
Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 , Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3 ,
Range r4, Range r5, Range r6, Range r7, Range r8, Range r9, Range r10) Range r4, Range r5, Range r6, Range r7, Range r8, Range r9, Range r10)
{ {
reference(array); reference(array);
slice(0, r0); slice(0, r0);
slice(1, r1); slice(1, r1);
slice(2, r2); slice(2, r2);
slice(3, r3); slice(3, r3);
slice(4, r4); slice(4, r4);
skipping to change at line 242 skipping to change at line 210
slice(8, r8); slice(8, r8);
slice(9, r9); slice(9, r9);
slice(10, r10); slice(10, r10);
} }
/* /*
* This member template is used to implement operator() with any * This member template is used to implement operator() with any
* combination of int and Range parameters. There's room for up * combination of int and Range parameters. There's room for up
* to 11 parameters, but any unused parameters have no effect. * to 11 parameters, but any unused parameters have no effect.
*/ */
template<class P_numtype, int N_rank> template<int N_rank2, class R0, template<typename P_numtype, int N_rank> template<int N_rank2, typename R0,
class R1, class R2, class R3, class R4, class R5, class R6, class R7, class R1, typename R2, typename R3, typename R4, typename R5, typename
class R8, class R9, class R10> R6, typename R7,
class R8, typename R9, typename R10>
void Array<P_numtype, N_rank>::constructSlice(Array<T_numtype, N_rank2>& ar ray, void Array<P_numtype, N_rank>::constructSlice(Array<T_numtype, N_rank2>& ar ray,
R0 r0, R1 r1, R2 r2, R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R0 r0, R1 r1, R2 r2, R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9,
R10 r10) R10 r10)
{ {
MemoryBlockReference<T_numtype>::changeBlock(array, array.zeroOffset()) MemoryBlockReference<T_numtype>::changeBlock(array);
;
data_ = array.dataZero();
int setRank = 0; int setRank = 0;
TinyVector<int, N_rank2> rankMap; TinyVector<int, N_rank2> rankMap;
slice(setRank, r0, array, rankMap, 0); slice(setRank, r0, array, rankMap, 0);
slice(setRank, r1, array, rankMap, 1); slice(setRank, r1, array, rankMap, 1);
slice(setRank, r2, array, rankMap, 2); slice(setRank, r2, array, rankMap, 2);
slice(setRank, r3, array, rankMap, 3); slice(setRank, r3, array, rankMap, 3);
slice(setRank, r4, array, rankMap, 4); slice(setRank, r4, array, rankMap, 4);
skipping to change at line 286 skipping to change at line 253
calculateZeroOffset(); calculateZeroOffset();
} }
/* /*
* This member template is also used in the implementation of * This member template is also used in the implementation of
* operator() with any combination of int and Rank parameters. * operator() with any combination of int and Rank parameters.
* It's called by constructSlice(), above. This version handles * It's called by constructSlice(), above. This version handles
* Range parameters. * Range parameters.
*/ */
template<class P_numtype, int N_rank> template<int N_rank2> template<typename P_numtype, int N_rank> template<int N_rank2>
void Array<P_numtype, N_rank>::slice(int& setRank, Range r, void Array<P_numtype, N_rank>::slice(int& setRank, Range r,
Array<T_numtype,N_rank2>& array, TinyVector<int,N_rank2>& rankMap, Array<T_numtype,N_rank2>& array, TinyVector<int,N_rank2>& rankMap,
int sourceRank) int sourceRank)
{ {
// NEEDS WORK: ordering will change completely when some ranks // NEEDS WORK: ordering will change completely when some ranks
// are deleted. // are deleted.
#ifdef BZ_DEBUG_SLICE #ifdef BZ_DEBUG_SLICE
cout << "slice(" << setRank << ", [" << r.first(array.lbound(sourceRank)) cout << "slice(" << setRank << ", [" << r.first(array.lbound(sourceRank))
<< ", " << r.last(array.ubound(sourceRank)) << "], Array<T," << ", " << r.last(array.ubound(sourceRank)) << "], Array<T,"
skipping to change at line 315 skipping to change at line 282
slice(setRank, r); slice(setRank, r);
++setRank; ++setRank;
} }
/* /*
* This member template is also used in the implementation of * This member template is also used in the implementation of
* operator() with any combination of int and Rank parameters. * operator() with any combination of int and Rank parameters.
* It's called by constructSlice(), above. This version handles * It's called by constructSlice(), above. This version handles
* int parameters, which reduce the dimensionality by one. * int parameters, which reduce the dimensionality by one.
*/ */
template<class P_numtype, int N_rank> template<int N_rank2> template<typename P_numtype, int N_rank> template<int N_rank2>
void Array<P_numtype, N_rank>::slice(int& setRank, int i, void Array<P_numtype, N_rank>::slice(int&, int i,
Array<T_numtype,N_rank2>& array, TinyVector<int,N_rank2>& rankMap, Array<T_numtype,N_rank2>& array, TinyVector<int,N_rank2>& rankMap,
int sourceRank) int sourceRank)
{ {
#ifdef BZ_DEBUG_SLICE #ifdef BZ_DEBUG_SLICE
cout << "slice(" << setRank << ", " << i cout << "slice(" << i
<< ", Array<T," << N_rank2 << ">, " << sourceRank << ")" << endl; << ", Array<T," << N_rank2 << ">, " << sourceRank << ")" << endl;
cout << "Offset by " << (i * array.stride(sourceRank)) cout << "Offset by " << (i * array.stride(sourceRank))
<< endl; << endl;
#endif #endif
BZPRECHECK(array.isInRangeForDim(i, sourceRank), BZPRECHECK(array.isInRangeForDim(i, sourceRank),
"Slice is out of range for array: index=" << i << " rank=" << sourc eRank "Slice is out of range for array: index=" << i << " rank=" << sourc eRank
<< endl << "Possible range for index: [" << array.lbound(sourceRan k) << endl << "Possible range for index: [" << array.lbound(sourceRan k)
<< ", " << array.ubound(sourceRank) << "]"); << ", " << array.ubound(sourceRank) << "]");
rankMap[sourceRank] = -1; rankMap[sourceRank] = -1;
skipping to change at line 345 skipping to change at line 312
#endif #endif
} }
/* /*
* After calling slice(int rank, Range r), the array refers only to the * After calling slice(int rank, Range r), the array refers only to the
* Range r of the original array. * Range r of the original array.
* e.g. Array<int,1> x(100); * e.g. Array<int,1> x(100);
* x.slice(firstRank, Range(25,50)); * x.slice(firstRank, Range(25,50));
* x = 0; // Sets elements 25..50 of the original array to 0 * x = 0; // Sets elements 25..50 of the original array to 0
*/ */
template<class P_numtype, int N_rank> template<typename P_numtype, int N_rank>
void Array<P_numtype, N_rank>::slice(int rank, Range r) void Array<P_numtype, N_rank>::slice(int rank, Range r)
{ {
BZPRECONDITION((rank >= 0) && (rank < N_rank)); BZPRECONDITION((rank >= 0) && (rank < N_rank));
int first = r.first(lbound(rank)); int first = r.first(lbound(rank));
int last = r.last(ubound(rank)); int last = r.last(ubound(rank));
int stride = r.stride(); int stride = r.stride();
#ifdef BZ_DEBUG_SLICE #ifdef BZ_DEBUG_SLICE
cout << "slice(" << rank << ", Range):" << endl cout << "slice(" << rank << ", Range):" << endl
skipping to change at line 377 skipping to change at line 344
<< ubound(rank) << ")"); << ubound(rank) << ")");
// Will the storage be non-contiguous? // Will the storage be non-contiguous?
// (1) Slice in the minor dimension and the range does not span // (1) Slice in the minor dimension and the range does not span
// the entire index interval (NB: non-unit strides are possible) // the entire index interval (NB: non-unit strides are possible)
// (2) Slice in a middle dimension and the range is not Range::all() // (2) Slice in a middle dimension and the range is not Range::all()
length_[rank] = (last - first) / stride + 1; length_[rank] = (last - first) / stride + 1;
// TV 20000312: added second term here, for testsuite/Josef-Wagenhuber // TV 20000312: added second term here, for testsuite/Josef-Wagenhuber
int offset = -base(rank) * stride_[rank] * stride int offset = (first - base(rank) * stride) * stride_[rank];
+ first * stride_[rank];
// (first - base(rank)) * stride_[rank]
data_ += offset; data_ += offset;
zeroOffset_ -= offset; zeroOffset_ += offset;
stride_[rank] *= stride; stride_[rank] *= stride;
// JCC: adjust ascending flag if slicing with backwards Range
if (stride<0)
storage_.setAscendingFlag(rank, !isRankStoredAscending(rank));
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ARRAYSLICING_CC #endif // BZ_ARRAYSLICING_CC
 End of changes. 24 change blocks. 
65 lines changed or deleted 31 lines changed or added


 stencil-et.h   stencil-et.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/stencil-et.h Expression-template-capabale stencils * blitz/array/stencil-et.h Expression-template-capabale stencils
* *
* $Id: stencil-et.h,v 1.5 2002/05/27 19:43:30 jcumming Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: stencil-et.h,v $
* Revision 1.5 2002/05/27 19:43:30 jcumming
* Removed use of this->. iter_ is now declared in scope of derived classe
s.
*
* Revision 1.4 2002/04/17 16:56:42 patricg
*
* replaced T_numtype with P_numtype in every macros definitions. Fixed a
* compilation problem with aCC/HP in the stencils examples (stencils2.cpp,
* stencil3.cpp, stencilet.cpp) in the directory examples.
* Suggested by Robert W. Techentin <techentin.robert@mayo.edu>
*
* Revision 1.3 2002/03/21 15:03:01 patricg
*
* replaced iter_ by this->iter_ in derived template classes of StencilExpr
* template class
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_STENCIL_ET_H #ifndef BZ_ARRAY_STENCIL_ET_H
#define BZ_ARRAY_STENCIL_ET_H #define BZ_ARRAY_STENCIL_ET_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<typename T_ArrayNumtype, int N_rank, typename T_result> template<typename T_ArrayNumtype, int N_rank, typename T_result>
class StencilExpr class StencilExpr
{ {
public: public:
typedef T_result T_numtype; typedef T_result T_numtype;
typedef Array<T_ArrayNumtype,N_rank> T_array; typedef Array<T_ArrayNumtype,N_rank> T_array;
typedef const T_array& T_ctorArg1; typedef const T_array& T_ctorArg1;
typedef int T_ctorArg2; typedef int T_ctorArg2;
enum { numArrayOperands = 1, numIndexPlaceholders = 0, static const int
rank = N_rank }; numArrayOperands = 1,
numIndexPlaceholders = 0,
rank = N_rank;
StencilExpr(const T_array& array) StencilExpr(const T_array& array)
: iter_(array) : iter_(array)
{ } { }
~StencilExpr() ~StencilExpr()
{ } { }
// operator* must be declared by subclass // operator* must be declared by subclass
skipping to change at line 99 skipping to change at line 79
void advance() void advance()
{ iter_.advance(); } { iter_.advance(); }
void advance(int n) void advance(int n)
{ iter_.advance(n); } { iter_.advance(n); }
void loadStride(int rank) void loadStride(int rank)
{ iter_.loadStride(rank); } { iter_.loadStride(rank); }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int rank) const
{ return iter_.isUnitStride(rank); } { return iter_.isUnitStride(rank); }
void advanceUnitStride() void advanceUnitStride()
{ iter_.advanceUnitStride(); } { iter_.advanceUnitStride(); }
_bz_bool canCollapse(int outerLoopRank, int innerLoopRank) const bool canCollapse(int outerLoopRank, int innerLoopRank) const
{ {
// BZ_DEBUG_MESSAGE("_bz_ArrayExpr<>::canCollapse()"); // BZ_DEBUG_MESSAGE("_bz_ArrayExpr<>::canCollapse()");
return iter_.canCollapse(outerLoopRank, innerLoopRank); return iter_.canCollapse(outerLoopRank, innerLoopRank);
} }
// T_numtype operator[](int i) -- don't know how to do that. // T_numtype operator[](int i) -- don't know how to do that.
// T_numtype fastRead(int i) -- ditto // T_numtype fastRead(int i) -- ditto
int suggestStride(int rank) const int suggestStride(int rank) const
{ return iter_.suggestStride(rank); } { return iter_.suggestStride(rank); }
_bz_bool isStride(int rank, int stride) const bool isStride(int rank, int stride) const
{ return iter_.isStride(rank,stride); } { return iter_.isStride(rank,stride); }
void prettyPrint(string& str) const void prettyPrint(BZ_STD_SCOPE(string) &str) const
{ {
str += "(stencil)"; // lame, needs work str += "(stencil)"; // lame, needs work
} }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat&) const
{ str += "(stencil)"; } { str += "(stencil)"; }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) bool shapeCheck(const T_shape& shape)
{ return iter_.shapeCheck(shape); } { return iter_.shapeCheck(shape); }
void moveTo(const TinyVector<int,N_rank>& i) void moveTo(const TinyVector<int,N_rank>& i)
{ {
iter_.moveTo(i); iter_.moveTo(i);
} }
protected: protected:
FastArrayIterator<T_ArrayNumtype,N_rank> iter_; FastArrayIterator<T_ArrayNumtype,N_rank> iter_;
}; };
#define BZ_ET_STENCIL(name,result) \ #define BZ_ET_STENCIL(name,result) \
template<class P_numtype, int N_rank> \ template<typename P_numtype, int N_rank> \
class name ## _et : public StencilExpr<P_numtype,N_rank,result>, \ class name ## _et : public StencilExpr<P_numtype,N_rank,result>, \
public ETBase<name ## _et<P_numtype,N_rank> > \ public ETBase<name ## _et<P_numtype,N_rank> > \
{ \ { \
private: \ private: \
typedef StencilExpr<P_numtype,N_rank,result> T_base; \ typedef StencilExpr<P_numtype,N_rank,result> T_base; \
using T_base::iter_; \ using T_base::iter_; \
public: \ public: \
name ## _et(const Array<P_numtype,N_rank>& A) \ name ## _et(const Array<P_numtype,N_rank>& A) \
: StencilExpr<P_numtype,N_rank,result>(A) \ : StencilExpr<P_numtype,N_rank,result>(A) \
{ } \ { } \
skipping to change at line 167 skipping to change at line 147
{ iter_.moveTo(a); return name(iter_); } \ { iter_.moveTo(a); return name(iter_); } \
result fastRead(int i) \ result fastRead(int i) \
{ \ { \
const P_numtype* tmp = iter_.data(); \ const P_numtype* tmp = iter_.data(); \
iter_._bz_setData(tmp + i); \ iter_._bz_setData(tmp + i); \
P_numtype r = name(iter_); \ P_numtype r = name(iter_); \
iter_._bz_setData(tmp); \ iter_._bz_setData(tmp); \
return r; \ return r; \
} \ } \
}; \ }; \
template<class P_numtype, int N_rank> \ template<typename P_numtype, int N_rank> \
inline _bz_ArrayExpr<name ## _et<P_numtype, N_rank> > \ inline _bz_ArrayExpr<name ## _et<P_numtype, N_rank> > \
name(Array<P_numtype,N_rank>& A) \ name(Array<P_numtype,N_rank>& A) \
{ \ { \
return _bz_ArrayExpr<name ## _et<P_numtype, N_rank> >(A); \ return _bz_ArrayExpr<name ## _et<P_numtype, N_rank> >(A); \
} }
#define BZ_ET_STENCILV(name,rank) \ #define BZ_ET_STENCILV(name,rank) \
template<class P_numtype, int N_rank> \ template<typename P_numtype, int N_rank> \
class name ## _et : public StencilExpr<P_numtype,N_rank, \ class name ## _et : public StencilExpr<P_numtype,N_rank, \
TinyVector<P_numtype,rank> >, \ TinyVector<P_numtype,rank> >, \
public ETBase<name ## _et<P_numtype,N_rank> > \ public ETBase<name ## _et<P_numtype,N_rank> > \
{ \ { \
private: \ private: \
typedef StencilExpr<P_numtype,N_rank,TinyVector<P_numtype,rank> > T_bas e; \ typedef StencilExpr<P_numtype,N_rank,TinyVector<P_numtype,rank> > T_bas e; \
using T_base::iter_; \ using T_base::iter_; \
public: \ public: \
typedef TinyVector<P_numtype,rank> result; \ typedef TinyVector<P_numtype,rank> result; \
name ## _et(const Array<P_numtype,N_rank>& A) \ name ## _et(const Array<P_numtype,N_rank>& A) \
skipping to change at line 201 skipping to change at line 181
{ iter_.moveTo(a); return name(iter_); } \ { iter_.moveTo(a); return name(iter_); } \
result fastRead(int i) \ result fastRead(int i) \
{ \ { \
const P_numtype* tmp = iter_.data(); \ const P_numtype* tmp = iter_.data(); \
iter_._bz_setData(tmp + i); \ iter_._bz_setData(tmp + i); \
P_numtype r = name(iter_); \ P_numtype r = name(iter_); \
iter_._bz_setData(tmp); \ iter_._bz_setData(tmp); \
return r; \ return r; \
} \ } \
}; \ }; \
template<class P_numtype, int N_rank> \ template<typename P_numtype, int N_rank> \
inline _bz_ArrayExpr<name ## _et<P_numtype, N_rank> > \ inline _bz_ArrayExpr<name ## _et<P_numtype, N_rank> > \
name(Array<P_numtype,N_rank>& A) \ name(Array<P_numtype,N_rank>& A) \
{ \ { \
return _bz_ArrayExpr< name ## _et<P_numtype, N_rank> >(A); \ return _bz_ArrayExpr< name ## _et<P_numtype, N_rank> >(A); \
} }
#define BZ_ET_STENCIL_DIFF(name) \ #define BZ_ET_STENCIL_DIFF(name) \
template<class P_numtype, int N_rank> \ template<typename P_numtype, int N_rank> \
class name ## _et : public StencilExpr<P_numtype,N_rank,P_numtype>, \ class name ## _et : public StencilExpr<P_numtype,N_rank,P_numtype>, \
public ETBase<name ## _et<P_numtype,N_rank> > \ public ETBase<name ## _et<P_numtype,N_rank> > \
{ \ { \
private: \ private: \
typedef StencilExpr<P_numtype,N_rank,P_numtype> T_base; \ typedef StencilExpr<P_numtype,N_rank,P_numtype> T_base; \
using T_base::iter_; \ using T_base::iter_; \
public: \ public: \
name ## _et(const Array<P_numtype,N_rank>& A, int dim) \ name ## _et(const Array<P_numtype,N_rank>& A, int dim) \
: StencilExpr<P_numtype,N_rank,P_numtype>(A), dim_(dim) \ : StencilExpr<P_numtype,N_rank,P_numtype>(A), dim_(dim) \
{ } \ { } \
skipping to change at line 235 skipping to change at line 215
{ \ { \
const P_numtype* tmp = iter_.data(); \ const P_numtype* tmp = iter_.data(); \
iter_._bz_setData(tmp + i); \ iter_._bz_setData(tmp + i); \
P_numtype r = name(iter_,dim_); \ P_numtype r = name(iter_,dim_); \
iter_._bz_setData(tmp); \ iter_._bz_setData(tmp); \
return r; \ return r; \
} \ } \
private: \ private: \
int dim_; \ int dim_; \
}; \ }; \
template<class P_numtype, int N_rank> \ template<typename P_numtype, int N_rank> \
inline _bz_ArrayExpr<name ## _et<P_numtype, N_rank> > \ inline _bz_ArrayExpr<name ## _et<P_numtype, N_rank> > \
name(Array<P_numtype,N_rank>& A, int dim) \ name(Array<P_numtype,N_rank>& A, int dim) \
{ \ { \
return _bz_ArrayExpr<name ## _et<P_numtype, N_rank> >(A,dim); \ return _bz_ArrayExpr<name ## _et<P_numtype, N_rank> >(A,dim); \
} }
BZ_ET_STENCIL(Laplacian2D, P_numtype) BZ_ET_STENCIL(Laplacian2D, P_numtype)
BZ_ET_STENCIL(Laplacian3D, P_numtype) BZ_ET_STENCIL(Laplacian3D, P_numtype)
BZ_ET_STENCIL(Laplacian2D4, P_numtype) BZ_ET_STENCIL(Laplacian2D4, P_numtype)
BZ_ET_STENCIL(Laplacian2D4n, P_numtype) BZ_ET_STENCIL(Laplacian2D4n, P_numtype)
 End of changes. 16 change blocks. 
41 lines changed or deleted 20 lines changed or added


 stencilops.h   stencilops.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/stencilops.h Stencil operators * blitz/array/stencilops.h Stencil operators
* *
* $Id: stencilops.h,v 1.3 2001/01/25 00:25:55 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: stencilops.h,v $
* Revision 1.3 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYSTENCILOPS_H #ifndef BZ_ARRAYSTENCILOPS_H
#define BZ_ARRAYSTENCILOPS_H #define BZ_ARRAYSTENCILOPS_H
// NEEDS_WORK: need to factor many of the stencils in terms of the // NEEDS_WORK: need to factor many of the stencils in terms of the
// integer constants, e.g. 16*(A(-1,0)+A(0,-1)+A(0,1)+A(1,0)) // integer constants, e.g. 16*(A(-1,0)+A(0,-1)+A(0,1)+A(1,0))
#ifndef BZ_ARRAYSTENCILS_H #ifndef BZ_ARRAYSTENCILS_H
#error <blitz/array/stencilops.h> must be included via <blitz/array/stenci ls.h> #error <blitz/array/stencilops.h> must be included via <blitz/array/stenci ls.h>
#endif #endif
skipping to change at line 52 skipping to change at line 45
#include <blitz/array/geometry.h> #include <blitz/array/geometry.h>
#endif #endif
#ifndef BZ_TINYMAT_H #ifndef BZ_TINYMAT_H
#include <blitz/tinymat.h> #include <blitz/tinymat.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
#define BZ_DECLARE_STENCIL_OPERATOR1(name,A) \ #define BZ_DECLARE_STENCIL_OPERATOR1(name,A) \
template<class T> \ template<typename T> \
inline _bz_typename T::T_numtype name(T& A) \ inline _bz_typename T::T_numtype name(T& A) \
{ {
#define BZ_END_STENCIL_OPERATOR } #define BZ_END_STENCIL_OPERATOR }
#define BZ_DECLARE_STENCIL_OPERATOR2(name,A,B) \ #define BZ_DECLARE_STENCIL_OPERATOR2(name,A,B) \
template<class T> \ template<typename T> \
inline _bz_typename T::T_numtype name(T& A, T& B) \ inline _bz_typename T::T_numtype name(T& A, T& B) \
{ {
#define BZ_DECLARE_STENCIL_OPERATOR3(name,A,B,C) \ #define BZ_DECLARE_STENCIL_OPERATOR3(name,A,B,C) \
template<class T> \ template<typename T> \
inline _bz_typename T::T_numtype name(T& A, T& B, T& C) \ inline _bz_typename T::T_numtype name(T& A, T& B, T& C) \
{ {
// These constants are accurate to 45 decimal places = 149 bits of mantissa // These constants are accurate to 45 decimal places = 149 bits of mantissa
const double recip_2 = .500000000000000000000000000000000000000000000; const double recip_2 = .500000000000000000000000000000000000000000000;
const double recip_4 = .250000000000000000000000000000000000000000000; const double recip_4 = .250000000000000000000000000000000000000000000;
const double recip_6 = .166666666666666666666666666666666666666666667; const double recip_6 = .166666666666666666666666666666666666666666667;
const double recip_8 = .125000000000000000000000000000000000000000000; const double recip_8 = .125000000000000000000000000000000000000000000;
const double recip_12 = .0833333333333333333333333333333333333333333333; const double recip_12 = .0833333333333333333333333333333333333333333333;
const double recip_144 = .00694444444444444444444444444444444444444444444; const double recip_144 = .00694444444444444444444444444444444444444444444;
/************************************************************************** ** /************************************************************************** **
* Laplacian Operators * Laplacian Operators
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_STENCIL_OPERATOR1(Laplacian2D, A) BZ_DECLARE_STENCIL_OPERATOR1(Laplacian2D, A)
return -4.0 * A + A.shift(-1,0) + A.shift(1,0) + A.shift(-1,1) return -4.0 * (*A)
+ A.shift(1,1); + A.shift(-1,0) + A.shift(1,0)
+ A.shift(-1,1) + A.shift(1,1);
BZ_END_STENCIL_OPERATOR BZ_END_STENCIL_OPERATOR
BZ_DECLARE_STENCIL_OPERATOR1(Laplacian3D, A) BZ_DECLARE_STENCIL_OPERATOR1(Laplacian3D, A)
return -6.0 * A return -6.0 * (*A)
+ A.shift(-1,0) + A.shift(1,0) + A.shift(-1,0) + A.shift(1,0)
+ A.shift(-1,1) + A.shift(1,1) + A.shift(-1,1) + A.shift(1,1)
+ A.shift(-1,2) + A.shift(1,2); + A.shift(-1,2) + A.shift(1,2);
BZ_END_STENCIL_OPERATOR BZ_END_STENCIL_OPERATOR
BZ_DECLARE_STENCIL_OPERATOR1(Laplacian2D4, A) BZ_DECLARE_STENCIL_OPERATOR1(Laplacian2D4, A)
return -60. * A return -60.0 * (*A)
+ 16.*(A.shift(-1,0) + A.shift(1,0) + A.shift(-1,1) + A.shift(1,1)) + 16.0 * (A.shift(-1,0) + A.shift(1,0) + A.shift(-1,1) + A.shift(1,1))
- (A.shift(-2,0) + A.shift(2,0) + A.shift(-2,1) + A.shift(2,1)); - (A.shift(-2,0) + A.shift(2,0) + A.shift(-2,1) + A.shift(2,1));
BZ_END_STENCIL_OPERATOR BZ_END_STENCIL_OPERATOR
BZ_DECLARE_STENCIL_OPERATOR1(Laplacian2D4n, A) BZ_DECLARE_STENCIL_OPERATOR1(Laplacian2D4n, A)
return Laplacian2D4(A) * recip_12; return Laplacian2D4(A) * recip_12;
BZ_END_STENCIL_OPERATOR BZ_END_STENCIL_OPERATOR
BZ_DECLARE_STENCIL_OPERATOR1(Laplacian3D4, A) BZ_DECLARE_STENCIL_OPERATOR1(Laplacian3D4, A)
return -90. * A return -90.0 * (*A)
+ 16.*(A.shift(-1,0) + A.shift(1,0) + A.shift(-1,1) + A.shift(1,1) + 16.0 * (A.shift(-1,0) + A.shift(1,0) + A.shift(-1,1) + A.shift(1,1) +
+ A.shift(-1,2) + A.shift(1,2)) A.shift(-1,2) + A.shift(1,2))
- (A.shift(-2,0) + A.shift(2,0) + A.shift(-2,1) + A.shift(2,1) - (A.shift(-2,0) + A.shift(2,0) + A.shift(-2,1) + A.shift(2,1) +
+ A.shift(-2,2) + A.shift(2,2)); A.shift(-2,2) + A.shift(2,2));
BZ_END_STENCIL_OPERATOR BZ_END_STENCIL_OPERATOR
BZ_DECLARE_STENCIL_OPERATOR1(Laplacian3D4n, A) BZ_DECLARE_STENCIL_OPERATOR1(Laplacian3D4n, A)
return Laplacian3D4(A) * recip_12; return Laplacian3D4(A) * recip_12;
BZ_END_STENCIL_OPERATOR BZ_END_STENCIL_OPERATOR
/************************************************************************** ** /************************************************************************** **
* Derivatives * Derivatives
************************************************************************** **/ ************************************************************************** **/
#define BZ_DECLARE_DIFF(name) \ #define BZ_DECLARE_DIFF(name) \
template<class T> \ template<typename T> \
inline _bz_typename T::T_numtype name(T& A, int dim = firstDim) inline _bz_typename T::T_numtype name(T& A, int dim = firstDim)
#define BZ_DECLARE_MULTIDIFF(name) \ #define BZ_DECLARE_MULTIDIFF(name) \
template<class T> \ template<typename T> \
inline _bz_typename multicomponent_traits<_bz_typename \ inline _bz_typename multicomponent_traits<_bz_typename \
T::T_numtype>::T_element name(T& A, int comp, int dim) T::T_numtype>::T_element name(T& A, int comp, int dim)
/************************************************************************** ** /************************************************************************** **
* Central differences with accuracy O(h^2) * Central differences with accuracy O(h^2)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(central12) { BZ_DECLARE_DIFF(central12) {
return A.shift(1,dim) - A.shift(-1,dim); return A.shift(1,dim) - A.shift(-1,dim);
} }
BZ_DECLARE_DIFF(central22) { BZ_DECLARE_DIFF(central22) {
return A.shift(-1,dim) - 2. * A + A.shift(+1,dim); return -2.0 * (*A) + A.shift(1,dim) + A.shift(-1,dim);
} }
BZ_DECLARE_DIFF(central32) { BZ_DECLARE_DIFF(central32) {
return -A.shift(-2,dim) + 2.*(A.shift(-1,dim) - A.shift(+1,dim)) return -2.0 * (A.shift(1,dim) - A.shift(-1,dim))
+ A.shift(+2,dim); + (A.shift(2,dim) - A.shift(-2,dim));
} }
BZ_DECLARE_DIFF(central42) { BZ_DECLARE_DIFF(central42) {
return A.shift(-2,dim) + A.shift(2,dim) -4.*(A.shift(-1,dim)+A.shift(+1,d return 6.0 * (*A)
im)) - 4.0 * (A.shift(1,dim) + A.shift(-1,dim))
+6.*A.shift(0,dim); + (A.shift(2,dim) + A.shift(-2,dim));
} }
/************************************************************************** ** /************************************************************************** **
* Central differences with accuracy O(h^2) (multicomponent versions) * Central differences with accuracy O(h^2) (multicomponent versions)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_MULTIDIFF(central12) { BZ_DECLARE_MULTIDIFF(central12) {
return A.shift(1,dim)[comp] - A.shift(-1,dim)[comp]; return A.shift(1,dim)[comp] - A.shift(-1,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(central22) { BZ_DECLARE_MULTIDIFF(central22) {
return A.shift(-1,dim)[comp] - 2. * (*A)[comp] + A.shift(+1,dim)[comp]; return -2.0 * (*A)[comp]
+ A.shift(1,dim)[comp] + A.shift(-1,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(central32) { BZ_DECLARE_MULTIDIFF(central32) {
return -A.shift(-2,dim)[comp] + 2.*A.shift(-1,dim)[comp] return -2.0 * (A.shift(1,dim)[comp] - A.shift(-1,dim)[comp])
-2.*A.shift(+1,dim)[comp] + A.shift(+2,dim)[comp]; + (A.shift(2,dim)[comp] - A.shift(-2,dim)[comp]);
} }
BZ_DECLARE_MULTIDIFF(central42) { BZ_DECLARE_MULTIDIFF(central42) {
return A.shift(-2,dim)[comp] -4.*A.shift(-1,dim)[comp] return 6.0 * (*A)[comp]
+6.*A.shift(0,dim)[comp] -4.*A.shift(1,dim)[comp] +A.shift(2,dim)[comp] -4.0 * (A.shift(1,dim)[comp] + A.shift(-1,dim)[comp])
; + (A.shift(2,dim)[comp] + A.shift(-2,dim)[comp]);
} }
/************************************************************************** ** /************************************************************************** **
* Central differences with accuracy O(h^2) (normalized versions) * Central differences with accuracy O(h^2) (normalized versions)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(central12n) { BZ_DECLARE_DIFF(central12n) {
return central12(A,dim) * recip_2; return central12(A,dim) * recip_2;
} }
skipping to change at line 216 skipping to change at line 213
BZ_DECLARE_MULTIDIFF(central42n) { BZ_DECLARE_MULTIDIFF(central42n) {
return central42(A,comp,dim); return central42(A,comp,dim);
} }
/************************************************************************** ** /************************************************************************** **
* Central differences with accuracy O(h^4) * Central differences with accuracy O(h^4)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(central14) { BZ_DECLARE_DIFF(central14) {
return (A.shift(-2,dim) - A.shift(2,dim)) return 8.0 * (A.shift(1,dim) - A.shift(-1,dim))
+ 8.*(A.shift(1,dim)-A.shift(-1,dim)); - (A.shift(2,dim) - A.shift(-2,dim));
} }
BZ_DECLARE_DIFF(central24) { BZ_DECLARE_DIFF(central24) {
return -30.*A + 16.*(A.shift(-1,dim)+A.shift(1,dim)) return -30.0 * (*A)
- (A.shift(-2,dim)+A.shift(2,dim)); + 16.0 * (A.shift(1,dim) + A.shift(-1,dim))
- (A.shift(2,dim) + A.shift(-2,dim));
} }
BZ_DECLARE_DIFF(central34) { BZ_DECLARE_DIFF(central34) {
return A.shift(-3,dim) - 8.*A.shift(-2,dim) +13.*A.shift(-1,dim) return -13.0 * (A.shift(1,dim) - A.shift(-1,dim))
-13.*A.shift(1,dim)+8.*A.shift(2,dim)-A.shift(3,dim); + 8.0 * (A.shift(2,dim) - A.shift(-2,dim))
- (A.shift(3,dim) - A.shift(-3,dim));
} }
BZ_DECLARE_DIFF(central44) { BZ_DECLARE_DIFF(central44) {
return -1.*A.shift(-3,dim)+12.*A.shift(-2,dim)-39.*A.shift(-1,dim) return 56.0 * (*A)
+56.*A-39.*A.shift(1,dim)+12.*A.shift(2,dim)-A.shift(3,dim); - 39.0 * (A.shift(1,dim) + A.shift(-1,dim))
+ 12.0 * (A.shift(2,dim) + A.shift(-2,dim))
- (A.shift(3,dim) + A.shift(-3,dim));
} }
/************************************************************************** ** /************************************************************************** **
* Central differences with accuracy O(h^4) (multicomponent versions) * Central differences with accuracy O(h^4) (multicomponent versions)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_MULTIDIFF(central14) { BZ_DECLARE_MULTIDIFF(central14) {
return A.shift(-2,dim)[comp] - 8. * A.shift(-1,dim)[comp] return 8.0 * (A.shift(1,dim)[comp] - A.shift(-1,dim)[comp])
+ 8. * A.shift(1,dim)[comp] - A.shift(2,dim)[comp]; - (A.shift(2,dim)[comp] - A.shift(-2,dim)[comp]);
} }
BZ_DECLARE_MULTIDIFF(central24) { BZ_DECLARE_MULTIDIFF(central24) {
return - A.shift(-2,dim)[comp] + 16.*A.shift(-1,dim)[comp] - 30.*(*A)[com return - 30.0 * (*A)[comp]
p] + 16.0 * (A.shift(1,dim)[comp] + A.shift(-1,dim)[comp])
+ 16.*A.shift(1,dim)[comp] - A.shift(2,dim)[comp]; - (A.shift(2,dim)[comp] + A.shift(-2,dim)[comp]);
} }
BZ_DECLARE_MULTIDIFF(central34) { BZ_DECLARE_MULTIDIFF(central34) {
return A.shift(-3,dim)[comp] - 8.*A.shift(-2,dim)[comp] return -13.0 * (A.shift(1,dim)[comp] - A.shift(-1,dim)[comp])
+13.*A.shift(-1,dim)[comp] - 13.*A.shift(1,dim)[comp] + 8.0 * (A.shift(2,dim)[comp] - A.shift(-2,dim)[comp])
+ 8.*A.shift(2,dim)[comp] - A.shift(3,dim)[comp]; - (A.shift(3,dim)[comp] - A.shift(-3,dim)[comp]);
} }
BZ_DECLARE_MULTIDIFF(central44) { BZ_DECLARE_MULTIDIFF(central44) {
return -1.*A.shift(-3,dim)[comp]+12.*A.shift(-2,dim)[comp] return 56.0 * (*A)[comp]
-39.*A.shift(-1,dim)[comp] +56.*(*A)[comp]-39.*A.shift(1,dim)[comp] - 39.0 * (A.shift(1,dim)[comp] + A.shift(-1,dim)[comp])
+12.*A.shift(2,dim)[comp]-A.shift(3,dim)[comp]; + 12.0 * (A.shift(2,dim)[comp] + A.shift(-2,dim)[comp])
- (A.shift(3,dim)[comp] + A.shift(-3,dim)[comp]);
} }
/************************************************************************** ** /************************************************************************** **
* Central differences with accuracy O(h^4) (normalized) * Central differences with accuracy O(h^4) (normalized)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(central14n) { BZ_DECLARE_DIFF(central14n) {
return central14(A,dim) * recip_12; return central14(A,dim) * recip_12;
} }
skipping to change at line 306 skipping to change at line 309
BZ_DECLARE_MULTIDIFF(central44n) { BZ_DECLARE_MULTIDIFF(central44n) {
return central44(A,comp,dim) * recip_6; return central44(A,comp,dim) * recip_6;
} }
/************************************************************************** ** /************************************************************************** **
* Backward differences with accuracy O(h) * Backward differences with accuracy O(h)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(backward11) { BZ_DECLARE_DIFF(backward11) {
return A - A.shift(-1,dim); return (*A) - A.shift(-1,dim);
} }
BZ_DECLARE_DIFF(backward21) { BZ_DECLARE_DIFF(backward21) {
return A -2.*A.shift(-1,dim) + A.shift(-2,dim); return (*A) - 2.0 * A.shift(-1,dim) + A.shift(-2,dim);
} }
BZ_DECLARE_DIFF(backward31) { BZ_DECLARE_DIFF(backward31) {
return A -3.*A.shift(-1,dim) + 3.*A.shift(-2,dim)-A.shift(-3,dim); return (*A) - 3.0 * A.shift(-1,dim) + 3.0 * A.shift(-2,dim)
- A.shift(-3,dim);
} }
BZ_DECLARE_DIFF(backward41) { BZ_DECLARE_DIFF(backward41) {
return A - 4.*A.shift(-1,dim) + 6.*A.shift(-2,dim) -4.*A.shift(-3,dim) return (*A) - 4.0 * A.shift(-1,dim) + 6.0 * A.shift(-2,dim)
+ A.shift(-4,dim); - 4.0 * A.shift(-3,dim) + A.shift(-4,dim);
} }
/************************************************************************** ** /************************************************************************** **
* Backward differences with accuracy O(h) (multicomponent versions) * Backward differences with accuracy O(h) (multicomponent versions)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_MULTIDIFF(backward11) { BZ_DECLARE_MULTIDIFF(backward11) {
return (*A)[comp] - A.shift(-1,dim)[comp]; return (*A)[comp] - A.shift(-1,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(backward21) { BZ_DECLARE_MULTIDIFF(backward21) {
return (*A)[comp] -2.*A.shift(-1,dim)[comp] + A.shift(-2,dim)[comp]; return (*A)[comp] - 2.0 * A.shift(-1,dim)[comp] + A.shift(-2,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(backward31) { BZ_DECLARE_MULTIDIFF(backward31) {
return (*A)[comp] -3.*A.shift(-1,dim)[comp] + 3.*A.shift(-2,dim)[comp] return (*A)[comp] - 3.0 * A.shift(-1,dim)[comp] + 3.0 * A.shift(-2,dim)[c
-A.shift(-3,dim)[comp]; omp]
- A.shift(-3,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(backward41) { BZ_DECLARE_MULTIDIFF(backward41) {
return (*A)[comp] - 4.*A.shift(-1,dim)[comp] + 6.*A.shift(-2,dim)[comp] return (*A)[comp] - 4.0 * A.shift(-1,dim)[comp] + 6.0 * A.shift(-2,dim)[c
-4.*A.shift(-3,dim)[comp] + A.shift(-4,dim)[comp]; omp]
- 4.0 * A.shift(-3,dim)[comp] + A.shift(-4,dim)[comp];
} }
/************************************************************************** ** /************************************************************************** **
* Backward differences with accuracy O(h) (normalized) * Backward differences with accuracy O(h) (normalized)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(backward11n) { return backward11(A,dim); } BZ_DECLARE_DIFF(backward11n) { return backward11(A,dim); }
BZ_DECLARE_DIFF(backward21n) { return backward21(A,dim); } BZ_DECLARE_DIFF(backward21n) { return backward21(A,dim); }
BZ_DECLARE_DIFF(backward31n) { return backward31(A,dim); } BZ_DECLARE_DIFF(backward31n) { return backward31(A,dim); }
BZ_DECLARE_DIFF(backward41n) { return backward41(A,dim); } BZ_DECLARE_DIFF(backward41n) { return backward41(A,dim); }
skipping to change at line 367 skipping to change at line 371
BZ_DECLARE_MULTIDIFF(backward11n) { return backward11(A,comp,dim); } BZ_DECLARE_MULTIDIFF(backward11n) { return backward11(A,comp,dim); }
BZ_DECLARE_MULTIDIFF(backward21n) { return backward21(A,comp,dim); } BZ_DECLARE_MULTIDIFF(backward21n) { return backward21(A,comp,dim); }
BZ_DECLARE_MULTIDIFF(backward31n) { return backward31(A,comp,dim); } BZ_DECLARE_MULTIDIFF(backward31n) { return backward31(A,comp,dim); }
BZ_DECLARE_MULTIDIFF(backward41n) { return backward41(A,comp,dim); } BZ_DECLARE_MULTIDIFF(backward41n) { return backward41(A,comp,dim); }
/************************************************************************** ** /************************************************************************** **
* Backward differences with accuracy O(h^2) * Backward differences with accuracy O(h^2)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(backward12) { BZ_DECLARE_DIFF(backward12) {
return 3.*A -4.*A.shift(-1,dim) + A.shift(-2,dim); return 3.0 * (*A) - 4.0 * A.shift(-1,dim) + A.shift(-2,dim);
} }
BZ_DECLARE_DIFF(backward22) { BZ_DECLARE_DIFF(backward22) {
return 2.*A -5.*A.shift(-1,dim) + 4.*A.shift(-2,dim) -A.shift(-3,dim); return 2.0 * (*A) - 5.0 * A.shift(-1,dim) + 4.0 * A.shift(-2,dim)
- A.shift(-3,dim);
} }
BZ_DECLARE_DIFF(backward32) { BZ_DECLARE_DIFF(backward32) {
return 5.*A - 18.*A.shift(-1,dim) + 24.*A.shift(-2,dim) -14.*A.shift(-3,d return 5.0 * (*A) - 18.0 * A.shift(-1,dim) + 24.0 * A.shift(-2,dim)
im) - 14.0 * A.shift(-3,dim) + 3.0 * A.shift(-4,dim);
+ 3.*A.shift(-4,dim);
} }
BZ_DECLARE_DIFF(backward42) { BZ_DECLARE_DIFF(backward42) {
return 3.*A -14.*A.shift(-1,dim) + 26.*A.shift(-2,dim) -24.*A.shift(-3,di return 3.0 * (*A) - 14.0 * A.shift(-1,dim) + 26.0 * A.shift(-2,dim)
m) - 24.0 * A.shift(-3,dim) + 11.0 * A.shift(-4,dim) - 2.0 * A.shift(-5,di
+ 11.*A.shift(-4,dim) -2.*A.shift(-5,dim); m);
} }
/************************************************************************** ** /************************************************************************** **
* Backward differences with accuracy O(h^2) (multicomponent versions) * Backward differences with accuracy O(h^2) (multicomponent versions)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_MULTIDIFF(backward12) { BZ_DECLARE_MULTIDIFF(backward12) {
return 3.*(*A)[comp] -4.*A.shift(-1,dim)[comp] + A.shift(-2,dim)[comp]; return 3.0 * (*A)[comp] - 4.0 * A.shift(-1,dim)[comp]
+ A.shift(-2,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(backward22) { BZ_DECLARE_MULTIDIFF(backward22) {
return 2.*(*A)[comp] -5.*A.shift(-1,dim)[comp] + 4.*A.shift(-2,dim)[comp] return 2.0 * (*A)[comp] - 5.0 * A.shift(-1,dim)[comp]
-A.shift(-3,dim)[comp]; + 4.0 * A.shift(-2,dim)[comp] - A.shift(-3,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(backward32) { BZ_DECLARE_MULTIDIFF(backward32) {
return 5.*(*A)[comp] - 18.*A.shift(-1,dim)[comp] + 24.*A.shift(-2,dim)[co return 5.0 * (*A)[comp] - 18.0 * A.shift(-1,dim)[comp]
mp] + 24.0 * A.shift(-2,dim)[comp] - 14.0 * A.shift(-3,dim)[comp]
-14.*A.shift(-3,dim)[comp] + 3.*A.shift(-4,dim)[comp]; + 3.0 * A.shift(-4,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(backward42) { BZ_DECLARE_MULTIDIFF(backward42) {
return 3.*(*A)[comp] -14.*A.shift(-1,dim)[comp] + 26.*A.shift(-2,dim)[com return 3.0 * (*A)[comp] - 14.0 * A.shift(-1,dim)[comp]
p] + 26.0 * A.shift(-2,dim)[comp] - 24.0 * A.shift(-3,dim)[comp]
-24.*A.shift(-3,dim)[comp] + 11.*A.shift(-4,dim)[comp] + 11.0 * A.shift(-4,dim)[comp] - 2.0 * A.shift(-5,dim)[comp];
-2.*A.shift(-5,dim)[comp];
} }
/************************************************************************** ** /************************************************************************** **
* Backward differences with accuracy O(h^2) (normalized) * Backward differences with accuracy O(h^2) (normalized)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(backward12n) { return backward12(A,dim) * recip_2; } BZ_DECLARE_DIFF(backward12n) { return backward12(A,dim) * recip_2; }
BZ_DECLARE_DIFF(backward22n) { return backward22(A,dim); } BZ_DECLARE_DIFF(backward22n) { return backward22(A,dim); }
BZ_DECLARE_DIFF(backward32n) { return backward32(A,dim) * recip_2; } BZ_DECLARE_DIFF(backward32n) { return backward32(A,dim) * recip_2; }
BZ_DECLARE_DIFF(backward42n) { return backward42(A,dim); } BZ_DECLARE_DIFF(backward42n) { return backward42(A,dim); }
skipping to change at line 431 skipping to change at line 438
BZ_DECLARE_MULTIDIFF(backward12n) { return backward12(A,comp,dim) * recip_2 ; } BZ_DECLARE_MULTIDIFF(backward12n) { return backward12(A,comp,dim) * recip_2 ; }
BZ_DECLARE_MULTIDIFF(backward22n) { return backward22(A,comp,dim); } BZ_DECLARE_MULTIDIFF(backward22n) { return backward22(A,comp,dim); }
BZ_DECLARE_MULTIDIFF(backward32n) { return backward32(A,comp,dim) * recip_2 ; } BZ_DECLARE_MULTIDIFF(backward32n) { return backward32(A,comp,dim) * recip_2 ; }
BZ_DECLARE_MULTIDIFF(backward42n) { return backward42(A,comp,dim); } BZ_DECLARE_MULTIDIFF(backward42n) { return backward42(A,comp,dim); }
/************************************************************************** ** /************************************************************************** **
* Forward differences with accuracy O(h) * Forward differences with accuracy O(h)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(forward11) { BZ_DECLARE_DIFF(forward11) {
return A.shift(1,dim) - A; return -(*A) + A.shift(1,dim);
} }
BZ_DECLARE_DIFF(forward21) { BZ_DECLARE_DIFF(forward21) {
return A - 2.*A.shift(1,dim) + A.shift(2,dim); return (*A) - 2.0 * A.shift(1,dim) + A.shift(2,dim);
} }
BZ_DECLARE_DIFF(forward31) { BZ_DECLARE_DIFF(forward31) {
return -A + 3.*A.shift(1,dim) -3.*A.shift(2,dim) + A.shift(3,dim); return -(*A) + 3.0 * A.shift(1,dim) - 3.0 * A.shift(2,dim) + A.shift(3,di m);
} }
BZ_DECLARE_DIFF(forward41) { BZ_DECLARE_DIFF(forward41) {
return A -4.*A.shift(1,dim) + 6.*A.shift(2,dim) -4.*A.shift(3,dim) return (*A) - 4.0 * A.shift(1,dim) + 6.0 * A.shift(2,dim)
+ A.shift(4,dim); - 4.0 * A.shift(3,dim) + A.shift(4,dim);
} }
/************************************************************************** ** /************************************************************************** **
* Forward differences with accuracy O(h) (multicomponent versions) * Forward differences with accuracy O(h) (multicomponent versions)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_MULTIDIFF(forward11) { BZ_DECLARE_MULTIDIFF(forward11) {
return -(*A)[comp]+A.shift(1,dim)[comp]; return -(*A)[comp] + A.shift(1,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(forward21) { BZ_DECLARE_MULTIDIFF(forward21) {
return (*A)[comp] - 2.*A.shift(1,dim)[comp] + A.shift(2,dim)[comp]; return (*A)[comp] - 2.0 * A.shift(1,dim)[comp] + A.shift(2,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(forward31) { BZ_DECLARE_MULTIDIFF(forward31) {
return -(*A)[comp] + 3.*A.shift(1,dim)[comp] -3.*A.shift(2,dim)[comp] return -(*A)[comp] + 3.0 * A.shift(1,dim)[comp] - 3.0 * A.shift(2,dim)[co mp]
+ A.shift(3,dim)[comp]; + A.shift(3,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(forward41) { BZ_DECLARE_MULTIDIFF(forward41) {
return (*A)[comp] -4.*A.shift(1,dim)[comp] + 6.*A.shift(2,dim)[comp] return (*A)[comp] - 4.0 * A.shift(1,dim)[comp] + 6.0 * A.shift(2,dim)[com
-4.*A.shift(3,dim)[comp] + A.shift(4,dim)[comp]; p]
- 4.0 * A.shift(3,dim)[comp] + A.shift(4,dim)[comp];
} }
/************************************************************************** ** /************************************************************************** **
* Forward differences with accuracy O(h) (normalized) * Forward differences with accuracy O(h) (normalized)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(forward11n) { return forward11(A,dim); } BZ_DECLARE_DIFF(forward11n) { return forward11(A,dim); }
BZ_DECLARE_DIFF(forward21n) { return forward21(A,dim); } BZ_DECLARE_DIFF(forward21n) { return forward21(A,dim); }
BZ_DECLARE_DIFF(forward31n) { return forward31(A,dim); } BZ_DECLARE_DIFF(forward31n) { return forward31(A,dim); }
BZ_DECLARE_DIFF(forward41n) { return forward41(A,dim); } BZ_DECLARE_DIFF(forward41n) { return forward41(A,dim); }
skipping to change at line 492 skipping to change at line 499
BZ_DECLARE_MULTIDIFF(forward11n) { return forward11(A,comp,dim); } BZ_DECLARE_MULTIDIFF(forward11n) { return forward11(A,comp,dim); }
BZ_DECLARE_MULTIDIFF(forward21n) { return forward21(A,comp,dim); } BZ_DECLARE_MULTIDIFF(forward21n) { return forward21(A,comp,dim); }
BZ_DECLARE_MULTIDIFF(forward31n) { return forward31(A,comp,dim); } BZ_DECLARE_MULTIDIFF(forward31n) { return forward31(A,comp,dim); }
BZ_DECLARE_MULTIDIFF(forward41n) { return forward41(A,comp,dim); } BZ_DECLARE_MULTIDIFF(forward41n) { return forward41(A,comp,dim); }
/************************************************************************** ** /************************************************************************** **
* Forward differences with accuracy O(h^2) * Forward differences with accuracy O(h^2)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(forward12) { BZ_DECLARE_DIFF(forward12) {
return -3.*A + 4.*A.shift(1,dim) - A.shift(2,dim); return -3.0 * (*A) + 4.0 * A.shift(1,dim) - A.shift(2,dim);
} }
BZ_DECLARE_DIFF(forward22) { BZ_DECLARE_DIFF(forward22) {
return 2.*A -5.*A.shift(1,dim) + 4.*A.shift(2,dim) -A.shift(3,dim); return 2.0 * (*A) - 5.0 * A.shift(1,dim) + 4.0 * A.shift(2,dim)
- A.shift(3,dim);
} }
BZ_DECLARE_DIFF(forward32) { BZ_DECLARE_DIFF(forward32) {
return -5.*A + 18.*A.shift(1,dim) -24.*A.shift(2,dim) return -5.0 * (*A) + 18.0 * A.shift(1,dim) - 24.0 * A.shift(2,dim)
+ 14.*A.shift(3,dim) -3.*A.shift(4,dim); + 14.0 * A.shift(3,dim) - 3.0 * A.shift(4,dim);
} }
BZ_DECLARE_DIFF(forward42) { BZ_DECLARE_DIFF(forward42) {
return 3.*A -14.*A.shift(1,dim) + 26.*A.shift(2,dim) -24.*A.shift(3,dim) return 3.0 * (*A) - 14.0 * A.shift(1,dim) + 26.0 * A.shift(2,dim)
+11.*A.shift(4,dim) -2.*A.shift(5,dim); - 24.0 * A.shift(3,dim) + 11.0 * A.shift(4,dim) - 2.0 * A.shift(5,dim);
} }
/************************************************************************** ** /************************************************************************** **
* Forward differences with accuracy O(h^2) (multicomponent versions) * Forward differences with accuracy O(h^2) (multicomponent versions)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_MULTIDIFF(forward12) { BZ_DECLARE_MULTIDIFF(forward12) {
return -3.*(*A)[comp] + 4.*A.shift(1,dim)[comp] - A.shift(2,dim)[comp]; return -3.0 * (*A)[comp] + 4.0 * A.shift(1,dim)[comp] - A.shift(2,dim)[co mp];
} }
BZ_DECLARE_MULTIDIFF(forward22) { BZ_DECLARE_MULTIDIFF(forward22) {
return 2.*(*A)[comp] -5.*A.shift(1,dim)[comp] + 4.*A.shift(2,dim)[comp] return 2.0 * (*A)[comp] - 5.0 * A.shift(1,dim)[comp]
-A.shift(3,dim)[comp]; + 4.0 * A.shift(2,dim)[comp] - A.shift(3,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(forward32) { BZ_DECLARE_MULTIDIFF(forward32) {
return -5.*(*A)[comp] + 18.*A.shift(1,dim)[comp] -24.*A.shift(2,dim)[comp return -5.0 * (*A)[comp] + 18.0 * A.shift(1,dim)[comp]
] - 24.0 * A.shift(2,dim)[comp] + 14.0 * A.shift(3,dim)[comp]
+ 14.*A.shift(3,dim)[comp] -3.*A.shift(4,dim)[comp]; - 3.0 * A.shift(4,dim)[comp];
} }
BZ_DECLARE_MULTIDIFF(forward42) { BZ_DECLARE_MULTIDIFF(forward42) {
return 3.*(*A)[comp] -14.*A.shift(1,dim)[comp] + 26.*A.shift(2,dim)[comp] return 3.0 * (*A)[comp] - 14.0 * A.shift(1,dim)[comp]
-24.*A.shift(3,dim)[comp] +11.*A.shift(4,dim)[comp] + 26.0 * A.shift(2,dim)[comp] - 24.0 * A.shift(3,dim)[comp]
+ 11.*A.shift(5,dim)[comp]; + 11.0 * A.shift(4,dim)[comp] - 2.0 * A.shift(5,dim)[comp];
} }
/************************************************************************** ** /************************************************************************** **
* Forward differences with accuracy O(h^2) (normalized) * Forward differences with accuracy O(h^2) (normalized)
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_DIFF(forward12n) { return forward12(A,dim) * recip_2; } BZ_DECLARE_DIFF(forward12n) { return forward12(A,dim) * recip_2; }
BZ_DECLARE_DIFF(forward22n) { return forward22(A,dim); } BZ_DECLARE_DIFF(forward22n) { return forward22(A,dim); }
BZ_DECLARE_DIFF(forward32n) { return forward32(A,dim) * recip_2; } BZ_DECLARE_DIFF(forward32n) { return forward32(A,dim) * recip_2; }
BZ_DECLARE_DIFF(forward42n) { return forward42(A,dim); } BZ_DECLARE_DIFF(forward42n) { return forward42(A,dim); }
skipping to change at line 555 skipping to change at line 564
BZ_DECLARE_MULTIDIFF(forward12n) { return forward12(A,comp,dim) * recip_2; } BZ_DECLARE_MULTIDIFF(forward12n) { return forward12(A,comp,dim) * recip_2; }
BZ_DECLARE_MULTIDIFF(forward22n) { return forward22(A,comp,dim); } BZ_DECLARE_MULTIDIFF(forward22n) { return forward22(A,comp,dim); }
BZ_DECLARE_MULTIDIFF(forward32n) { return forward32(A,comp,dim) * recip_2; } BZ_DECLARE_MULTIDIFF(forward32n) { return forward32(A,comp,dim) * recip_2; }
BZ_DECLARE_MULTIDIFF(forward42n) { return forward42(A,comp,dim); } BZ_DECLARE_MULTIDIFF(forward42n) { return forward42(A,comp,dim); }
/************************************************************************** ** /************************************************************************** **
* Gradient operators * Gradient operators
************************************************************************** **/ ************************************************************************** **/
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,2> grad2D(T& A) { inline TinyVector<_bz_typename T::T_numtype,2> grad2D(T& A) {
return TinyVector<_bz_typename T::T_numtype,2>( return TinyVector<_bz_typename T::T_numtype,2>(
central12(A,firstDim), central12(A,firstDim),
central12(A,secondDim)); central12(A,secondDim));
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,2> grad2D4(T& A) { inline TinyVector<_bz_typename T::T_numtype,2> grad2D4(T& A) {
return TinyVector<_bz_typename T::T_numtype,2>( return TinyVector<_bz_typename T::T_numtype,2>(
central14(A,firstDim), central14(A,firstDim),
central14(A,secondDim)); central14(A,secondDim));
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> grad3D(T& A) { inline TinyVector<_bz_typename T::T_numtype,3> grad3D(T& A) {
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
central12(A,firstDim), central12(A,firstDim),
central12(A,secondDim), central12(A,secondDim),
central12(A,thirdDim)); central12(A,thirdDim));
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> grad3D4(T& A) { inline TinyVector<_bz_typename T::T_numtype,3> grad3D4(T& A) {
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
central14(A,firstDim), central14(A,firstDim),
central14(A,secondDim), central14(A,secondDim),
central14(A,thirdDim)); central14(A,thirdDim));
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,2> grad2Dn(T& A) { inline TinyVector<_bz_typename T::T_numtype,2> grad2Dn(T& A) {
return TinyVector<_bz_typename T::T_numtype,2>( return TinyVector<_bz_typename T::T_numtype,2>(
central12n(A,firstDim), central12n(A,firstDim),
central12n(A,secondDim)); central12n(A,secondDim));
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,2> grad2D4n(T& A) { inline TinyVector<_bz_typename T::T_numtype,2> grad2D4n(T& A) {
return TinyVector<_bz_typename T::T_numtype,2>( return TinyVector<_bz_typename T::T_numtype,2>(
central14n(A,firstDim), central14n(A,firstDim),
central14n(A,secondDim)); central14n(A,secondDim));
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> grad3Dn(T& A) { inline TinyVector<_bz_typename T::T_numtype,3> grad3Dn(T& A) {
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
central12n(A,firstDim), central12n(A,firstDim),
central12n(A,secondDim), central12n(A,secondDim),
central12n(A,thirdDim)); central12n(A,thirdDim));
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> grad3D4n(T& A) { inline TinyVector<_bz_typename T::T_numtype,3> grad3D4n(T& A) {
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
central14n(A,firstDim), central14n(A,firstDim),
central14n(A,secondDim), central14n(A,secondDim),
central14n(A,thirdDim)); central14n(A,thirdDim));
} }
/************************************************************************** ** /************************************************************************** **
* Grad-squared operators * Grad-squared operators
************************************************************************** **/ ************************************************************************** **/
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,2> gradSqr2D(T& A) { inline TinyVector<_bz_typename T::T_numtype,2> gradSqr2D(T& A) {
return TinyVector<_bz_typename T::T_numtype,2>( return TinyVector<_bz_typename T::T_numtype,2>(
central22(A,firstDim), central22(A,firstDim),
central22(A,secondDim)); central22(A,secondDim));
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,2> gradSqr2D4(T& A) { inline TinyVector<_bz_typename T::T_numtype,2> gradSqr2D4(T& A) {
return TinyVector<_bz_typename T::T_numtype,2>( return TinyVector<_bz_typename T::T_numtype,2>(
central24(A,firstDim), central24(A,firstDim),
central24(A,secondDim)); central24(A,secondDim));
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> gradSqr3D(T& A) { inline TinyVector<_bz_typename T::T_numtype,3> gradSqr3D(T& A) {
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
central22(A,firstDim), central22(A,firstDim),
central22(A,secondDim), central22(A,secondDim),
central22(A,thirdDim)); central22(A,thirdDim));
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> gradSqr3D4(T& A) { inline TinyVector<_bz_typename T::T_numtype,3> gradSqr3D4(T& A) {
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
central24(A,firstDim), central24(A,firstDim),
central24(A,secondDim), central24(A,secondDim),
central24(A,thirdDim)); central24(A,thirdDim));
} }
/************************************************************************** ** /************************************************************************** **
* Grad-squared operators (normalized) * Grad-squared operators (normalized)
************************************************************************** **/ ************************************************************************** **/
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,2> gradSqr2Dn(T& A) { inline TinyVector<_bz_typename T::T_numtype,2> gradSqr2Dn(T& A) {
return gradSqr2D(A); return gradSqr2D(A);
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,2> gradSqr2D4n(T& A) { inline TinyVector<_bz_typename T::T_numtype,2> gradSqr2D4n(T& A) {
return TinyVector<_bz_typename T::T_numtype,2>( return TinyVector<_bz_typename T::T_numtype,2>(
central24(A,firstDim) * recip_12, central24(A,firstDim) * recip_12,
central24(A,secondDim) * recip_12); central24(A,secondDim) * recip_12);
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> gradSqr3Dn(T& A) { inline TinyVector<_bz_typename T::T_numtype,3> gradSqr3Dn(T& A) {
return gradSqr3D(A); return gradSqr3D(A);
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> gradSqr3D4n(T& A) { inline TinyVector<_bz_typename T::T_numtype,3> gradSqr3D4n(T& A) {
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
central24(A,firstDim) * recip_12, central24(A,firstDim) * recip_12,
central24(A,secondDim) * recip_12, central24(A,secondDim) * recip_12,
central24(A,thirdDim) * recip_12); central24(A,thirdDim) * recip_12);
} }
/************************************************************************** ** /************************************************************************** **
* Gradient operators on a vector field * Gradient operators on a vector field
************************************************************************** **/ ************************************************************************** **/
template<class T> template<typename T>
inline TinyMatrix<_bz_typename multicomponent_traits<_bz_typename inline TinyMatrix<_bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element, 3, 3> T::T_numtype>::T_element, 3, 3>
Jacobian3D(T& A) Jacobian3D(T& A)
{ {
const int x=0, y=1, z=2; const int x=0, y=1, z=2;
const int u=0, v=1, w=2; const int u=0, v=1, w=2;
TinyMatrix<_bz_typename multicomponent_traits<_bz_typename TinyMatrix<_bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element, 3, 3> grad; T::T_numtype>::T_element, 3, 3> grad;
skipping to change at line 706 skipping to change at line 715
grad(v,x) = central12(A,v,x); grad(v,x) = central12(A,v,x);
grad(v,y) = central12(A,v,y); grad(v,y) = central12(A,v,y);
grad(v,z) = central12(A,v,z); grad(v,z) = central12(A,v,z);
grad(w,x) = central12(A,w,x); grad(w,x) = central12(A,w,x);
grad(w,y) = central12(A,w,y); grad(w,y) = central12(A,w,y);
grad(w,z) = central12(A,w,z); grad(w,z) = central12(A,w,z);
return grad; return grad;
} }
template<class T> template<typename T>
inline TinyMatrix<_bz_typename multicomponent_traits<_bz_typename inline TinyMatrix<_bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element, 3, 3> T::T_numtype>::T_element, 3, 3>
Jacobian3Dn(T& A) Jacobian3Dn(T& A)
{ {
const int x=0, y=1, z=2; const int x=0, y=1, z=2;
const int u=0, v=1, w=2; const int u=0, v=1, w=2;
TinyMatrix<_bz_typename multicomponent_traits<_bz_typename TinyMatrix<_bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element, 3, 3> grad; T::T_numtype>::T_element, 3, 3> grad;
skipping to change at line 730 skipping to change at line 739
grad(v,x) = central12n(A,v,x); grad(v,x) = central12n(A,v,x);
grad(v,y) = central12n(A,v,y); grad(v,y) = central12n(A,v,y);
grad(v,z) = central12n(A,v,z); grad(v,z) = central12n(A,v,z);
grad(w,x) = central12n(A,w,x); grad(w,x) = central12n(A,w,x);
grad(w,y) = central12n(A,w,y); grad(w,y) = central12n(A,w,y);
grad(w,z) = central12n(A,w,z); grad(w,z) = central12n(A,w,z);
return grad; return grad;
} }
template<class T> template<typename T>
inline TinyMatrix<_bz_typename multicomponent_traits<_bz_typename inline TinyMatrix<_bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element, 3, 3> T::T_numtype>::T_element, 3, 3>
Jacobian3D4(T& A) Jacobian3D4(T& A)
{ {
const int x=0, y=1, z=2; const int x=0, y=1, z=2;
const int u=0, v=1, w=2; const int u=0, v=1, w=2;
TinyMatrix<_bz_typename multicomponent_traits<_bz_typename TinyMatrix<_bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element, 3, 3> grad; T::T_numtype>::T_element, 3, 3> grad;
skipping to change at line 754 skipping to change at line 763
grad(v,x) = central14(A,v,x); grad(v,x) = central14(A,v,x);
grad(v,y) = central14(A,v,y); grad(v,y) = central14(A,v,y);
grad(v,z) = central14(A,v,z); grad(v,z) = central14(A,v,z);
grad(w,x) = central14(A,w,x); grad(w,x) = central14(A,w,x);
grad(w,y) = central14(A,w,y); grad(w,y) = central14(A,w,y);
grad(w,z) = central14(A,w,z); grad(w,z) = central14(A,w,z);
return grad; return grad;
} }
template<class T> template<typename T>
inline TinyMatrix<_bz_typename multicomponent_traits<_bz_typename inline TinyMatrix<_bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element, 3, 3> T::T_numtype>::T_element, 3, 3>
Jacobian3D4n(T& A) Jacobian3D4n(T& A)
{ {
const int x=0, y=1, z=2; const int x=0, y=1, z=2;
const int u=0, v=1, w=2; const int u=0, v=1, w=2;
TinyMatrix<_bz_typename multicomponent_traits<_bz_typename TinyMatrix<_bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element, 3, 3> grad; T::T_numtype>::T_element, 3, 3> grad;
skipping to change at line 784 skipping to change at line 793
return grad; return grad;
} }
/************************************************************************** ** /************************************************************************** **
* Curl operators * Curl operators
************************************************************************** **/ ************************************************************************** **/
// O(h^2) curl, using central difference // O(h^2) curl, using central difference
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> inline TinyVector<_bz_typename T::T_numtype,3>
curl(T& vx, T& vy, T& vz) { curl(T& vx, T& vy, T& vz) {
const int x = firstDim, y = secondDim, z = thirdDim; const int x = firstDim, y = secondDim, z = thirdDim;
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
central12(vz,y)-central12(vy,z), central12(vz,y)-central12(vy,z),
central12(vx,z)-central12(vz,x), central12(vx,z)-central12(vz,x),
central12(vy,x)-central12(vx,y)); central12(vy,x)-central12(vx,y));
} }
// Normalized O(h^2) curl, using central difference // Normalized O(h^2) curl, using central difference
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> inline TinyVector<_bz_typename T::T_numtype,3>
curln(T& vx, T& vy, T& vz) { curln(T& vx, T& vy, T& vz) {
const int x = firstDim, y = secondDim, z = thirdDim; const int x = firstDim, y = secondDim, z = thirdDim;
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
(central12(vz,y)-central12(vy,z)) * recip_2, (central12(vz,y)-central12(vy,z)) * recip_2,
(central12(vx,z)-central12(vz,x)) * recip_2, (central12(vx,z)-central12(vz,x)) * recip_2,
(central12(vy,x)-central12(vx,y)) * recip_2); (central12(vy,x)-central12(vx,y)) * recip_2);
} }
// Multicomponent curl // Multicomponent curl
template<class T> template<typename T>
inline _bz_typename T::T_numtype curl(T& A) { inline _bz_typename T::T_numtype curl(T& A) {
const int x = firstDim, y = secondDim, z = thirdDim; const int x = firstDim, y = secondDim, z = thirdDim;
return T::T_numtype( return _bz_typename T::T_numtype(
central12(A,z,y)-central12(A,y,z), central12(A,z,y)-central12(A,y,z),
central12(A,x,z)-central12(A,z,x), central12(A,x,z)-central12(A,z,x),
central12(A,y,x)-central12(A,x,y)); central12(A,y,x)-central12(A,x,y));
} }
// Normalized multicomponent curl // Normalized multicomponent curl
template<class T> template<typename T>
inline _bz_typename T::T_numtype curln(T& A) { inline _bz_typename T::T_numtype curln(T& A) {
const int x = firstDim, y = secondDim, z = thirdDim; const int x = firstDim, y = secondDim, z = thirdDim;
return T::T_numtype( return _bz_typename T::T_numtype(
(central12(A,z,y)-central12(A,y,z)) * recip_2, (central12(A,z,y)-central12(A,y,z)) * recip_2,
(central12(A,x,z)-central12(A,z,x)) * recip_2, (central12(A,x,z)-central12(A,z,x)) * recip_2,
(central12(A,y,x)-central12(A,x,y)) * recip_2); (central12(A,y,x)-central12(A,x,y)) * recip_2);
} }
// O(h^4) curl, using 4th order central difference // O(h^4) curl, using 4th order central difference
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> inline TinyVector<_bz_typename T::T_numtype,3>
curl4(T& vx, T& vy, T& vz) { curl4(T& vx, T& vy, T& vz) {
const int x = firstDim, y = secondDim, z = thirdDim; const int x = firstDim, y = secondDim, z = thirdDim;
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
central14(vz,y)-central14(vy,z), central14(vz,y)-central14(vy,z),
central14(vx,z)-central14(vz,x), central14(vx,z)-central14(vz,x),
central14(vy,x)-central14(vx,y)); central14(vy,x)-central14(vx,y));
} }
// O(h^4) curl, using 4th order central difference (multicomponent version) // O(h^4) curl, using 4th order central difference (multicomponent version)
template<class T> template<typename T>
inline _bz_typename T::T_numtype inline _bz_typename T::T_numtype
curl4(T& A) { curl4(T& A) {
const int x = firstDim, y = secondDim, z = thirdDim; const int x = firstDim, y = secondDim, z = thirdDim;
return T::T_numtype( return _bz_typename T::T_numtype(
central14(A,z,y)-central14(A,y,z), central14(A,z,y)-central14(A,y,z),
central14(A,x,z)-central14(A,z,x), central14(A,x,z)-central14(A,z,x),
central14(A,y,x)-central14(A,x,y)); central14(A,y,x)-central14(A,x,y));
} }
// Normalized O(h^4) curl, using 4th order central difference // Normalized O(h^4) curl, using 4th order central difference
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> inline TinyVector<_bz_typename T::T_numtype,3>
curl4n(T& vx, T& vy, T& vz) { curl4n(T& vx, T& vy, T& vz) {
const int x = firstDim, y = secondDim, z = thirdDim; const int x = firstDim, y = secondDim, z = thirdDim;
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
(central14(vz,y)-central14(vy,z)) * recip_2, (central14(vz,y)-central14(vy,z)) * recip_2,
(central14(vx,z)-central14(vz,x)) * recip_2, (central14(vx,z)-central14(vz,x)) * recip_2,
(central14(vy,x)-central14(vx,y)) * recip_2); (central14(vy,x)-central14(vx,y)) * recip_2);
} }
// O(h^4) curl, using 4th order central difference (normalized multicompone nt) // O(h^4) curl, using 4th order central difference (normalized multicompone nt)
template<class T> template<typename T>
inline _bz_typename T::T_numtype inline _bz_typename T::T_numtype
curl4n(T& A) { curl4n(T& A) {
const int x = firstDim, y = secondDim, z = thirdDim; const int x = firstDim, y = secondDim, z = thirdDim;
return T::T_numtype( return _bz_typename T::T_numtype(
(central14(A,z,y)-central14(A,y,z)) * recip_2, (central14(A,z,y)-central14(A,y,z)) * recip_2,
(central14(A,x,z)-central14(A,z,x)) * recip_2, (central14(A,x,z)-central14(A,z,x)) * recip_2,
(central14(A,y,x)-central14(A,x,y)) * recip_2); (central14(A,y,x)-central14(A,x,y)) * recip_2);
} }
// Two-dimensional curl // Two-dimensional curl
template<class T> template<typename T>
inline _bz_typename T::T_numtype inline _bz_typename T::T_numtype
curl(T& vx, T& vy) { curl(T& vx, T& vy) {
const int x = firstDim, y = secondDim; const int x = firstDim, y = secondDim;
return central12(vy,x)-central12(vx,y); return central12(vy,x)-central12(vx,y);
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype inline _bz_typename T::T_numtype
curln(T& vx, T& vy) { curln(T& vx, T& vy) {
const int x = firstDim, y = secondDim; const int x = firstDim, y = secondDim;
return (central12(vy,x)-central12(vx,y)) * recip_2; return (central12(vy,x)-central12(vx,y)) * recip_2;
} }
// Multicomponent curl // Multicomponent curl
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype curl2D(T& A) { inline _bz_typename T::T_numtype::T_numtype curl2D(T& A) {
const int x = firstDim, y = secondDim; const int x = firstDim, y = secondDim;
return central12(A,y,x)-central12(A,x,y); return central12(A,y,x)-central12(A,x,y);
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype curl2Dn(T& A) { inline _bz_typename T::T_numtype::T_numtype curl2Dn(T& A) {
const int x = firstDim, y = secondDim; const int x = firstDim, y = secondDim;
return (central12(A,y,x)-central12(A,x,y)) * recip_2; return (central12(A,y,x)-central12(A,x,y)) * recip_2;
} }
// 4th order versions // 4th order versions
template<class T> template<typename T>
inline _bz_typename T::T_numtype inline _bz_typename T::T_numtype
curl4(T& vx, T& vy) { curl4(T& vx, T& vy) {
const int x = firstDim, y = secondDim; const int x = firstDim, y = secondDim;
return central14(vy,x)-central14(vx,y); return central14(vy,x)-central14(vx,y);
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype inline _bz_typename T::T_numtype
curl4n(T& vx, T& vy) { curl4n(T& vx, T& vy) {
const int x = firstDim, y = secondDim; const int x = firstDim, y = secondDim;
return (central14(vy,x)-central14(vx,y)) * recip_12; return (central14(vy,x)-central14(vx,y)) * recip_12;
} }
// Multicomponent curl // Multicomponent curl
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype curl2D4(T& A) { inline _bz_typename T::T_numtype::T_numtype curl2D4(T& A) {
const int x = firstDim, y = secondDim; const int x = firstDim, y = secondDim;
return central14(A,y,x)-central14(A,x,y); return central14(A,y,x)-central14(A,x,y);
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype curl2D4n(T& A) { inline _bz_typename T::T_numtype::T_numtype curl2D4n(T& A) {
const int x = firstDim, y = secondDim; const int x = firstDim, y = secondDim;
return (central14(A,y,x)-central14(A,x,y)) * recip_12; return (central14(A,y,x)-central14(A,x,y)) * recip_12;
} }
/************************************************************************** ** /************************************************************************** **
* Divergence * Divergence
************************************************************************** **/ ************************************************************************** **/
BZ_DECLARE_STENCIL_OPERATOR2(div,vx,vy) BZ_DECLARE_STENCIL_OPERATOR2(div,vx,vy)
skipping to change at line 981 skipping to change at line 990
BZ_DECLARE_STENCIL_OPERATOR3(div4,vx,vy,vz) BZ_DECLARE_STENCIL_OPERATOR3(div4,vx,vy,vz)
return central14(vx,firstDim) + central14(vy,secondDim) return central14(vx,firstDim) + central14(vy,secondDim)
+ central14(vz,thirdDim); + central14(vz,thirdDim);
BZ_END_STENCIL_OPERATOR BZ_END_STENCIL_OPERATOR
BZ_DECLARE_STENCIL_OPERATOR3(div4n,vx,vy,vz) BZ_DECLARE_STENCIL_OPERATOR3(div4n,vx,vy,vz)
return (central14(vx,firstDim) + central14(vy,secondDim) return (central14(vx,firstDim) + central14(vy,secondDim)
+ central14(vz,thirdDim)) * recip_12; + central14(vz,thirdDim)) * recip_12;
BZ_END_STENCIL_OPERATOR BZ_END_STENCIL_OPERATOR
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype inline _bz_typename T::T_numtype::T_numtype
div2D(T& A) { div2D(T& A)
const int x = firstDim, y = secondDim; {
return central12(A,x,x) + central12(A,y,y); const int x = firstDim, y = secondDim;
return central12(A,x,x) + central12(A,y,y);
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype inline _bz_typename T::T_numtype::T_numtype
div2D4(T& A) { div2D4(T& A)
const int x = firstDim, y = secondDim; {
return central14(A,x,x) + central14(A,y,y); const int x = firstDim, y = secondDim;
return central14(A,x,x) + central14(A,y,y);
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype inline _bz_typename T::T_numtype::T_numtype
div2Dn(T& A) { div2Dn(T& A)
const int x = firstDim, y = secondDim; {
return (central12(A,x,x) + central12(A,y,y)) * recip_2; const int x = firstDim, y = secondDim;
return (central12(A,x,x) + central12(A,y,y)) * recip_2;
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype inline _bz_typename T::T_numtype::T_numtype
div2D4n(T& A) { div2D4n(T& A)
const int x = firstDim, y = secondDim; {
return (central14(A,x,x) + central14(A,y,y)) * recip_12; const int x = firstDim, y = secondDim;
return (central14(A,x,x) + central14(A,y,y)) * recip_12;
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype inline _bz_typename T::T_numtype::T_numtype
div3D(T& A) { div3D(T& A)
const int x = firstDim, y = secondDim, z = thirdDim; {
return central12(A,x,x) + central12(A,y,y) + central12(A,z,z); const int x = firstDim, y = secondDim, z = thirdDim;
return central12(A,x,x) + central12(A,y,y) + central12(A,z,z);
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype inline _bz_typename T::T_numtype::T_numtype
div3D4(T& A) { div3D4(T& A)
const int x = firstDim, y = secondDim, z = thirdDim; {
return central14(A,x,x) + central14(A,y,y) + central14(A,z,z); const int x = firstDim, y = secondDim, z = thirdDim;
return central14(A,x,x) + central14(A,y,y) + central14(A,z,z);
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype inline _bz_typename T::T_numtype::T_numtype
div3Dn(T& A) { div3Dn(T& A)
const int x = firstDim, y = secondDim, z = thirdDim; {
return (central12(A,x,x) + central12(A,y,y) + central12(A,z,z)) const int x = firstDim, y = secondDim, z = thirdDim;
* recip_2; return (central12(A,x,x) + central12(A,y,y) + central12(A,z,z)) * recip
_2;
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype::T_numtype inline _bz_typename T::T_numtype::T_numtype
div3D4n(T& A) { div3D4n(T& A)
const int x = firstDim, y = secondDim, z = thirdDim; {
return (central14(A,x,x) + central14(A,y,y) + central14(A,z,z)) const int x = firstDim, y = secondDim, z = thirdDim;
* recip_12; return (central14(A,x,x) + central14(A,y,y) + central14(A,z,z)) * recip
_12;
} }
/************************************************************************** ** /************************************************************************** **
* Mixed Partial derivatives * Mixed Partial derivatives
************************************************************************** **/ ************************************************************************** **/
template<class T> template<typename T>
inline _bz_typename T::T_numtype inline _bz_typename T::T_numtype
mixed22(T& A, int x, int y) mixed22(T& A, int x, int y)
{ {
return A.shift(-1,x,-1,y) - A.shift(-1,x,1,y) return A.shift(-1,x,-1,y) - A.shift(-1,x,1,y)
-A.shift(1,x,-1,y) + A.shift(1,x,1,y); - A.shift(1,x,-1,y) + A.shift(1,x,1,y);
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype inline _bz_typename T::T_numtype
mixed22n(T& A, int x, int y) mixed22n(T& A, int x, int y)
{ {
return mixed22(A, x, y) * recip_4; return mixed22(A,x,y) * recip_4;
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype inline _bz_typename T::T_numtype
mixed24(T& A, int x, int y) mixed24(T& A, int x, int y)
{ {
return 64.*(A.shift(-1,x,-1,y) - A.shift(-1,x,1,y) return 64.0 * (A.shift(-1,x,-1,y) - A.shift(-1,x,1,y) -
-A.shift(1,x,-1,y) + A.shift(1,x,1,y)) A.shift(1,x,-1,y) + A.shift(1,x,1,y))
+ (A.shift(-2,x,+1,y) - A.shift(-1,x,2,y) + (A.shift(-2,x,1,y) - A.shift(-1,x,2,y) -
- A.shift(1,x,2,y)-A.shift(2,x,1,y) A.shift(1,x,2,y) - A.shift(2,x,1,y) +
+ A.shift(2,x,-1,y)+A.shift(1,x,-2,y) A.shift(2,x,-1,y) + A.shift(1,x,-2,y) -
- A.shift(-1,x,-2,y)+A.shift(-2,x,-1,y)) A.shift(-1,x,-2,y) + A.shift(-2,x,-1,y))
+ 8.*(A.shift(-1,x,1,y)+A.shift(-1,x,2,y) + 8.0 * (A.shift(-1,x,1,y) + A.shift(-1,x,2,y) -
-A.shift(2,x,-2,y) + A.shift(2,x,2,y)); A.shift(2,x,-2,y) + A.shift(2,x,2,y));
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype inline _bz_typename T::T_numtype
mixed24n(T& A, int x, int y) mixed24n(T& A, int x, int y)
{ {
return mixed24(A,x,y) * recip_144; return mixed24(A,x,y) * recip_144;
} }
/************************************************************************** ** /************************************************************************** **
* Smoothers * Smoothers
************************************************************************** **/ ************************************************************************** **/
// NEEDS_WORK-- put other stencil operators here: // NEEDS_WORK-- put other stencil operators here:
// Average5pt2D // Average5pt2D
// Average7pt3D // Average7pt3D
// etc. // etc.
/************************************************************************** ** /************************************************************************** **
* Stencil operators with geometry (experimental) * Stencil operators with geometry (experimental)
************************************************************************** **/ ************************************************************************** **/
template<class T> template<typename T>
inline _bz_typename multicomponent_traits<_bz_typename inline _bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element div3DVec4(T& A, T::T_numtype>::T_element div3DVec4(T& A,
const UniformCubicGeometry<3>& geom) const UniformCubicGeometry<3>& geom)
{ {
const int x = 0, y = 1, z = 2; const int x = 0, y = 1, z = 2;
return (central14(A, x, firstDim) + central14(A, y, secondDim) return (central14(A, x, firstDim) + central14(A, y, secondDim)
+ central14(A, z, thirdDim)) * recip_12 * geom.recipSpatialStep(); + central14(A, z, thirdDim)) * recip_12 * geom.recipSpatialStep();
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype Laplacian3D4(T& A, inline _bz_typename T::T_numtype Laplacian3D4(T& A,
const UniformCubicGeometry<3>& geom) const UniformCubicGeometry<3>& geom)
{ {
return Laplacian3D4n(A) * geom.recipSpatialStepPow2(); return Laplacian3D4n(A) * geom.recipSpatialStepPow2();
} }
template<class T> template<typename T>
inline _bz_typename T::T_numtype Laplacian3DVec4(T& A, inline _bz_typename T::T_numtype Laplacian3DVec4(T& A,
const UniformCubicGeometry<3>& geom) const UniformCubicGeometry<3>& geom)
{ {
typedef _bz_typename T::T_numtype vector3d; typedef _bz_typename T::T_numtype vector3d;
typedef _bz_typename multicomponent_traits<vector3d>::T_element typedef _bz_typename multicomponent_traits<vector3d>::T_element
T_element; T_element;
const int u = 0, v = 1, w = 2; const int u = 0, v = 1, w = 2;
const int x = 0, y = 1, z = 2; const int x = 0, y = 1, z = 2;
// central24 is a 5-point stencil // central24 is a 5-point stencil
skipping to change at line 1135 skipping to change at line 1150
T_element t2 = (central24(A,v,x) + central24(A,v,y) + central24(A,v,z)) T_element t2 = (central24(A,v,x) + central24(A,v,y) + central24(A,v,z))
* recip_12 * geom.recipSpatialStepPow2(); * recip_12 * geom.recipSpatialStepPow2();
T_element t3 = (central24(A,w,x) + central24(A,w,y) + central24(A,w,z)) T_element t3 = (central24(A,w,x) + central24(A,w,y) + central24(A,w,z))
* recip_12 * geom.recipSpatialStepPow2(); * recip_12 * geom.recipSpatialStepPow2();
return vector3d(t1,t2,t3); return vector3d(t1,t2,t3);
} }
template<class T> template<typename T>
inline TinyMatrix<_bz_typename multicomponent_traits<_bz_typename inline TinyMatrix<_bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element, 3, 3> T::T_numtype>::T_element, 3, 3>
grad3DVec4(T& A, const UniformCubicGeometry<3>& geom) grad3DVec4(T& A, const UniformCubicGeometry<3>& geom)
{ {
const int x=0, y=1, z=2; const int x=0, y=1, z=2;
const int u=0, v=1, w=2; const int u=0, v=1, w=2;
TinyMatrix<_bz_typename multicomponent_traits<_bz_typename TinyMatrix<_bz_typename multicomponent_traits<_bz_typename
T::T_numtype>::T_element, 3, 3> grad; T::T_numtype>::T_element, 3, 3> grad;
skipping to change at line 1160 skipping to change at line 1175
grad(v,x) = central14n(A,v,x) * geom.recipSpatialStep(); grad(v,x) = central14n(A,v,x) * geom.recipSpatialStep();
grad(v,y) = central14n(A,v,y) * geom.recipSpatialStep(); grad(v,y) = central14n(A,v,y) * geom.recipSpatialStep();
grad(v,z) = central14n(A,v,z) * geom.recipSpatialStep(); grad(v,z) = central14n(A,v,z) * geom.recipSpatialStep();
grad(w,x) = central14n(A,w,x) * geom.recipSpatialStep(); grad(w,x) = central14n(A,w,x) * geom.recipSpatialStep();
grad(w,y) = central14n(A,w,y) * geom.recipSpatialStep(); grad(w,y) = central14n(A,w,y) * geom.recipSpatialStep();
grad(w,z) = central14n(A,w,z) * geom.recipSpatialStep(); grad(w,z) = central14n(A,w,z) * geom.recipSpatialStep();
return grad; return grad;
} }
template<class T> template<typename T>
inline TinyVector<_bz_typename T::T_numtype,3> grad3D4(T& A, inline TinyVector<_bz_typename T::T_numtype,3> grad3D4(T& A,
const UniformCubicGeometry<3>& geom) { const UniformCubicGeometry<3>& geom) {
return TinyVector<_bz_typename T::T_numtype,3>( return TinyVector<_bz_typename T::T_numtype,3>(
central14(A,firstDim) * recip_12 * geom.recipSpatialStep(), central14(A,firstDim) * recip_12 * geom.recipSpatialStep(),
central14(A,secondDim) * recip_12 * geom.recipSpatialStep(), central14(A,secondDim) * recip_12 * geom.recipSpatialStep(),
central14(A,thirdDim) * recip_12 * geom.recipSpatialStep()); central14(A,thirdDim) * recip_12 * geom.recipSpatialStep());
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 127 change blocks. 
208 lines changed or deleted 221 lines changed or added


 stencils.cc   stencils.cc 
/************************************************************************** * /************************************************************************** *
* blitz/array/stencils.cc Apply stencils to arrays * blitz/array/stencils.cc Apply stencils to arrays
* *
* $Id: stencils.cc,v 1.3 2001/01/26 19:37:38 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: stencils.cc,v $
* Revision 1.3 2001/01/26 19:37:38 tveldhui
* Incorporated 1D stencil fix from Derrick Bass.
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYSTENCILS_CC #ifndef BZ_ARRAYSTENCILS_CC
#define BZ_ARRAYSTENCILS_CC #define BZ_ARRAYSTENCILS_CC
#ifndef BZ_ARRAYSTENCILS_H #ifndef BZ_ARRAYSTENCILS_H
#error <blitz/array/stencil.cc> must be included via <blitz/array/stencils .h> #error <blitz/array/stencil.cc> must be included via <blitz/array/stencils .h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// NEEDS_WORK: // NEEDS_WORK:
skipping to change at line 57 skipping to change at line 46
// o Pass coordinate vector to stencil, so that where-like constructs // o Pass coordinate vector to stencil, so that where-like constructs
// can depend on location // can depend on location
// o Maybe allow expression templates to be passed as // o Maybe allow expression templates to be passed as
// array parameters? // array parameters?
/* /*
* There are a lot of kludges in this code to work around the fact that * There are a lot of kludges in this code to work around the fact that
* you can't have default template parameters with function templates. * you can't have default template parameters with function templates.
* Ideally, one would implement applyStencil(..) as: * Ideally, one would implement applyStencil(..) as:
* *
* template<class T_stencil, class T_numtype1, class T_array2, * template<typename T_stencil, typename T_numtype1, typename T_array2,
* class T_array3, class T_array4, class T_array5, class T_array6, * class T_array3, typename T_array4, typename T_array5, typename T_arra
* class T_array7, class T_array8, class T_array9, class T_array10, y6,
* class T_array7, typename T_array8, typename T_array9, typename T_arra
y10,
* class T_array11> * class T_array11>
* void applyStencil(const T_stencil& stencil, Array<T_numtype1,3>& A, * void applyStencil(const T_stencil& stencil, Array<T_numtype1,3>& A,
* T_array2& B = _dummyArray, T_array3& C = _dummyArray, ......) * T_array2& B = _dummyArray, T_array3& C = _dummyArray, ......)
* *
* and allow for up to (say) 11 arrays to be passed. But this doesn't * and allow for up to (say) 11 arrays to be passed. But this doesn't
* appear to be legal C++. Instead, 11 versions of applyStencil are * appear to be legal C++. Instead, 11 versions of applyStencil are
* provided, each one with a different number of array parameters, * provided, each one with a different number of array parameters,
* and these stubs fill in the _dummyArray parameters and invoke * and these stubs fill in the _dummyArray parameters and invoke
* applyStencil_imp(). * applyStencil_imp().
*/ */
template<int N_rank, class T_numtype1, class T_array2, template<int N_rank, typename T_numtype1, typename T_array2,
class T_array3, class T_array4, class T_array5, class T_array6, class T_array3, typename T_array4, typename T_array5, typename T_array6
class T_array7, class T_array8, class T_array9, class T_array10, ,
class T_array7, typename T_array8, typename T_array9, typename T_array1
0,
class T_array11> class T_array11>
void checkShapes(const Array<T_numtype1,N_rank>& A, void checkShapes(const Array<T_numtype1,N_rank>& BZ_DEBUG_PARAM(A),
const T_array2& B, const T_array3& C, const T_array4& D, const T_array2& BZ_DEBUG_PARAM(B), const T_array3& BZ_DEBUG_PARAM(C),
const T_array5& E, const T_array6& F, const T_array7& G, const T_array4& BZ_DEBUG_PARAM(D), const T_array5& BZ_DEBUG_PARAM(E),
const T_array8& H, const T_array9& I, const T_array10& J, const T_array6& BZ_DEBUG_PARAM(F), const T_array7& BZ_DEBUG_PARAM(G),
const T_array11& K) const T_array8& BZ_DEBUG_PARAM(H), const T_array9& BZ_DEBUG_PARAM(I),
const T_array10& BZ_DEBUG_PARAM(J), const T_array11& BZ_DEBUG_PARAM(K))
{ {
BZPRECONDITION(areShapesConformable(A.shape(),B.shape()) BZPRECONDITION(areShapesConformable(A.shape(),B.shape())
&& areShapesConformable(A.shape(),C.shape()) && areShapesConformable(A.shape(),C.shape())
&& areShapesConformable(A.shape(),D.shape()) && areShapesConformable(A.shape(),D.shape())
&& areShapesConformable(A.shape(),E.shape()) && areShapesConformable(A.shape(),E.shape())
&& areShapesConformable(A.shape(),F.shape()) && areShapesConformable(A.shape(),F.shape())
&& areShapesConformable(A.shape(),G.shape()) && areShapesConformable(A.shape(),G.shape())
&& areShapesConformable(A.shape(),H.shape()) && areShapesConformable(A.shape(),H.shape())
&& areShapesConformable(A.shape(),I.shape()) && areShapesConformable(A.shape(),I.shape())
&& areShapesConformable(A.shape(),J.shape()) && areShapesConformable(A.shape(),J.shape())
&& areShapesConformable(A.shape(),K.shape())); && areShapesConformable(A.shape(),K.shape()));
} }
template<class T_extent, int N_rank, template<typename T_extent, int N_rank,
class T_stencil, class T_numtype1, class T_array2, class T_stencil, typename T_numtype1, typename T_array2,
class T_array3, class T_array4, class T_array5, class T_array6, class T_array3, typename T_array4, typename T_array5, typename T_array6
class T_array7, class T_array8, class T_array9, class T_array10, ,
class T_array7, typename T_array8, typename T_array9, typename T_array1
0,
class T_array11> class T_array11>
void calcStencilExtent(T_extent& At, const T_stencil& stencil, void calcStencilExtent(T_extent& At, const T_stencil& stencil,
const Array<T_numtype1,N_rank>& A, const Array<T_numtype1,N_rank>&,
const T_array2& B, const T_array3& C, const T_array4& D, const T_array5 const T_array2&, const T_array3&, const T_array4&, const T_array5&,
& E, const T_array6&, const T_array7&, const T_array8&, const T_array9&,
const T_array6& F, const T_array7& G, const T_array8& H, const T_array9 const T_array10&, const T_array11&)
& I,
const T_array10& J, const T_array11& K)
{ {
// Interrogate the stencil to find out its extent // Interrogate the stencil to find out its extent
_bz_typename stencilExtent_traits<T_array2>::T_stencilExtent Bt; _bz_typename stencilExtent_traits<T_array2>::T_stencilExtent Bt;
_bz_typename stencilExtent_traits<T_array3>::T_stencilExtent Ct; _bz_typename stencilExtent_traits<T_array3>::T_stencilExtent Ct;
_bz_typename stencilExtent_traits<T_array4>::T_stencilExtent Dt; _bz_typename stencilExtent_traits<T_array4>::T_stencilExtent Dt;
_bz_typename stencilExtent_traits<T_array5>::T_stencilExtent Et; _bz_typename stencilExtent_traits<T_array5>::T_stencilExtent Et;
_bz_typename stencilExtent_traits<T_array6>::T_stencilExtent Ft; _bz_typename stencilExtent_traits<T_array6>::T_stencilExtent Ft;
_bz_typename stencilExtent_traits<T_array7>::T_stencilExtent Gt; _bz_typename stencilExtent_traits<T_array7>::T_stencilExtent Gt;
_bz_typename stencilExtent_traits<T_array8>::T_stencilExtent Ht; _bz_typename stencilExtent_traits<T_array8>::T_stencilExtent Ht;
_bz_typename stencilExtent_traits<T_array9>::T_stencilExtent It; _bz_typename stencilExtent_traits<T_array9>::T_stencilExtent It;
skipping to change at line 129 skipping to change at line 119
At.combine(Dt); At.combine(Dt);
At.combine(Et); At.combine(Et);
At.combine(Ft); At.combine(Ft);
At.combine(Gt); At.combine(Gt);
At.combine(Ht); At.combine(Ht);
At.combine(It); At.combine(It);
At.combine(Jt); At.combine(Jt);
At.combine(Kt); At.combine(Kt);
} }
template<int N_rank, class T_stencil, class T_numtype1, class T_array2> template<int N_rank, typename T_stencil, typename T_numtype1, typename T_ar ray2>
RectDomain<N_rank> interiorDomain(const T_stencil& stencil, RectDomain<N_rank> interiorDomain(const T_stencil& stencil,
const Array<T_numtype1,N_rank>& A, const Array<T_numtype1,N_rank>& A,
const T_array2& B) const T_array2& B)
{ {
RectDomain<N_rank> domain = A.domain(); RectDomain<N_rank> domain = A.domain();
// Interrogate the stencil to find out its extent // Interrogate the stencil to find out its extent
stencilExtent<3, T_numtype1> At; stencilExtent<3, T_numtype1> At;
calcStencilExtent(At, stencil, A, B, _dummyArray, _dummyArray, calcStencilExtent(At, stencil, A, B, _dummyArray, _dummyArray,
_dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray,
skipping to change at line 152 skipping to change at line 142
// Shrink the domain according to the stencil size // Shrink the domain according to the stencil size
TinyVector<int,N_rank> lbound, ubound; TinyVector<int,N_rank> lbound, ubound;
lbound = domain.lbound() - At.min(); lbound = domain.lbound() - At.min();
ubound = domain.ubound() - At.max(); ubound = domain.ubound() - At.max();
return RectDomain<N_rank>(lbound,ubound); return RectDomain<N_rank>(lbound,ubound);
} }
template<int hasExtents> template<int hasExtents>
struct _getStencilExtent { struct _getStencilExtent {
template<int N_rank, template<int N_rank,
class T_stencil, class T_numtype1, class T_array2, class T_stencil, typename T_numtype1, typename T_array2,
class T_array3, class T_array4, class T_array5, class T_array6, class T_array3, typename T_array4, typename T_array5, typename T_array6
class T_array7, class T_array8, class T_array9, class T_array10, ,
class T_array7, typename T_array8, typename T_array9, typename T_array1
0,
class T_array11> class T_array11>
static void getStencilExtent(TinyVector<int,N_rank>& minb, static void getStencilExtent(TinyVector<int,N_rank>& minb,
TinyVector<int,N_rank>& maxb, TinyVector<int,N_rank>& maxb,
const T_stencil& stencil, Array<T_numtype1,N_rank>& A, const T_stencil& stencil, Array<T_numtype1,N_rank>& A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F,
T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K) T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K)
{ {
// Interrogate the stencil to find out its extent // Interrogate the stencil to find out its extent
stencilExtent<N_rank, T_numtype1> At; stencilExtent<N_rank, T_numtype1> At;
calcStencilExtent(At, stencil, A, B, C, D, E, F, G, H, I, J, K); calcStencilExtent(At, stencil, A, B, C, D, E, F, G, H, I, J, K);
minb = At.min(); minb = At.min();
maxb = At.max(); maxb = At.max();
} }
}; };
template<> template<>
struct _getStencilExtent<1> { struct _getStencilExtent<1> {
template<int N_rank, template<int N_rank,
class T_stencil, class T_numtype1, class T_array2, class T_stencil, typename T_numtype1, typename T_array2,
class T_array3, class T_array4, class T_array5, class T_array6, class T_array3, typename T_array4, typename T_array5, typename T_array6
class T_array7, class T_array8, class T_array9, class T_array10, ,
class T_array7, typename T_array8, typename T_array9, typename T_array1
0,
class T_array11> class T_array11>
static inline void getStencilExtent(TinyVector<int,N_rank>& minb, static inline void getStencilExtent(TinyVector<int,N_rank>& minb,
TinyVector<int,N_rank>& maxb, TinyVector<int,N_rank>& maxb,
const T_stencil& stencil, Array<T_numtype1,N_rank>& A, const T_stencil& stencil, Array<T_numtype1,N_rank>&,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2&, T_array3&, T_array4&, T_array5&, T_array6&,
T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K) T_array7&, T_array8&, T_array9&, T_array10&, T_array11&)
{ {
stencil.getExtent(minb, maxb); stencil.getExtent(minb, maxb);
} }
}; };
template<int N_rank, template<int N_rank,
class T_stencil, class T_numtype1, class T_array2, class T_stencil, typename T_numtype1, typename T_array2,
class T_array3, class T_array4, class T_array5, class T_array6, class T_array3, typename T_array4, typename T_array5, typename T_array6
class T_array7, class T_array8, class T_array9, class T_array10, ,
class T_array7, typename T_array8, typename T_array9, typename T_array1
0,
class T_array11> class T_array11>
inline void getStencilExtent(TinyVector<int,N_rank>& minb, inline void getStencilExtent(TinyVector<int,N_rank>& minb,
TinyVector<int,N_rank>& maxb, TinyVector<int,N_rank>& maxb,
const T_stencil& stencil, Array<T_numtype1,N_rank>& A, const T_stencil& stencil, Array<T_numtype1,N_rank>& A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F,
T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K) T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K)
{ {
_getStencilExtent<T_stencil::hasExtent>::getStencilExtent( _getStencilExtent<T_stencil::hasExtent>::getStencilExtent(
minb, maxb, stencil, A, B, C, D, E, F, G, H, I, J, K); minb, maxb, stencil, A, B, C, D, E, F, G, H, I, J, K);
} }
/* /*
* This version applies a stencil to a set of 3D arrays. Up to 11 arrays * This version applies a stencil to a set of 3D arrays. Up to 11 arrays
* may be used. Any unused arrays are turned into dummyArray objects. * may be used. Any unused arrays are turned into dummyArray objects.
* Operations on dummyArray objects are translated into no-ops. * Operations on dummyArray objects are translated into no-ops.
*/ */
template<class T_stencil, class T_numtype1, class T_array2, template<typename T_stencil, typename T_numtype1, typename T_array2,
class T_array3, class T_array4, class T_array5, class T_array6, class T_array3, typename T_array4, typename T_array5, typename T_array6
class T_array7, class T_array8, class T_array9, class T_array10, ,
class T_array7, typename T_array8, typename T_array9, typename T_array1
0,
class T_array11> class T_array11>
void applyStencil_imp(const T_stencil& stencil, Array<T_numtype1,3>& A, void applyStencil_imp(const T_stencil& stencil, Array<T_numtype1,3>& A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F,
T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K) T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K)
{ {
checkShapes(A,B,C,D,E,F,G,H,I,J,K); checkShapes(A,B,C,D,E,F,G,H,I,J,K);
// Determine stencil extent // Determine stencil extent
TinyVector<int,3> minb, maxb; TinyVector<int,3> minb, maxb;
getStencilExtent(minb, maxb, stencil, A, B, C, D, E, F, G, H, I, J, K); getStencilExtent(minb, maxb, stencil, A, B, C, D, E, F, G, H, I, J, K);
skipping to change at line 315 skipping to change at line 305
} }
} }
} }
} }
/* /*
* This version applies a stencil to a set of 2D arrays. Up to 11 arrays * This version applies a stencil to a set of 2D arrays. Up to 11 arrays
* may be used. Any unused arrays are turned into dummyArray objects. * may be used. Any unused arrays are turned into dummyArray objects.
* Operations on dummyArray objects are translated into no-ops. * Operations on dummyArray objects are translated into no-ops.
*/ */
template<class T_stencil, class T_numtype1, class T_array2, template<typename T_stencil, typename T_numtype1, typename T_array2,
class T_array3, class T_array4, class T_array5, class T_array6, class T_array3, typename T_array4, typename T_array5, typename T_array6
class T_array7, class T_array8, class T_array9, class T_array10, ,
class T_array7, typename T_array8, typename T_array9, typename T_array1
0,
class T_array11> class T_array11>
void applyStencil_imp(const T_stencil& stencil, Array<T_numtype1,2>& A, void applyStencil_imp(const T_stencil& stencil, Array<T_numtype1,2>& A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F,
T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K) T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K)
{ {
checkShapes(A,B,C,D,E,F,G,H,I,J,K); checkShapes(A,B,C,D,E,F,G,H,I,J,K);
// Determine stencil extent // Determine stencil extent
TinyVector<int,2> minb, maxb; TinyVector<int,2> minb, maxb;
getStencilExtent(minb, maxb, stencil, A, B, C, D, E, F, G, H, I, J, K); getStencilExtent(minb, maxb, stencil, A, B, C, D, E, F, G, H, I, J, K);
skipping to change at line 415 skipping to change at line 405
Kiter.advance(); Kiter.advance();
} }
} }
} }
/* /*
* This version applies a stencil to a set of 1D arrays. Up to 11 arrays * This version applies a stencil to a set of 1D arrays. Up to 11 arrays
* may be used. Any unused arrays are turned into dummyArray objects. * may be used. Any unused arrays are turned into dummyArray objects.
* Operations on dummyArray objects are translated into no-ops. * Operations on dummyArray objects are translated into no-ops.
*/ */
template<class T_stencil, class T_numtype1, class T_array2, template<typename T_stencil, typename T_numtype1, typename T_array2,
class T_array3, class T_array4, class T_array5, class T_array6, class T_array3, typename T_array4, typename T_array5, typename T_array6
class T_array7, class T_array8, class T_array9, class T_array10, ,
class T_array7, typename T_array8, typename T_array9, typename T_array1
0,
class T_array11> class T_array11>
void applyStencil_imp(const T_stencil& stencil, Array<T_numtype1,1>& A, void applyStencil_imp(const T_stencil& stencil, Array<T_numtype1,1>& A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F,
T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K) T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K)
{ {
checkShapes(A,B,C,D,E,F,G,H,I,J,K); checkShapes(A,B,C,D,E,F,G,H,I,J,K);
// Determine stencil extent // Determine stencil extent
TinyVector<int,1> minb, maxb; TinyVector<int,1> minb, maxb;
getStencilExtent(minb, maxb, stencil, A, B, C, D, E, F, G, H, I, J, K); getStencilExtent(minb, maxb, stencil, A, B, C, D, E, F, G, H, I, J, K);
skipping to change at line 506 skipping to change at line 496
Jiter.advance(); Jiter.advance();
Kiter.advance(); Kiter.advance();
} }
} }
/* /*
* These 11 versions of applyStencil handle from 1 to 11 array parameters. * These 11 versions of applyStencil handle from 1 to 11 array parameters.
* They pad their argument list with enough dummyArray objects to call * They pad their argument list with enough dummyArray objects to call
* applyStencil_imp with 11 array parameters. * applyStencil_imp with 11 array parameters.
*/ */
template<class T_stencil, class T_numtype1, int N_rank> template<typename T_stencil, typename T_numtype1, int N_rank>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A) inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A)
{ {
applyStencil_imp(stencil, A, _dummyArray, _dummyArray, applyStencil_imp(stencil, A, _dummyArray, _dummyArray,
_dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray,
_dummyArray, _dummyArray, _dummyArray, _dummyArray); _dummyArray, _dummyArray, _dummyArray, _dummyArray);
} }
template<class T_stencil, class T_numtype1, int N_rank, class T_array2> template<typename T_stencil, typename T_numtype1, int N_rank, typename T_ar ray2>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A, inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A,
T_array2& B) T_array2& B)
{ {
applyStencil_imp(stencil, A, B, _dummyArray, _dummyArray, applyStencil_imp(stencil, A, B, _dummyArray, _dummyArray,
_dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray,
_dummyArray, _dummyArray, _dummyArray); _dummyArray, _dummyArray, _dummyArray);
} }
template<class T_stencil, class T_numtype1, int N_rank, class T_array2, template<typename T_stencil, typename T_numtype1, int N_rank, typename T_ar ray2,
class T_array3> class T_array3>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A, inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A,
T_array2& B, T_array3& C) T_array2& B, T_array3& C)
{ {
applyStencil_imp(stencil, A, B, C, _dummyArray, _dummyArray, applyStencil_imp(stencil, A, B, C, _dummyArray, _dummyArray,
_dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray,
_dummyArray); _dummyArray);
} }
template<class T_stencil, class T_numtype1, int N_rank, class T_array2, template<typename T_stencil, typename T_numtype1, int N_rank, typename T_ar
class T_array3, class T_array4> ray2,
class T_array3, typename T_array4>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A, inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A,
T_array2& B, T_array3& C, T_array4& D) T_array2& B, T_array3& C, T_array4& D)
{ {
applyStencil_imp(stencil, A, B, C, D, _dummyArray, _dummyArray, applyStencil_imp(stencil, A, B, C, D, _dummyArray, _dummyArray,
_dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray); _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray);
} }
template<class T_stencil, class T_numtype1, int N_rank, class T_array2, template<typename T_stencil, typename T_numtype1, int N_rank, typename T_ar
class T_array3, class T_array4, class T_array5> ray2,
class T_array3, typename T_array4, typename T_array5>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A, inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E) T_array2& B, T_array3& C, T_array4& D, T_array5& E)
{ {
applyStencil_imp(stencil, A, B, C, D, E, _dummyArray, applyStencil_imp(stencil, A, B, C, D, E, _dummyArray,
_dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray); _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray);
} }
template<class T_stencil, class T_numtype1, int N_rank, class T_array2, template<typename T_stencil, typename T_numtype1, int N_rank, typename T_ar
class T_array3, class T_array4, class T_array5, class T_array6> ray2,
class T_array3, typename T_array4, typename T_array5, typename T_array6
>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A, inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F) T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F)
{ {
applyStencil_imp(stencil, A, B, C, D, E, F, applyStencil_imp(stencil, A, B, C, D, E, F,
_dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray); _dummyArray, _dummyArray, _dummyArray, _dummyArray, _dummyArray);
} }
template<class T_stencil, class T_numtype1, int N_rank, class T_array2, template<typename T_stencil, typename T_numtype1, int N_rank, typename T_ar
class T_array3, class T_array4, class T_array5, class T_array6, ray2,
class T_array3, typename T_array4, typename T_array5, typename T_array6
,
class T_array7> class T_array7>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A, inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F,
T_array7& G) T_array7& G)
{ {
applyStencil_imp(stencil, A, B, C, D, E, F, G, applyStencil_imp(stencil, A, B, C, D, E, F, G,
_dummyArray, _dummyArray, _dummyArray, _dummyArray); _dummyArray, _dummyArray, _dummyArray, _dummyArray);
} }
template<class T_stencil, class T_numtype1, int N_rank, class T_array2, template<typename T_stencil, typename T_numtype1, int N_rank, typename T_ar
class T_array3, class T_array4, class T_array5, class T_array6, ray2,
class T_array7, class T_array8> class T_array3, typename T_array4, typename T_array5, typename T_array6
,
class T_array7, typename T_array8>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A, inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F,
T_array7& G, T_array8& H) T_array7& G, T_array8& H)
{ {
applyStencil_imp(stencil, A, B, C, D, E, F, G, H, applyStencil_imp(stencil, A, B, C, D, E, F, G, H,
_dummyArray, _dummyArray, _dummyArray); _dummyArray, _dummyArray, _dummyArray);
} }
template<class T_stencil, class T_numtype1, int N_rank, class T_array2, template<typename T_stencil, typename T_numtype1, int N_rank, typename T_ar
class T_array3, class T_array4, class T_array5, class T_array6, ray2,
class T_array7, class T_array8, class T_array9> class T_array3, typename T_array4, typename T_array5, typename T_array6
,
class T_array7, typename T_array8, typename T_array9>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A, inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F,
T_array7& G, T_array8& H, T_array9& I) T_array7& G, T_array8& H, T_array9& I)
{ {
applyStencil_imp(stencil, A, B, C, D, E, F, G, H, I, applyStencil_imp(stencil, A, B, C, D, E, F, G, H, I,
_dummyArray, _dummyArray); _dummyArray, _dummyArray);
} }
template<class T_stencil, class T_numtype1, int N_rank, class T_array2, template<typename T_stencil, typename T_numtype1, int N_rank, typename T_ar
class T_array3, class T_array4, class T_array5, class T_array6, ray2,
class T_array7, class T_array8, class T_array9, class T_array10> class T_array3, typename T_array4, typename T_array5, typename T_array6
,
class T_array7, typename T_array8, typename T_array9, typename T_array1
0>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A, inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F,
T_array7& G, T_array8& H, T_array9& I, T_array10& J) T_array7& G, T_array8& H, T_array9& I, T_array10& J)
{ {
applyStencil_imp(stencil, A, B, C, D, E, F, G, H, I, J, applyStencil_imp(stencil, A, B, C, D, E, F, G, H, I, J,
_dummyArray); _dummyArray);
} }
template<class T_stencil, class T_numtype1, int N_rank, class T_array2, template<typename T_stencil, typename T_numtype1, int N_rank, typename T_ar
class T_array3, class T_array4, class T_array5, class T_array6, ray2,
class T_array7, class T_array8, class T_array9, class T_array10, class T_array3, typename T_array4, typename T_array5, typename T_array6
,
class T_array7, typename T_array8, typename T_array9, typename T_array1
0,
class T_array11> class T_array11>
inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A, inline void applyStencil(const T_stencil& stencil, Array<T_numtype1,N_rank> & A,
T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F, T_array2& B, T_array3& C, T_array4& D, T_array5& E, T_array6& F,
T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K) T_array7& G, T_array8& H, T_array9& I, T_array10& J, T_array11& K)
{ {
applyStencil_imp(stencil, A, B, C, D, E, F, G, H, I, J, K); applyStencil_imp(stencil, A, B, C, D, E, F, G, H, I, J, K);
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 26 change blocks. 
79 lines changed or deleted 101 lines changed or added


 stencils.h   stencils.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/stencils.h Stencils for arrays * blitz/array/stencils.h Stencils for arrays
* *
* $Id: stencils.h,v 1.2 2001/01/25 00:25:56 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: stencils.h,v $
* Revision 1.2 2001/01/25 00:25:56 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYSTENCILS_H #ifndef BZ_ARRAYSTENCILS_H
#define BZ_ARRAYSTENCILS_H #define BZ_ARRAYSTENCILS_H
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/stencils.h> must be included after <blitz/array.h> #error <blitz/array/stencils.h> must be included after <blitz/array.h>
#endif #endif
#include <blitz/array/stencilops.h> #include <blitz/array/stencilops.h>
BZ_NAMESPACE(blitz)
// NEEDS_WORK: currently stencilExtent returns int(1). What if the // NEEDS_WORK: currently stencilExtent returns int(1). What if the
// stencil contains calls to math functions, or divisions, etc.? // stencil contains calls to math functions, or divisions, etc.?
// Should at least return a number of the appropriate type. Probably // Should at least return a number of the appropriate type. Probably
// return a sequence of quasi-random floating point numbers. // return a sequence of quasi-random floating point numbers.
/* /*
* These macros make it easier for users to declare stencil objects. * These macros make it easier for users to declare stencil objects.
* The syntax is: * The syntax is:
* *
* BZ_DECLARE_STENCILN(stencilname, Array1, Array2, ..., ArrayN) * BZ_DECLARE_STENCILN(stencilname, Array1, Array2, ..., ArrayN)
* // stencil operations go here * // stencil operations go here
* BZ_END_STENCIL * BZ_END_STENCIL
*/ */
#define BZ_DECLARE_STENCIL2(name,A,B) \ #define BZ_DECLARE_STENCIL2(name,A,B) \
struct name { \ struct name { \
template<class T1, class T2, class T3, class T4, class T5, class T6, \ template<typename T1,typename T2,typename T3,typename T4,typename T5,ty
class T7, class T8, class T9, class T10, class T11> \ pename T6, \
typename T7,typename T8,typename T9,typename T10,typename T11>
\
static inline void apply(T1& A, T2& B, T3, T4, T5, T6, T7, T8, T9, T10, T11) \ static inline void apply(T1& A, T2& B, T3, T4, T5, T6, T7, T8, T9, T10, T11) \
{ {
#define BZ_END_STENCIL_WITH_SHAPE(MINS,MAXS) } \ #define BZ_END_STENCIL_WITH_SHAPE(MINS,MAXS) } \
template<int N> \ template<int N> \
void getExtent(TinyVector<int,N>& minb, TinyVector<int,N>& maxb) const void getExtent(BZ_BLITZ_SCOPE(TinyVector)<int,N>& minb, \
\ BZ_BLITZ_SCOPE(TinyVector)<int,N>& maxb) const \
{ \ { \
minb = MINS; \ minb = MINS; \
maxb = MAXS; \ maxb = MAXS; \
} \ } \
enum { hasExtent = 1 }; \ static const bool hasExtent = true; \
}; };
#define BZ_END_STENCIL } enum { hasExtent = 0 }; }; #define BZ_END_STENCIL } static const bool hasExtent = false; };
#define BZ_STENCIL_END BZ_END_STENCIL #define BZ_STENCIL_END BZ_END_STENCIL
#define BZ_DECLARE_STENCIL3(name,A,B,C) \ #define BZ_DECLARE_STENCIL3(name,A,B,C) \
struct name { \ struct name { \
template<class T1, class T2, class T3, class T4, class T5, class T6, \ template<typename T1,typename T2,typename T3,typename T4,typename T5,ty
class T7, class T8, class T9, class T10, class T11> \ pename T6, \
typename T7,typename T8,typename T9,typename T10,typename T11>
\
static inline void apply(T1& A, T2& B, T3& C, T4, T5, T6, T7, T8, T9, \ static inline void apply(T1& A, T2& B, T3& C, T4, T5, T6, T7, T8, T9, \
T10, T11) \ T10, T11) \
{ {
#define BZ_DECLARE_STENCIL4(name,A,B,C,D) \ #define BZ_DECLARE_STENCIL4(name,A,B,C,D) \
struct name { \ struct name { \
template<class T1, class T2, class T3, class T4, class T5, class T6, \ template<typename T1,typename T2,typename T3,typename T4,typename T5,ty
class T7, class T8, class T9, class T10, class T11> \ pename T6, \
typename T7,typename T8,typename T9,typename T10,typename T11>
\
static inline void apply(T1& A, T2& B, T3& C, T4& D, T5, T6, T7, \ static inline void apply(T1& A, T2& B, T3& C, T4& D, T5, T6, T7, \
T8, T9, T10, T11) \ T8, T9, T10, T11) \
{ {
#define BZ_DECLARE_STENCIL5(name,A,B,C,D,E) \ #define BZ_DECLARE_STENCIL5(name,A,B,C,D,E) \
struct name { \ struct name { \
template<class T1, class T2, class T3, class T4, class T5, class T6, \ template<typename T1,typename T2,typename T3,typename T4,typename T5,ty
class T7, class T8, class T9, class T10, class T11> \ pename T6, \
typename T7,typename T8,typename T9,typename T10,typename T11>
\
static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6, T7, T8, \ static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6, T7, T8, \
T9, T10, T11) \ T9, T10, T11) \
{ {
#define BZ_DECLARE_STENCIL6(name,A,B,C,D,E,F) \ #define BZ_DECLARE_STENCIL6(name,A,B,C,D,E,F) \
struct name { \ struct name { \
template<class T1, class T2, class T3, class T4, class T5, class T6, \ template<typename T1,typename T2,typename T3,typename T4,typename T5,ty
class T7, class T8, class T9, class T10, class T11> \ pename T6, \
typename T7,typename T8,typename T9,typename T10,typename T11>
\
static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, \ static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, \
T7, T8, T9, T10, T11) \ T7, T8, T9, T10, T11) \
{ {
#define BZ_DECLARE_STENCIL7(name,A,B,C,D,E,F,G) \ #define BZ_DECLARE_STENCIL7(name,A,B,C,D,E,F,G) \
struct name { \ struct name { \
template<class T1, class T2, class T3, class T4, \ template<typename T1,typename T2,typename T3,typename T4, \
class T5, class T6, class T7, class T8, class T9, class T10, class T1 typename T5,typename T6,typename T7,typename T8,typename T9,ty
1> \ pename T10,typename T11> \
static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, T7& G, \ static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, T7& G, \
T8, T9, T10, T11) \ T8, T9, T10, T11) \
{ {
#define BZ_DECLARE_STENCIL8(name,A,B,C,D,E,F,G,H) \ #define BZ_DECLARE_STENCIL8(name,A,B,C,D,E,F,G,H) \
struct name { \ struct name { \
template<class T1, class T2, class T3, class T4, \ template<typename T1,typename T2,typename T3,typename T4, \
class T5, class T6, class T7, class T8, class T9, class T10, class T1 typename T5,typename T6,typename T7,typename T8,typename T9,ty
1> \ pename T10,typename T11> \
static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, T7& G, \ static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, T7& G, \
T8& H, T9, T10, T11) \ T8& H, T9, T10, T11) \
{ {
#define BZ_DECLARE_STENCIL9(name,A,B,C,D,E,F,G,H,I) \ #define BZ_DECLARE_STENCIL9(name,A,B,C,D,E,F,G,H,I) \
struct name { \ struct name { \
template<class T1, class T2, class T3, class T4, \ template<typename T1,typename T2,typename T3,typename T4, \
class T5, class T6, class T7, class T8, class T9, class T10, \ typename T5,typename T6,typename T7,typename T8,typename T9,ty
class T11> \ pename T10, \
typename T11> \
static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, T7& G, \ static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, T7& G, \
T8& H, T9& I, T10, T11) \ T8& H, T9& I, T10, T11) \
{ {
#define BZ_DECLARE_STENCIL10(name,A,B,C,D,E,F,G,H,I,J) \ #define BZ_DECLARE_STENCIL10(name,A,B,C,D,E,F,G,H,I,J) \
struct name { \ struct name { \
template<class T1, class T2, class T3, class T4, \ template<typename T1,typename T2,typename T3,typename T4, \
class T5, class T6, class T7, class T8, class T9, class T10, class T1 typename T5,typename T6,typename T7,typename T8,typename T9,ty
1> \ pename T10,typename T11> \
static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, T7& G, \ static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, T7& G, \
T8& H, T9& I, T10& J, T11) \ T8& H, T9& I, T10& J, T11) \
{ {
#define BZ_DECLARE_STENCIL11(name,A,B,C,D,E,F,G,H,I,J,K) \ #define BZ_DECLARE_STENCIL11(name,A,B,C,D,E,F,G,H,I,J,K) \
struct name { \ struct name { \
template<class T1, class T2, class T3, class T4, \ template<typename T1,typename T2,typename T3,typename T4, \
class T5, class T6, class T7, class T8, class T9, class T10, \ typename T5,typename T6,typename T7,typename T8,typename T9,ty
class T11> \ pename T10, \
typename T11> \
static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, T7& G, \ static inline void apply(T1& A, T2& B, T3& C, T4& D, T5& E, T6& F, T7& G, \
T8& H, T9& I, T10& J, T11& K) \ T8& H, T9& I, T10& J, T11& K) \
{ {
BZ_NAMESPACE(blitz)
/* /*
* dummyArray is used to provide "dummy" padding parameters to applyStencil (), * dummyArray is used to provide "dummy" padding parameters to applyStencil (),
* so that any number of arrays (up to 11) can be given as arguments. * so that any number of arrays (up to 11) can be given as arguments.
*/ */
template<class T> class dummy; template<typename T> class dummy;
struct dummyArray { struct dummyArray {
typedef dummy<double> T_iterator; typedef dummy<double> T_iterator;
const dummyArray& shape() const { return *this; } const dummyArray& shape() const { return *this; }
}; };
_bz_global dummyArray _dummyArray; _bz_global dummyArray _dummyArray;
/* /*
* This dummy class pretends to be a scalar of type T, or an array iterator * This dummy class pretends to be a scalar of type T, or an array iterator
* of type T, but really does nothing. * of type T, but really does nothing.
*/ */
template<class T> template<typename T>
class dummy { class dummy {
public: public:
dummy() { } dummy() { }
dummy(T value) dummy(T value)
: value_(value) : value_(value)
{ } { }
dummy(const dummyArray&) dummy(const dummyArray&)
{ } { }
operator T() const { return value_; }; operator T() const { return value_; };
template<class T2> template<typename T2>
void operator=(T2) { } void operator=(T2) { }
_bz_typename multicomponent_traits<T>::T_element operator[](int i) cons t _bz_typename multicomponent_traits<T>::T_element operator[](int i) cons t
{ return value_[i]; } { return value_[i]; }
void loadStride(int) { } void loadStride(int) { }
void moveTo(int) { } void moveTo(int) { }
void moveTo(int,int) { } void moveTo(int,int) { }
void moveTo(int,int,int) { } void moveTo(int,int,int) { }
void moveTo(int,int,int,int) { } void moveTo(int,int,int,int) { }
skipping to change at line 208 skipping to change at line 202
T value_; T value_;
}; };
/* /*
* The stencilExtent object is passed to stencil objects to find out * The stencilExtent object is passed to stencil objects to find out
* the spatial extent of the stencil. It pretends it's an array, * the spatial extent of the stencil. It pretends it's an array,
* but really it's just recording the locations of the array reads * but really it's just recording the locations of the array reads
* via operator(). * via operator().
*/ */
template<int N_rank, class P_numtype> template<int N_rank,typename P_numtype>
class stencilExtent { class stencilExtent {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
stencilExtent() stencilExtent()
{ {
min_ = 0; min_ = 0;
max_ = 0; max_ = 0;
} }
skipping to change at line 268 skipping to change at line 262
} }
void update(int rank, int offset) void update(int rank, int offset)
{ {
if (offset < min_[rank]) if (offset < min_[rank])
min_[rank] = offset; min_[rank] = offset;
if (offset > max_[rank]) if (offset > max_[rank])
max_[rank] = offset; max_[rank] = offset;
} }
template<class T_numtype2> template<typename T_numtype2>
void combine(const stencilExtent<N_rank,T_numtype2>& x) void combine(const stencilExtent<N_rank,T_numtype2>& x)
{ {
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
{ {
min_[i] = minmax::min(min_[i], x.min(i)); min_[i] = minmax::min(min_[i], x.min(i));
max_[i] = minmax::max(max_[i], x.max(i)); max_[i] = minmax::max(max_[i], x.max(i));
} }
} }
template<class T_numtype2> template<typename T_numtype2>
void combine(const dummy<T_numtype2>&) void combine(const dummy<T_numtype2>&)
{ } { }
int min(int i) const int min(int i) const
{ return min_[i]; } { return min_[i]; }
int max(int i) const int max(int i) const
{ return max_[i]; } { return max_[i]; }
const TinyVector<int,N_rank>& min() const const TinyVector<int,N_rank>& min() const
{ return min_; } { return min_; }
const TinyVector<int,N_rank>& max() const const TinyVector<int,N_rank>& max() const
{ return max_; } { return max_; }
template<class T> template<typename T>
void operator=(T) void operator=(T)
{ } { }
// NEEDS_WORK: other operators // NEEDS_WORK: other operators
template<class T> void operator+=(T) { } template<typename T> void operator+=(T) { }
template<class T> void operator-=(T) { } template<typename T> void operator-=(T) { }
template<class T> void operator*=(T) { } template<typename T> void operator*=(T) { }
template<class T> void operator/=(T) { } template<typename T> void operator/=(T) { }
operator T_numtype() operator T_numtype()
{ return T_numtype(1); } { return T_numtype(1); }
T_numtype operator*() T_numtype operator*()
{ return T_numtype(1); } { return T_numtype(1); }
private: private:
_bz_mutable TinyVector<int,N_rank> min_, max_; mutable TinyVector<int,N_rank> min_, max_;
}; };
/* /*
* stencilExtent_traits gives a stencilExtent<N,T> object for arrays, * stencilExtent_traits gives a stencilExtent<N,T> object for arrays,
* and a dummy object for dummy arrays. * and a dummy object for dummy arrays.
*/ */
template<class T> template<typename T>
struct stencilExtent_traits { struct stencilExtent_traits {
typedef dummy<double> T_stencilExtent; typedef dummy<double> T_stencilExtent;
}; };
template<class T_numtype, int N_rank> template<typename T_numtype, int N_rank>
struct stencilExtent_traits<Array<T_numtype,N_rank> > { struct stencilExtent_traits<Array<T_numtype,N_rank> > {
typedef stencilExtent<N_rank,T_numtype> T_stencilExtent; typedef stencilExtent<N_rank,T_numtype> T_stencilExtent;
}; };
/* /*
* Specialization of areShapesConformable(), originally * Specialization of areShapesConformable(), originally
* defined in <blitz/shapecheck.h> * defined in <blitz/shapecheck.h>
*/ */
template<class T_shape1> template<typename T_shape1>
inline _bz_bool areShapesConformable(const T_shape1&, const dummyArray&) inline bool areShapesConformable(const T_shape1&, const dummyArray&) {
{ return true;
return _bz_true;
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#include <blitz/array/stencils.cc> #include <blitz/array/stencils.cc>
#endif // BZ_ARRAYSTENCILS_H #endif // BZ_ARRAYSTENCILS_H
 End of changes. 30 change blocks. 
59 lines changed or deleted 63 lines changed or added


 storage.h   storage.h 
/************************************************************************** * /************************************************************************** *
* blitz/array/storage.h Memory layout of Arrays. * blitz/array/storage.h Memory layout of Arrays.
* *
* $Id: storage.h,v 1.7 2002/08/30 22:10:04 jcumming Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: storage.h,v $
* Revision 1.7 2002/08/30 22:10:04 jcumming
* Added explicit assignment operator for GeneralArrayStorage class.
*
* Revision 1.6 2002/06/28 01:42:24 jcumming
* Use _bz_bool and _bz_true where appropriate to avoid int/bool conversion
s.
*
* Revision 1.5 2002/05/27 19:45:43 jcumming
* Removed use of this->. Types and members from templated base class are
now
* declared in scope of derived classes.
*
* Revision 1.4 2002/03/06 17:08:36 patricg
*
* in
* template<int N_rank>
* class FortranArray : public GeneralArrayStorage<N_rank> {} and
* template<int N_rank>
* class ColumnMajorArray : public GeneralArrayStorage<N_rank> {}
* ordering_, ascendingFlag_, base_ replaced by this->ordering_,
* this->ascendingFlag_, this->base_
* noInitializeFlag() replaced by
* GeneralArrayStorage<N_rank>::noInitializeFlag()
*
* Revision 1.3 2001/01/25 00:25:56 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAY_STORAGE_H #ifndef BZ_ARRAY_STORAGE_H
#define BZ_ARRAY_STORAGE_H #define BZ_ARRAY_STORAGE_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* Declaration of class GeneralStorage<N_rank> * Declaration of class GeneralStorage<N_rank>
* *
* This class describes a storage format for an N-dimensional array. * This class describes a storage format for an N-dimensional array.
* The dimensions can be stored in an arbitrary order (for example, as * The dimensions can be stored in an arbitrary order (for example, as
skipping to change at line 91 skipping to change at line 61
public: public:
class noInitializeFlag { }; class noInitializeFlag { };
GeneralArrayStorage(noInitializeFlag) GeneralArrayStorage(noInitializeFlag)
{ } { }
GeneralArrayStorage() GeneralArrayStorage()
{ {
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
ordering_(i) = N_rank - 1 - i; ordering_(i) = N_rank - 1 - i;
ascendingFlag_ = _bz_true; ascendingFlag_ = true;
base_ = 0; base_ = 0;
} }
GeneralArrayStorage(const GeneralArrayStorage<N_rank>& x) GeneralArrayStorage(const GeneralArrayStorage<N_rank>& x)
: ordering_(x.ordering_), ascendingFlag_(x.ascendingFlag_), : ordering_(x.ordering_), ascendingFlag_(x.ascendingFlag_),
base_(x.base_) base_(x.base_)
{ {
} }
GeneralArrayStorage(TinyVector<int,N_rank> ordering, GeneralArrayStorage(TinyVector<int,N_rank> ordering,
TinyVector<_bz_bool,N_rank> ascendingFlag) TinyVector<bool,N_rank> ascendingFlag)
: ordering_(ordering), ascendingFlag_(ascendingFlag) : ordering_(ordering), ascendingFlag_(ascendingFlag)
{ {
base_ = 0; base_ = 0;
} }
~GeneralArrayStorage() ~GeneralArrayStorage()
{ } { }
GeneralArrayStorage<N_rank>& operator=( GeneralArrayStorage<N_rank>& operator=(
const GeneralArrayStorage<N_rank>& rhs) const GeneralArrayStorage<N_rank>& rhs)
skipping to change at line 132 skipping to change at line 102
const TinyVector<int, N_rank>& ordering() const const TinyVector<int, N_rank>& ordering() const
{ return ordering_; } { return ordering_; }
int ordering(int i) const int ordering(int i) const
{ return ordering_[i]; } { return ordering_[i]; }
void setOrdering(int i, int order) void setOrdering(int i, int order)
{ ordering_[i] = order; } { ordering_[i] = order; }
_bz_bool allRanksStoredAscending() const bool allRanksStoredAscending() const
{ {
_bz_bool result = _bz_true; bool result = true;
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
result &= ascendingFlag_[i]; result &= ascendingFlag_[i];
return result; return result;
} }
_bz_bool isRankStoredAscending(int i) const bool isRankStoredAscending(int i) const
{ return ascendingFlag_[i]; } { return ascendingFlag_[i]; }
TinyVector<_bz_bool, N_rank>& ascendingFlag() TinyVector<bool, N_rank>& ascendingFlag()
{ return ascendingFlag_; } { return ascendingFlag_; }
const TinyVector<_bz_bool, N_rank>& ascendingFlag() const const TinyVector<bool, N_rank>& ascendingFlag() const
{ return ascendingFlag_; } { return ascendingFlag_; }
void setAscendingFlag(int i, _bz_bool ascendingFlag) void setAscendingFlag(int i, bool ascendingFlag)
{ ascendingFlag_[i] = ascendingFlag; } { ascendingFlag_[i] = ascendingFlag; }
TinyVector<int, N_rank>& base() TinyVector<int, N_rank>& base()
{ return base_; } { return base_; }
const TinyVector<int, N_rank>& base() const const TinyVector<int, N_rank>& base() const
{ return base_; } { return base_; }
int base(int i) const int base(int i) const
{ return base_[i]; } { return base_[i]; }
skipping to change at line 190 skipping to change at line 160
* descending order. * descending order.
* *
* base_[] gives the first valid index for each rank. For a C-style * base_[] gives the first valid index for each rank. For a C-style
* array, all the base_ elements will be zero; for a Fortran-style * array, all the base_ elements will be zero; for a Fortran-style
* array, they will be one. base_[] can be set arbitrarily using * array, they will be one. base_[] can be set arbitrarily using
* the Array constructor which takes a Range argument, e.g. * the Array constructor which takes a Range argument, e.g.
* Array<float,2> A(Range(30,40),Range(23,33)); * Array<float,2> A(Range(30,40),Range(23,33));
* will create an array with base_[] = { 30, 23 }. * will create an array with base_[] = { 30, 23 }.
*/ */
TinyVector<int, N_rank> ordering_; TinyVector<int, N_rank> ordering_;
TinyVector<_bz_bool, N_rank> ascendingFlag_; TinyVector<bool, N_rank> ascendingFlag_;
TinyVector<int, N_rank> base_; TinyVector<int, N_rank> base_;
}; };
/* /*
* Class FortranArray specializes GeneralArrayStorage to provide Fortran * Class FortranArray specializes GeneralArrayStorage to provide Fortran
* style arrays (column major ordering, base of 1). The noInitializeFlag() * style arrays (column major ordering, base of 1). The noInitializeFlag()
* passed to the base constructor indicates that the subclass will take * passed to the base constructor indicates that the subclass will take
* care of initializing the ordering_, ascendingFlag_ and base_ members. * care of initializing the ordering_, ascendingFlag_ and base_ members.
*/ */
skipping to change at line 215 skipping to change at line 185
typedef _bz_typename T_base::noInitializeFlag noInitializeFlag; typedef _bz_typename T_base::noInitializeFlag noInitializeFlag;
using T_base::ordering_; using T_base::ordering_;
using T_base::ascendingFlag_; using T_base::ascendingFlag_;
using T_base::base_; using T_base::base_;
public: public:
FortranArray() FortranArray()
: GeneralArrayStorage<N_rank>(noInitializeFlag()) : GeneralArrayStorage<N_rank>(noInitializeFlag())
{ {
for (int i=0; i < N_rank; ++i) for (int i=0; i < N_rank; ++i)
ordering_(i) = i; ordering_(i) = i;
ascendingFlag_ = _bz_true; ascendingFlag_ = true;
base_ = 1; base_ = 1;
} }
}; };
// This tag class can be used to provide a nicer notation for // This tag class can be used to provide a nicer notation for
// constructing Fortran-style arrays: instead of // constructing Fortran-style arrays: instead of
// Array<int,2> A(3, 3, FortranArray<2>()); // Array<int,2> A(3, 3, FortranArray<2>());
// one can simply write: // one can simply write:
// Array<int,2> A(3, 3, fortranArray); // Array<int,2> A(3, 3, fortranArray);
// where fortranArray is an object of type _bz_fortranTag. // where fortranArray is an object of type _bz_fortranTag.
skipping to change at line 286 skipping to change at line 256
typedef GeneralArrayStorage<N_rank> T_base; typedef GeneralArrayStorage<N_rank> T_base;
typedef _bz_typename T_base::noInitializeFlag noInitializeFlag; typedef _bz_typename T_base::noInitializeFlag noInitializeFlag;
using T_base::ordering_; using T_base::ordering_;
using T_base::ascendingFlag_; using T_base::ascendingFlag_;
using T_base::base_; using T_base::base_;
public: public:
ColumnMajorArray() ColumnMajorArray()
: GeneralArrayStorage<N_rank>(noInitializeFlag()) : GeneralArrayStorage<N_rank>(noInitializeFlag())
{ {
ordering_ = Range(0, N_rank - 1); ordering_ = Range(0, N_rank - 1);
ascendingFlag_ = _bz_true; ascendingFlag_ = true;
base_ = 0; base_ = 0;
} }
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ARRAY_STORAGE_H #endif // BZ_ARRAY_STORAGE_H
 End of changes. 13 change blocks. 
45 lines changed or deleted 13 lines changed or added


 sum.h   sum.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/meta/sum.h TinyVector sum metaprogram * blitz/meta/sum.h TinyVector sum metaprogram
* *
* $Id: sum.h,v 1.3 2001/01/26 20:34:57 tveldhui Exp $ * $Id: sum.h,v 1.6 2005/05/07 04:17:57 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: sum.h,v $
* Revision 1.3 2001/01/26 20:34:57 tveldhui
* Fixed bug found by Masahiro TATSUMI
*
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:08:44 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_META_SUM_H #ifndef BZ_META_SUM_H
#define BZ_META_SUM_H #define BZ_META_SUM_H
#ifndef BZ_METAPROG_H #ifndef BZ_METAPROG_H
#include <blitz/meta/metaprog.h> #include <blitz/meta/metaprog.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<int N, int I> template<int N, int I>
class _bz_meta_vectorSum { class _bz_meta_vectorSum {
public: public:
enum { loopFlag = (I < N-1) ? 1 : 0 }; static const int loopFlag = (I < N-1) ? 1 : 0;
template<class T_expr1> template<typename T_expr1>
static inline _bz_typename T_expr1::T_numtype static inline _bz_typename T_expr1::T_numtype
f(const T_expr1& a) f(const T_expr1& a)
{ {
return a[I] + return a[I] +
_bz_meta_vectorSum<loopFlag * N, loopFlag * (I+1)>::f(a); _bz_meta_vectorSum<loopFlag * N, loopFlag * (I+1)>::f(a);
} }
}; };
template<> template<>
class _bz_meta_vectorSum<0,0> { class _bz_meta_vectorSum<0,0> {
public: public:
template<class T_expr1> template<typename T_expr1>
static inline _bz_meta_nullOperand f(const T_expr1&) static inline _bz_meta_nullOperand f(const T_expr1&)
{ return _bz_meta_nullOperand(); } { return _bz_meta_nullOperand(); }
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_META_SUM_H #endif // BZ_META_SUM_H
 End of changes. 6 change blocks. 
23 lines changed or deleted 7 lines changed or added


 tau.h   tau.h 
/************************************************************************** * /************************************************************************** *
* blitz/tau.h Integration with the Tau profiling package. * blitz/tau.h Integration with the Tau profiling package.
* See http://www.acl.lanl.gov/tau/ * See http://www.acl.lanl.gov/tau/
* *
* $Id: tau.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: tau.h,v 1.3 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tau.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
*/
#ifndef BZ_TAU_H #ifndef BZ_TAU_H
#define BZ_TAU_H #define BZ_TAU_H
#ifdef BZ_TAU_PROFILING #ifdef BZ_TAU_PROFILING
#define TAU_BLITZ TAU_USER1 #define TAU_BLITZ TAU_USER1
#include <Profile/Profiler.h> #include <Profile/Profiler.h>
#else #else
#define TYPE_STRING(profileString, str) #define TYPE_STRING(profileString, str)
 End of changes. 2 change blocks. 
14 lines changed or deleted 3 lines changed or added


 timer.h   timer.h 
/************************************************************************** * /************************************************************************** *
* blitz/Timer.h Timer class, for use in benchmarking * blitz/Timer.h Timer class, for use in benchmarking
* *
* $Id: timer.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: timer.h,v 1.4 2005/10/10 22:35:30 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: timer.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/
// This class is not portable to non System V platforms. // This class is not portable to non System V platforms.
// It will need to be rewritten for Windows, NT, Mac. // It will need to be rewritten for Windows, NT, Mac.
// NEEDS_WORK // NEEDS_WORK
#ifndef BZ_TIMER_H #ifndef BZ_TIMER_H
#define BZ_TIMER_H #define BZ_TIMER_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
skipping to change at line 83 skipping to change at line 66
t1_ = systemTime(); t1_ = systemTime();
} }
void stop() void stop()
{ {
t2_ = systemTime(); t2_ = systemTime();
BZPRECONDITION(state_ == running); BZPRECONDITION(state_ == running);
state_ = stopped; state_ = stopped;
} }
/* Compaq cxx compiler in ansi mode cannot print out long double type! */
#if defined(__DECCXX)
double elapsedSeconds()
#else
long double elapsedSeconds() long double elapsedSeconds()
#endif
{ {
BZPRECONDITION(state_ == stopped); BZPRECONDITION(state_ == stopped);
return t2_ - t1_; return t2_ - t1_;
} }
private: private:
Timer(Timer&) { } Timer(Timer&) { }
void operator=(Timer&) { } void operator=(Timer&) { }
long double systemTime() long double systemTime()
 End of changes. 4 change blocks. 
20 lines changed or deleted 8 lines changed or added


 tiny.h   tiny.h 
/************************************************************************** * /************************************************************************** *
* blitz/tiny.h Tiny base class; now defunct; delete? * blitz/tiny.h Tiny base class; now defunct; delete?
* *
* $Id: tiny.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: tiny.h,v 1.3 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tiny.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_TINY_H #ifndef BZ_TINY_H
#define BZ_TINY_H #define BZ_TINY_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
 End of changes. 2 change blocks. 
17 lines changed or deleted 3 lines changed or added


 tinymat.h   tinymat.h 
/************************************************************************** * /************************************************************************** *
* blitz/tinymat.h Declaration of TinyMatrix<T, N, M> * blitz/tinymat.h Declaration of TinyMatrix<T, N, M>
* *
* $Id: tinymat.h,v 1.4 2002/06/26 23:52:04 jcumming Exp $ * $Id: tinymat.h,v 1.6 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tinymat.h,v $
* Revision 1.4 2002/06/26 23:52:04 jcumming
* Explicitly specify second template argument for ListInitializationSwitch
,
* rather than relying on the default value. This eliminates a compilation
* problem using the xlC compiler.
*
* Revision 1.3 2002/05/22 22:39:41 jcumming
* Added #include of <blitz/tinymatio.cc>.
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_TINYMAT_H #ifndef BZ_TINYMAT_H
#define BZ_TINYMAT_H #define BZ_TINYMAT_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
#ifndef BZ_TINYVEC_H #ifndef BZ_TINYVEC_H
#include <blitz/tinyvec.h> #include <blitz/tinyvec.h>
skipping to change at line 69 skipping to change at line 47
#ifndef BZ_LISTINIT_H #ifndef BZ_LISTINIT_H
#include <blitz/listinit.h> #include <blitz/listinit.h>
#endif #endif
#include <blitz/tinymatexpr.h> #include <blitz/tinymatexpr.h>
#include <blitz/meta/matassign.h> #include <blitz/meta/matassign.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Forward declarations // Forward declarations
template<class T_expr> template<typename T_expr>
class _bz_tinyMatExpr; class _bz_tinyMatExpr;
template<class T_numtype, int N_rows, int N_columns, int N_rowStride, template<typename T_numtype, int N_rows, int N_columns, int N_rowStride,
int N_colStride> int N_colStride>
class _bz_tinyMatrixRef { class _bz_tinyMatrixRef {
public: public:
_bz_tinyMatrixRef(T_numtype* _bz_restrict const data) _bz_tinyMatrixRef(T_numtype* restrict const data)
: data_(data) : data_(data)
{ } { }
T_numtype * _bz_restrict data() T_numtype * restrict data()
{ return (T_numtype * _bz_restrict)data_; } { return (T_numtype * restrict)data_; }
T_numtype& _bz_restrict operator()(int i, int j) T_numtype& restrict operator()(int i, int j)
{ return data_[i * N_rowStride + j * N_colStride]; } { return data_[i * N_rowStride + j * N_colStride]; }
T_numtype operator()(int i, int j) const T_numtype operator()(int i, int j) const
{ return data_[i * N_rowStride + j * N_colStride]; } { return data_[i * N_rowStride + j * N_colStride]; }
protected: protected:
T_numtype * _bz_restrict const data_; T_numtype * restrict const data_;
}; };
template<class P_numtype, int N_rows, int N_columns> template<typename P_numtype, int N_rows, int N_columns>
class TinyMatrix { class TinyMatrix {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
typedef _bz_tinyMatrixRef<T_numtype, N_rows, N_columns, N_columns, 1> typedef _bz_tinyMatrixRef<T_numtype, N_rows, N_columns, N_columns, 1>
T_reference; T_reference;
typedef TinyMatrix<T_numtype, N_rows, N_columns> T_matrix; typedef TinyMatrix<T_numtype, N_rows, N_columns> T_matrix;
TinyMatrix() { } TinyMatrix() { }
T_numtype* _bz_restrict data() T_numtype* restrict data()
{ return data_; } { return data_; }
const T_numtype* _bz_restrict data() const const T_numtype* restrict data() const
{ return data_; } { return data_; }
T_numtype* _bz_restrict dataFirst() T_numtype* restrict dataFirst()
{ return data_; } { return data_; }
const T_numtype* _bz_restrict dataFirst() const const T_numtype* restrict dataFirst() const
{ return data_; } { return data_; }
// NEEDS_WORK -- precondition checks // NEEDS_WORK -- precondition checks
T_numtype& _bz_restrict operator()(int i, int j) T_numtype& restrict operator()(int i, int j)
{ return data_[i*N_columns + j]; } { return data_[i*N_columns + j]; }
T_numtype operator()(int i, int j) const T_numtype operator()(int i, int j) const
{ return data_[i*N_columns + j]; } { return data_[i*N_columns + j]; }
T_reference getRef() T_reference getRef()
{ return T_reference((T_numtype*)data_); } { return T_reference((T_numtype*)data_); }
const T_reference getRef() const const T_reference getRef() const
{ return T_reference((T_numtype*)data_); } { return T_reference((T_numtype*)data_); }
// Scalar operand // Scalar operand
ListInitializationSwitch<T_matrix,T_numtype*> ListInitializationSwitch<T_matrix,T_numtype*>
operator=(T_numtype x) operator=(T_numtype x)
{ {
return ListInitializationSwitch<T_matrix,T_numtype*>(*this, x); return ListInitializationSwitch<T_matrix,T_numtype*>(*this, x);
} }
template<class T_expr> template<typename T_expr>
TinyMatrix<T_numtype, N_rows, N_columns>& TinyMatrix<T_numtype, N_rows, N_columns>&
operator=(_bz_tinyMatExpr<T_expr> expr) operator=(_bz_tinyMatExpr<T_expr> expr)
{ {
_bz_meta_matAssign<N_rows, N_columns, 0>::f(*this, expr, _bz_meta_matAssign<N_rows, N_columns, 0>::f(*this, expr,
_bz_update<T_numtype, _bz_typename T_expr::T_numtype>()); _bz_update<T_numtype, _bz_typename T_expr::T_numtype>());
return *this; return *this;
} }
void initialize(T_numtype x) void initialize(T_numtype x)
{ {
for (int i=0; i < N_rows; ++i) for (int i=0; i < N_rows; ++i)
for (int j=0; j < N_columns; ++j) for (int j=0; j < N_columns; ++j)
(*this)(i,j) = x; (*this)(i,j) = x;
} }
T_numtype* _bz_restrict getInitializationIterator() T_numtype* restrict getInitializationIterator()
{ return dataFirst(); } { return dataFirst(); }
protected: protected:
T_numtype data_[N_rows * N_columns]; T_numtype data_[N_rows * N_columns];
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#include <blitz/meta/matvec.h> // Matrix-vector product metaprogram #include <blitz/meta/matvec.h> // Matrix-vector product metaprogram
#include <blitz/meta/matmat.h> // Matrix-matrix products #include <blitz/meta/matmat.h> // Matrix-matrix products
 End of changes. 16 change blocks. 
41 lines changed or deleted 18 lines changed or added


 tinymatexpr.h   tinymatexpr.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/tinymatexpr.h Tiny Matrix Expressions * blitz/tinymatexpr.h Tiny Matrix Expressions
* *
* $Id: tinymatexpr.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: tinymatexpr.h,v 1.5 2005/05/07 04:17:56 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tinymatexpr.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_TINYMATEXPR_H #ifndef BZ_TINYMATEXPR_H
#define BZ_TINYMATEXPR_H #define BZ_TINYMATEXPR_H
#ifndef BZ_TINYMAT_H #ifndef BZ_TINYMAT_H
#error <blitz/tinymatexpr.h> must be included via <blitz/tinymat.h> #error <blitz/tinymatexpr.h> must be included via <blitz/tinymat.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T_expr> template<typename T_expr>
class _bz_tinyMatExpr { class _bz_tinyMatExpr {
public: public:
typedef _bz_typename T_expr::T_numtype T_numtype; typedef _bz_typename T_expr::T_numtype T_numtype;
enum { static const int
rows = T_expr::rows, rows = T_expr::rows,
columns = T_expr::columns columns = T_expr::columns;
};
_bz_tinyMatExpr(T_expr expr) _bz_tinyMatExpr(T_expr expr)
: expr_(expr) : expr_(expr)
{ } { }
_bz_tinyMatExpr(const _bz_tinyMatExpr<T_expr>& x) _bz_tinyMatExpr(const _bz_tinyMatExpr<T_expr>& x)
: expr_(x.expr_) : expr_(x.expr_)
{ } { }
T_numtype operator()(int i, int j) const T_numtype operator()(int i, int j) const
 End of changes. 6 change blocks. 
21 lines changed or deleted 7 lines changed or added


 tinymatio.cc   tinymatio.cc 
/* /*
* $Id: tinymatio.cc,v 1.1 2002/05/22 22:38:54 jcumming Exp $
*
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: tinymatio.cc,v $
* Revision 1.1 2002/05/22 22:38:54 jcumming
* I/O operations for blitz TinyMatrix.
*
*
*/ */
#ifndef BZ_TINYMATIO_CC #ifndef BZ_TINYMATIO_CC
#define BZ_TINYMATIO_CC #define BZ_TINYMATIO_CC
#ifndef BZ_TINYMAT_H #ifndef BZ_TINYMAT_H
#include <blitz/tinymat.h> #include <blitz/tinymat.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
 End of changes. 2 change blocks. 
7 lines changed or deleted 0 lines changed or added


 tinyvec-et.h   tinyvec-et.h 
/************************************************************************** * /************************************************************************** *
* blitz/tinyvec-et.h Tinyvector + vector expression templates * blitz/tinyvec-et.h Tinyvector + vector expression templates
* *
* $Id: tinyvec-et.h,v 1.1 2002/07/02 19:27:27 jcumming Exp $ * $Id: tinyvec-et.h,v 1.2 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2000 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2000 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tinyvec-et.h,v $
* Revision 1.1 2002/07/02 19:27:27 jcumming
* This is the new name for the TinyVec.h file, which includes the TinyVect
or class implementation and ET support using the old style expression templ
ates.
*
* Revision 1.1 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.1 2001/01/24 22:51:50 tveldhui
* Reorganized #include orders to avoid including the huge Vector e.t.
* implementation when using Array.
*
*/
#ifndef BZ_TINYVEC_ET_H #ifndef BZ_TINYVEC_ET_H
#define BZ_TINYVEC_ET_H #define BZ_TINYVEC_ET_H
#include <blitz/tinyvec.h> #include <blitz/tinyvec.h>
#include <blitz/vector-et.h> // vector expressions #include <blitz/vector-et.h> // vector expressions
#endif // BZ_TINYVEC_ET_H #endif // BZ_TINYVEC_ET_H
 End of changes. 2 change blocks. 
17 lines changed or deleted 3 lines changed or added


 tinyvec.cc   tinyvec.cc 
/************************************************************************** * /************************************************************************** *
* blitz/tinyvec.cc Declaration of TinyVector methods * blitz/tinyvec.cc Declaration of TinyVector methods
* *
* $Id: tinyvec.cc,v 1.4 2002/06/27 00:09:37 jcumming Exp $ * $Id: tinyvec.cc,v 1.9 2005/10/17 21:43:45 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tinyvec.cc,v $
* Revision 1.4 2002/06/27 00:09:37 jcumming
* Changed T_numtype to P_numtype when used outside the argument list or bo
dy
* of a member function definition (i.e., outside the class scope). Inside
* the class scope, we can use the typedef T_numtype. The IBM xlC compiler
* gets confused if P_numtype is used as a template parameter name in a mem
ber
* function declaration and then T_numtype is used as the parameter name in
* the member function definition. Fixed usage to be more consistent.
*
* Revision 1.3 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_TINYVEC_CC #ifndef BZ_TINYVEC_CC
#define BZ_TINYVEC_CC #define BZ_TINYVEC_CC
#ifndef BZ_TINYVEC_H #include <blitz/tinyvec.h>
#include <blitz/tinyvec.h> #include <blitz/vector.h>
#endif #include <blitz/range.h>
#ifndef BZ_VECTOR_H
#include <blitz/vector.h>
#endif
#ifndef BZ_RANGE_H
#include <blitz/range.h>
#endif
#include <blitz/meta/vecassign.h> #include <blitz/meta/vecassign.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>::TinyVector(T_numtype initValue) inline TinyVector<P_numtype, N_length>::TinyVector(const T_numtype initValu
{ e) {
for (int i=0; i < N_length; ++i) for (int i=0; i < N_length; ++i)
data_[i] = initValue; data_[i] = initValue;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>::TinyVector(const inline TinyVector<P_numtype, N_length>::TinyVector(const TinyVector<T_numty
TinyVector<T_numtype, N_length>& x) pe, N_length>& x) {
{
for (int i=0; i < N_length; ++i) for (int i=0; i < N_length; ++i)
data_[i] = x.data_[i]; data_[i] = x.data_[i];
} }
template<class P_numtype, int N_length> template<class P_expr, class P_upda template<typename P_numtype, int N_length>
ter> template<typename P_numtype2>
inline inline TinyVector<P_numtype, N_length>::TinyVector(const TinyVector<P_numty
void TinyVector<P_numtype, N_length>::_bz_assign(P_expr expr, P_updater up) pe2, N_length>& x) {
{ for (int i=0; i < N_length; ++i)
data_[i] = static_cast<P_numtype>(x[i]);
}
template<typename P_numtype, int N_length>
template<typename P_expr, typename P_updater>
inline void TinyVector<P_numtype, N_length>::_bz_assign(P_expr expr, P_upda
ter up) {
BZPRECHECK(expr.length(N_length) == N_length, BZPRECHECK(expr.length(N_length) == N_length,
"An expression with length " << expr.length(N_length) "An expression with length " << expr.length(N_length)
<< " was assigned to a TinyVector<" << " was assigned to a TinyVector<"
<< BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype) << BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype)
<< "," << N_length << ">"); << "," << N_length << ">");
if (expr._bz_hasFastAccess()) if (expr._bz_hasFastAccess()) {
{
_bz_meta_vecAssign<N_length, 0>::fastAssign(*this, expr, up); _bz_meta_vecAssign<N_length, 0>::fastAssign(*this, expr, up);
} } else {
else {
_bz_meta_vecAssign<N_length, 0>::assign(*this, expr, up); _bz_meta_vecAssign<N_length, 0>::assign(*this, expr, up);
} }
} }
// Constructor added by Peter Nordlund (peter.nordlund@ind.af.se) // Constructor added by Peter Nordlund (peter.nordlund@ind.af.se)
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>::TinyVector(_bz_VecExpr<P_expr> expr ) inline TinyVector<P_numtype, N_length>::TinyVector(_bz_VecExpr<P_expr> expr )
{ {
_bz_assign(expr, _bz_update<T_numtype, _bz_typename P_expr::T_numtype>()) ; _bz_assign(expr, _bz_update<T_numtype, _bz_typename P_expr::T_numtype>()) ;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with vector expression operand * Assignment operators with vector expression operand
*/ */
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_update<T_numtype, _bz_typename P_expr::T_numtype>( )); _bz_assign(expr, _bz_update<T_numtype, _bz_typename P_expr::T_numtype>( ));
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator+=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator+=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_plus_update<T_numtype, _bz_assign(expr, _bz_plus_update<T_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator-=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator-=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_minus_update<T_numtype, _bz_assign(expr, _bz_minus_update<T_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator*=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator*=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_multiply_update<T_numtype, _bz_assign(expr, _bz_multiply_update<T_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator/=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator/=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_divide_update<T_numtype, _bz_assign(expr, _bz_divide_update<T_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator%=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator%=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_mod_update<T_numtype, _bz_assign(expr, _bz_mod_update<T_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator^=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator^=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_xor_update<T_numtype, _bz_assign(expr, _bz_xor_update<T_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator&=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator&=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_bitand_update<T_numtype, _bz_assign(expr, _bz_bitand_update<T_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator|=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator|=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_bitor_update<T_numtype, _bz_assign(expr, _bz_bitor_update<T_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator<<=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator<<=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_shiftl_update<T_numtype, _bz_assign(expr, _bz_shiftl_update<T_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_expr> template<typename P_numtype, int N_length> template<typename P_expr>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator>>=(_bz_VecExpr<P_expr> expr) TinyVector<P_numtype, N_length>::operator>>=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_shiftr_update<T_numtype, _bz_assign(expr, _bz_shiftr_update<T_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with scalar operand * Assignment operators with scalar operand
*/ */
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::initialize(T_numtype x) TinyVector<P_numtype, N_length>::initialize(const T_numtype x)
{ {
#ifndef BZ_KCC_COPY_PROPAGATION_KLUDGE #ifndef BZ_KCC_COPY_PROPAGATION_KLUDGE
typedef _bz_VecExprConstant<T_numtype> T_expr; typedef _bz_VecExprConstant<T_numtype> T_expr;
(*this) = _bz_VecExpr<T_expr>(T_expr(x)); (*this) = _bz_VecExpr<T_expr>(T_expr(x));
#else #else
// Avoid using the copy propagation kludge for this simple // Avoid using the copy propagation kludge for this simple
// operation. // operation.
for (int i=0; i < N_length; ++i) for (int i=0; i < N_length; ++i)
data_[i] = x; data_[i] = x;
#endif #endif
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator+=(T_numtype x) TinyVector<P_numtype, N_length>::operator+=(const T_numtype x)
{ {
typedef _bz_VecExprConstant<T_numtype> T_expr; typedef _bz_VecExprConstant<T_numtype> T_expr;
(*this) += _bz_VecExpr<T_expr>(T_expr(x)); (*this) += _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator-=(T_numtype x) TinyVector<P_numtype, N_length>::operator-=(const T_numtype x)
{ {
typedef _bz_VecExprConstant<T_numtype> T_expr; typedef _bz_VecExprConstant<T_numtype> T_expr;
(*this) -= _bz_VecExpr<T_expr>(T_expr(x)); (*this) -= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator*=(T_numtype x) TinyVector<P_numtype, N_length>::operator*=(const T_numtype x)
{ {
typedef _bz_VecExprConstant<T_numtype> T_expr; typedef _bz_VecExprConstant<T_numtype> T_expr;
(*this) *= _bz_VecExpr<T_expr>(T_expr(x)); (*this) *= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator/=(T_numtype x) TinyVector<P_numtype, N_length>::operator/=(const T_numtype x)
{ {
typedef _bz_VecExprConstant<T_numtype> T_expr; typedef _bz_VecExprConstant<T_numtype> T_expr;
(*this) /= _bz_VecExpr<T_expr>(T_expr(x)); (*this) /= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator%=(T_numtype x) TinyVector<P_numtype, N_length>::operator%=(const T_numtype x)
{ {
typedef _bz_VecExprConstant<T_numtype> T_expr; typedef _bz_VecExprConstant<T_numtype> T_expr;
(*this) %= _bz_VecExpr<T_expr>(T_expr(x)); (*this) %= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator^=(T_numtype x) TinyVector<P_numtype, N_length>::operator^=(const T_numtype x)
{ {
typedef _bz_VecExprConstant<T_numtype> T_expr; typedef _bz_VecExprConstant<T_numtype> T_expr;
(*this) ^= _bz_VecExpr<T_expr>(T_expr(x)); (*this) ^= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator&=(T_numtype x) TinyVector<P_numtype, N_length>::operator&=(const T_numtype x)
{ {
typedef _bz_VecExprConstant<T_numtype> T_expr; typedef _bz_VecExprConstant<T_numtype> T_expr;
(*this) &= _bz_VecExpr<T_expr>(T_expr(x)); (*this) &= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator|=(T_numtype x) TinyVector<P_numtype, N_length>::operator|=(const T_numtype x)
{ {
typedef _bz_VecExprConstant<T_numtype> T_expr; typedef _bz_VecExprConstant<T_numtype> T_expr;
(*this) |= _bz_VecExpr<T_expr>(T_expr(x)); (*this) |= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator<<=(int x) TinyVector<P_numtype, N_length>::operator<<=(const int x)
{ {
typedef _bz_VecExprConstant<int> T_expr; typedef _bz_VecExprConstant<int> T_expr;
(*this) <<= _bz_VecExpr<T_expr>(T_expr(x)); (*this) <<= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator>>=(int x) TinyVector<P_numtype, N_length>::operator>>=(const int x)
{ {
typedef _bz_VecExprConstant<int> T_expr; typedef _bz_VecExprConstant<int> T_expr;
(*this) >>= _bz_VecExpr<T_expr>(T_expr(x)); (*this) >>= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with TinyVector operand * Assignment operators with TinyVector operand
*/ */
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator=(const TinyVector<P_numtype, N_length>::operator=(const TinyVector<P_numtype2, N_l
TinyVector<P_numtype2, N_length>& x) ength>& x) {
{
(*this) = _bz_VecExpr<_bz_typename (*this) = _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator+=(const TinyVector<P_numtype, N_length>::operator+=(const TinyVector<P_numtype2, N_
TinyVector<P_numtype2, N_length>& x) length>& x) {
{
(*this) += _bz_VecExpr<_bz_typename (*this) += _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator-=(const TinyVector<P_numtype, N_length>::operator-=(const TinyVector<P_numtype2, N_
TinyVector<P_numtype2, N_length>& x) length>& x) {
{
(*this) -= _bz_VecExpr<_bz_typename (*this) -= _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator*=(const TinyVector<P_numtype, N_length>::operator*=(const TinyVector<P_numtype2, N_
TinyVector<P_numtype2, N_length>& x) length>& x) {
{
(*this) *= _bz_VecExpr<_bz_typename (*this) *= _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator/=(const TinyVector<P_numtype, N_length>::operator/=(const TinyVector<P_numtype2, N_
TinyVector<P_numtype2, N_length>& x) length>& x) {
{
(*this) /= _bz_VecExpr<_bz_typename (*this) /= _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator%=(const TinyVector<P_numtype, N_length>::operator%=(const TinyVector<P_numtype2, N_
TinyVector<P_numtype2, N_length>& x) length>& x) {
{
(*this) %= _bz_VecExpr<_bz_typename (*this) %= _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator^=(const TinyVector<P_numtype, N_length>::operator^=(const TinyVector<P_numtype2, N_
TinyVector<P_numtype2, N_length>& x) length>& x) {
{
(*this) ^= _bz_VecExpr<_bz_typename (*this) ^= _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator&=(const TinyVector<P_numtype, N_length>::operator&=(const TinyVector<P_numtype2, N_
TinyVector<P_numtype2, N_length>& x) length>& x) {
{
(*this) &= _bz_VecExpr<_bz_typename (*this) &= _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator|=(const TinyVector<P_numtype, N_length>::operator|=(const TinyVector<P_numtype2, N_
TinyVector<P_numtype2, N_length>& x) length>& x) {
{
(*this) |= _bz_VecExpr<_bz_typename (*this) |= _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator<<=(const TinyVector<P_numtype, N_length>::operator<<=(const TinyVector<P_numtype2, N
TinyVector<P_numtype2, N_length>& x) _length>& x) {
{
(*this) <<= _bz_VecExpr<_bz_typename (*this) <<= _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator>>=(const TinyVector<P_numtype, N_length>::operator>>=(const TinyVector<P_numtype2, N
TinyVector<P_numtype2, N_length>& x) _length>& x) {
{
(*this) >>= _bz_VecExpr<_bz_typename (*this) >>= _bz_VecExpr<_bz_typename
TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); TinyVector<P_numtype2, N_length>::T_constIterator>(x.beginFast());
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with Vector operand * Assignment operators with Vector operand
*/ */
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator=(const Vector<P_numtype2>& x) {
{
(*this) = x._bz_asVecExpr(); (*this) = x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator+=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator+=(const Vector<P_numtype2>& x) {
{
(*this) += x._bz_asVecExpr(); (*this) += x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator-=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator-=(const Vector<P_numtype2>& x) {
{
(*this) -= x._bz_asVecExpr(); (*this) -= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator*=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator*=(const Vector<P_numtype2>& x) {
{
(*this) *= x._bz_asVecExpr(); (*this) *= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator/=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator/=(const Vector<P_numtype2>& x) {
{
(*this) /= x._bz_asVecExpr(); (*this) /= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator%=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator%=(const Vector<P_numtype2>& x) {
{
(*this) %= x._bz_asVecExpr(); (*this) %= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator^=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator^=(const Vector<P_numtype2>& x) {
{
(*this) ^= x._bz_asVecExpr(); (*this) ^= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator&=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator&=(const Vector<P_numtype2>& x) {
{
(*this) &= x._bz_asVecExpr(); (*this) &= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator|=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator|=(const Vector<P_numtype2>& x) {
{
(*this) |= x._bz_asVecExpr(); (*this) |= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator<<=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator<<=(const Vector<P_numtype2>& x) {
{
(*this) <<= x._bz_asVecExpr(); (*this) <<= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator>>=(const Vector<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator>>=(const Vector<P_numtype2>& x) {
{
(*this) >>= x._bz_asVecExpr(); (*this) >>= x._bz_asVecExpr();
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with Range operand * Assignment operators with Range operand
*/ */
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator=(Range r) TinyVector<P_numtype, N_length>::operator=(const Range& r) {
{
(*this) = r._bz_asVecExpr(); (*this) = r._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator+=(Range r) TinyVector<P_numtype, N_length>::operator+=(const Range& r) {
{
(*this) += r._bz_asVecExpr(); (*this) += r._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator-=(Range r) TinyVector<P_numtype, N_length>::operator-=(const Range& r) {
{
(*this) -= r._bz_asVecExpr(); (*this) -= r._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator*=(Range r) TinyVector<P_numtype, N_length>::operator*=(const Range& r) {
{
(*this) *= r._bz_asVecExpr(); (*this) *= r._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator/=(Range r) TinyVector<P_numtype, N_length>::operator/=(const Range& r) {
{
(*this) /= r._bz_asVecExpr(); (*this) /= r._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator%=(Range r) TinyVector<P_numtype, N_length>::operator%=(const Range& r) {
{
(*this) %= r._bz_asVecExpr(); (*this) %= r._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator^=(Range r) TinyVector<P_numtype, N_length>::operator^=(const Range& r) {
{
(*this) ^= r._bz_asVecExpr(); (*this) ^= r._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator&=(Range r) TinyVector<P_numtype, N_length>::operator&=(const Range& r) {
{
(*this) &= r._bz_asVecExpr(); (*this) &= r._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator|=(Range r) TinyVector<P_numtype, N_length>::operator|=(const Range& r) {
{
(*this) |= r._bz_asVecExpr(); (*this) |= r._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator<<=(Range r) TinyVector<P_numtype, N_length>::operator<<=(const Range& r) {
{
(*this) <<= r._bz_asVecExpr(); (*this) <<= r._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator>>=(Range r) TinyVector<P_numtype, N_length>::operator>>=(const Range& r) {
{
(*this) >>= r._bz_asVecExpr(); (*this) >>= r._bz_asVecExpr();
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with VectorPick operand * Assignment operators with VectorPick operand
*/ */
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator=(const VectorPick<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator=(const VectorPick<P_numtype2>& x)
{ {
(*this) = x._bz_asVecExpr(); (*this) = x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator+=(const VectorPick<P_numtype2>& x ) TinyVector<P_numtype, N_length>::operator+=(const VectorPick<P_numtype2>& x )
{ {
(*this) += x._bz_asVecExpr(); (*this) += x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator-=(const VectorPick<P_numtype2>& x ) TinyVector<P_numtype, N_length>::operator-=(const VectorPick<P_numtype2>& x )
{ {
(*this) -= x._bz_asVecExpr(); (*this) -= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator*=(const VectorPick<P_numtype2>& x ) TinyVector<P_numtype, N_length>::operator*=(const VectorPick<P_numtype2>& x )
{ {
(*this) *= x._bz_asVecExpr(); (*this) *= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator/=(const VectorPick<P_numtype2>& x ) TinyVector<P_numtype, N_length>::operator/=(const VectorPick<P_numtype2>& x )
{ {
(*this) /= x._bz_asVecExpr(); (*this) /= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator%=(const VectorPick<P_numtype2>& x ) TinyVector<P_numtype, N_length>::operator%=(const VectorPick<P_numtype2>& x )
{ {
(*this) %= x._bz_asVecExpr(); (*this) %= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator^=(const VectorPick<P_numtype2>& x ) TinyVector<P_numtype, N_length>::operator^=(const VectorPick<P_numtype2>& x )
{ {
(*this) ^= x._bz_asVecExpr(); (*this) ^= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator&=(const VectorPick<P_numtype2>& x ) TinyVector<P_numtype, N_length>::operator&=(const VectorPick<P_numtype2>& x )
{ {
(*this) &= x._bz_asVecExpr(); (*this) &= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator|=(const VectorPick<P_numtype2>& x ) TinyVector<P_numtype, N_length>::operator|=(const VectorPick<P_numtype2>& x )
{ {
(*this) |= x._bz_asVecExpr(); (*this) |= x._bz_asVecExpr();
return *this; return *this;
} }
template<class P_numtype, int N_length> template<class P_numtype2> template<typename P_numtype, int N_length> template<typename P_numtype2>
inline TinyVector<P_numtype, N_length>& inline TinyVector<P_numtype, N_length>&
TinyVector<P_numtype, N_length>::operator>>=(const VectorPick<P_numtype2>& x) TinyVector<P_numtype, N_length>::operator>>=(const VectorPick<P_numtype2>& x)
{ {
(*this) <<= x._bz_asVecExpr(); (*this) <<= x._bz_asVecExpr();
return *this; return *this;
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_TINYVEC_CC #endif // BZ_TINYVEC_CC
 End of changes. 129 change blocks. 
211 lines changed or deleted 158 lines changed or added


 tinyvec.h   tinyvec.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/tinyvec.h Declaration of the TinyVector<T, N> class * blitz/tinyvec.h Declaration of the TinyVector<T, N> class
* *
* $Id: tinyvec.h,v 1.5 2002/06/28 01:27:41 jcumming Exp $ * $Id: tinyvec.h,v 1.9 2005/10/06 23:23:40 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tinyvec.h,v $
* Revision 1.5 2002/06/28 01:27:41 jcumming
* Changed return type of lengthCheck() method from int to _bz_bool.
*
* Revision 1.4 2002/06/27 00:31:42 jcumming
* Changed P_numtype to T_numtype inside class definition consistently.
*
* Revision 1.3 2002/06/26 23:51:13 jcumming
* Explicitly specify second template argument for ListInitializationSwitch
,
* rather than relying on the default value. This eliminates a compilation
* problem using the xlC compiler.
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_TINYVEC_H #ifndef BZ_TINYVEC_H
#define BZ_TINYVEC_H #define BZ_TINYVEC_H
#ifndef BZ_BLITZ_H #include <blitz/blitz.h>
#include <blitz/blitz.h> #include <blitz/range.h>
#endif #include <blitz/listinit.h>
#ifndef BZ_RANGE_H
#include <blitz/range.h>
#endif
#ifndef BZ_LISTINIT_H
#include <blitz/listinit.h>
#endif
#include <blitz/tiny.h> #include <blitz/tiny.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/************************************************************************** *** /************************************************************************** ***
* Forward declarations * Forward declarations
*/ */
template<class P_numtype, int N_length, int N_stride BZ_TEMPLATE_DEFAULT(1) > template<typename P_numtype, int N_length, int N_stride BZ_TEMPLATE_DEFAULT (1) >
class TinyVectorIter; class TinyVectorIter;
template<class P_numtype, int N_length, int N_stride BZ_TEMPLATE_DEFAULT(1) > template<typename P_numtype, int N_length, int N_stride BZ_TEMPLATE_DEFAULT (1) >
class TinyVectorIterConst; class TinyVectorIterConst;
template<class P_numtype> template<typename P_numtype>
class Vector; class Vector;
template<class P_expr> template<typename P_expr>
class _bz_VecExpr; class _bz_VecExpr;
template<class P_distribution> template<typename P_distribution>
class Random; class Random;
template<class P_numtype> template<typename P_numtype>
class VectorPick; class VectorPick;
template<class T_numtype1, class T_numtype2, int N_rows, int N_columns, template<typename T_numtype1, typename T_numtype2, int N_rows, int N_column s,
int N_vecStride> int N_vecStride>
class _bz_matrixVectorProduct; class _bz_matrixVectorProduct;
/************************************************************************** *** /************************************************************************** ***
* Declaration of class TinyVector * Declaration of class TinyVector
*/ */
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
class TinyVector { class TinyVector {
public: public:
////////////////////////////////////////////// //////////////////////////////////////////////
// Public Types // Public Types
////////////////////////////////////////////// //////////////////////////////////////////////
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
typedef TinyVector<T_numtype,N_length> T_vector; typedef TinyVector<T_numtype,N_length> T_vector;
typedef TinyVectorIter<T_numtype,N_length,1> T_iterator; typedef TinyVectorIter<T_numtype,N_length,1> T_iterator;
typedef TinyVectorIterConst<T_numtype,N_length,1> T_constIterator; typedef TinyVectorIterConst<T_numtype,N_length,1> T_constIterator;
typedef T_iterator iterator; typedef T_numtype* iterator;
typedef T_constIterator const_iterator; typedef const T_numtype* const_iterator;
enum { numElements = N_length }; enum { numElements = N_length };
TinyVector() TinyVector() { }
{ } ~TinyVector() { }
~TinyVector()
{ }
inline TinyVector(const TinyVector<T_numtype,N_length>& x); inline TinyVector(const TinyVector<T_numtype,N_length>& x);
inline TinyVector(T_numtype initValue); template <typename T_numtype2>
inline TinyVector(const TinyVector<T_numtype2,N_length>& x);
inline TinyVector(const T_numtype initValue);
inline TinyVector(const T_numtype x[]) {
memcpy(data_,x,N_length*sizeof(T_numtype));
}
TinyVector(T_numtype x0, T_numtype x1) TinyVector(T_numtype x0, T_numtype x1)
{ {
data_[0] = x0; data_[0] = x0;
data_[1] = x1; data_[1] = x1;
} }
TinyVector(T_numtype x0, T_numtype x1, T_numtype x2) TinyVector(T_numtype x0, T_numtype x1, T_numtype x2)
{ {
data_[0] = x0; data_[0] = x0;
skipping to change at line 244 skipping to change at line 215
data_[4] = x4; data_[4] = x4;
data_[5] = x5; data_[5] = x5;
data_[6] = x6; data_[6] = x6;
data_[7] = x7; data_[7] = x7;
data_[8] = x8; data_[8] = x8;
data_[9] = x9; data_[9] = x9;
data_[10] = x10; data_[10] = x10;
} }
// Constructor added by Peter Nordlund // Constructor added by Peter Nordlund
template<class P_expr> template<typename P_expr>
inline TinyVector(_bz_VecExpr<P_expr> expr); inline TinyVector(_bz_VecExpr<P_expr> expr);
T_iterator begin() T_iterator beginFast() { return T_iterator(*this); }
{ return T_iterator(*this); } T_constIterator beginFast() const { return T_constIterator(*this); }
T_constIterator begin() const iterator begin() { return data_; }
{ return T_constIterator(*this); } const_iterator begin() const { return data_; }
// T_iterator end(); iterator end() { return data_ + N_length; }
// T_constIterator end() const; const_iterator end() const { return data_ + N_length; }
T_numtype * _bz_restrict data() T_numtype * restrict data()
{ return data_; } { return data_; }
const T_numtype * _bz_restrict data() const const T_numtype * restrict data() const
{ return data_; } { return data_; }
T_numtype * _bz_restrict dataFirst() T_numtype * restrict dataFirst()
{ return data_; } { return data_; }
const T_numtype * _bz_restrict dataFirst() const const T_numtype * restrict dataFirst() const
{ return data_; } { return data_; }
unsigned length() const unsigned length() const
{ return N_length; } { return N_length; }
///////////////////////////////////////////// /////////////////////////////////////////////
// Library-internal member functions // Library-internal member functions
// These are undocumented and may change or // These are undocumented and may change or
// disappear in future releases. // disappear in future releases.
///////////////////////////////////////////// /////////////////////////////////////////////
unsigned _bz_suggestLength() const unsigned _bz_suggestLength() const
{ return N_length; } { return N_length; }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return _bz_true; } { return true; }
T_numtype& _bz_restrict _bz_fastAccess(unsigned i) T_numtype& restrict _bz_fastAccess(unsigned i)
{ return data_[i]; } { return data_[i]; }
T_numtype _bz_fastAccess(unsigned i) const T_numtype _bz_fastAccess(unsigned i) const
{ return data_[i]; } { return data_[i]; }
template<class P_expr, class P_updater> template<typename P_expr, typename P_updater>
void _bz_assign(P_expr, P_updater); void _bz_assign(P_expr, P_updater);
_bz_VecExpr<T_constIterator> _bz_asVecExpr() const _bz_VecExpr<T_constIterator> _bz_asVecExpr() const
{ return _bz_VecExpr<T_constIterator>(begin()); } { return _bz_VecExpr<T_constIterator>(beginFast()); }
////////////////////////////////////////////// //////////////////////////////////////////////
// Subscripting operators // Subscripting operators
////////////////////////////////////////////// //////////////////////////////////////////////
_bz_bool lengthCheck(unsigned i) const bool lengthCheck(unsigned i) const
{ {
BZPRECHECK(i < N_length, BZPRECHECK(i < N_length,
"TinyVector<" << BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype) "TinyVector<" << BZ_DEBUG_TEMPLATE_AS_STRING_LITERAL(T_numtype)
<< "," << N_length << "> index out of bounds: " << i); << "," << N_length << "> index out of bounds: " << i);
return _bz_true; return true;
} }
T_numtype operator()(unsigned i) const const T_numtype& operator()(unsigned i) const
{ {
BZPRECONDITION(lengthCheck(i)); BZPRECONDITION(lengthCheck(i));
return data_[i]; return data_[i];
} }
T_numtype& _bz_restrict operator()(unsigned i) T_numtype& restrict operator()(unsigned i)
{ {
BZPRECONDITION(lengthCheck(i)); BZPRECONDITION(lengthCheck(i));
return data_[i]; return data_[i];
} }
T_numtype operator[](unsigned i) const const T_numtype& operator[](unsigned i) const
{ {
BZPRECONDITION(lengthCheck(i)); BZPRECONDITION(lengthCheck(i));
return data_[i]; return data_[i];
} }
T_numtype& _bz_restrict operator[](unsigned i) T_numtype& restrict operator[](unsigned i)
{ {
BZPRECONDITION(lengthCheck(i)); BZPRECONDITION(lengthCheck(i));
return data_[i]; return data_[i];
} }
////////////////////////////////////////////// //////////////////////////////////////////////
// Assignment operators // Assignment operators
////////////////////////////////////////////// //////////////////////////////////////////////
// Scalar operand // Scalar operand
ListInitializationSwitch<T_vector,T_numtype*> operator=(T_numtype x) ListInitializationSwitch<T_vector,T_numtype*> operator=(T_numtype x)
{ {
return ListInitializationSwitch<T_vector,T_numtype*>(*this, x); return ListInitializationSwitch<T_vector,T_numtype*>(*this, x);
} }
T_vector& initialize(T_numtype); T_vector& initialize(const T_numtype);
T_vector& operator+=(T_numtype); T_vector& operator+=(const T_numtype);
T_vector& operator-=(T_numtype); T_vector& operator-=(const T_numtype);
T_vector& operator*=(T_numtype); T_vector& operator*=(const T_numtype);
T_vector& operator/=(T_numtype); T_vector& operator/=(const T_numtype);
T_vector& operator%=(T_numtype); T_vector& operator%=(const T_numtype);
T_vector& operator^=(T_numtype); T_vector& operator^=(const T_numtype);
T_vector& operator&=(T_numtype); T_vector& operator&=(const T_numtype);
T_vector& operator|=(T_numtype); T_vector& operator|=(const T_numtype);
T_vector& operator>>=(int); T_vector& operator>>=(const int);
T_vector& operator<<=(int); T_vector& operator<<=(const int);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator=(const TinyVector<P_numtype2, N_length> &); T_vector& operator=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator+=(const TinyVector<P_numtype2, N_length> &); T_vector& operator+=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator-=(const TinyVector<P_numtype2, N_length> &); T_vector& operator-=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator*=(const TinyVector<P_numtype2, N_length> &); T_vector& operator*=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator/=(const TinyVector<P_numtype2, N_length> &); T_vector& operator/=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator%=(const TinyVector<P_numtype2, N_length> &); T_vector& operator%=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator^=(const TinyVector<P_numtype2, N_length> &); T_vector& operator^=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator&=(const TinyVector<P_numtype2, N_length> &); T_vector& operator&=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator|=(const TinyVector<P_numtype2, N_length> &); T_vector& operator|=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator>>=(const TinyVector<P_numtype2, N_length> &); T_vector& operator>>=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator<<=(const TinyVector<P_numtype2, N_length> &); T_vector& operator<<=(const TinyVector<P_numtype2, N_length> &);
template<class P_numtype2> T_vector& operator=(const Vector<P_numtype2> template<typename P_numtype2> T_vector& operator=(const Vector<P_numtyp
&); e2> &);
template<class P_numtype2> T_vector& operator+=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator+=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator-=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator-=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator*=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator*=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator/=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator/=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator%=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator%=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator^=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator^=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator&=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator&=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator|=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator|=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator>>=(const Vector<P_numtype template<typename P_numtype2> T_vector& operator>>=(const Vector<P_numt
2> &); ype2> &);
template<class P_numtype2> T_vector& operator<<=(const Vector<P_numtype template<typename P_numtype2> T_vector& operator<<=(const Vector<P_numt
2> &); ype2> &);
// Vector expression operand // Vector expression operand
template<class P_expr> T_vector& operator=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator+=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator+=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator-=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator-=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator*=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator*=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator/=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator/=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator%=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator%=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator^=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator^=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator&=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator&=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator|=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator|=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator>>=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator>>=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator<<=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator<<=(_bz_VecExpr<P_expr>);
// VectorPick operand // VectorPick operand
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator=(const VectorPick<P_numtype2> &); T_vector& operator=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator+=(const VectorPick<P_numtype2> &); T_vector& operator+=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator-=(const VectorPick<P_numtype2> &); T_vector& operator-=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator*=(const VectorPick<P_numtype2> &); T_vector& operator*=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator/=(const VectorPick<P_numtype2> &); T_vector& operator/=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator%=(const VectorPick<P_numtype2> &); T_vector& operator%=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator^=(const VectorPick<P_numtype2> &); T_vector& operator^=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator&=(const VectorPick<P_numtype2> &); T_vector& operator&=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator|=(const VectorPick<P_numtype2> &); T_vector& operator|=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator>>=(const VectorPick<P_numtype2> &); T_vector& operator>>=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator<<=(const VectorPick<P_numtype2> &); T_vector& operator<<=(const VectorPick<P_numtype2> &);
// Range operand // Range operand
T_vector& operator=(Range); T_vector& operator=(const Range&);
T_vector& operator+=(Range); T_vector& operator+=(const Range&);
T_vector& operator-=(Range); T_vector& operator-=(const Range&);
T_vector& operator*=(Range); T_vector& operator*=(const Range&);
T_vector& operator/=(Range); T_vector& operator/=(const Range&);
T_vector& operator%=(Range); T_vector& operator%=(const Range&);
T_vector& operator^=(Range); T_vector& operator^=(const Range&);
T_vector& operator&=(Range); T_vector& operator&=(const Range&);
T_vector& operator|=(Range); T_vector& operator|=(const Range&);
T_vector& operator>>=(Range); T_vector& operator>>=(const Range&);
T_vector& operator<<=(Range); T_vector& operator<<=(const Range&);
T_numtype* _bz_restrict getInitializationIterator() T_numtype* restrict getInitializationIterator()
{ return dataFirst(); } { return dataFirst(); }
private: private:
T_numtype data_[N_length]; T_numtype data_[N_length];
}; };
// Specialization for N = 0: KCC is giving some // Specialization for N = 0: KCC is giving some
// peculiar errors, perhaps this will fix. // peculiar errors, perhaps this will fix.
template<class T> template<typename T>
class TinyVector<T,0> { class TinyVector<T,0> {
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#include <blitz/tinyveciter.h> // Iterators #include <blitz/tinyveciter.h> // Iterators
#include <blitz/tvecglobs.h> // Global functions #include <blitz/tvecglobs.h> // Global functions
#include <blitz/vector.h> // Expression templates #include <blitz/vector.h> // Expression templates
#include <blitz/tinyvec.cc> // Member functions #include <blitz/tinyvec.cc> // Member functions
#include <blitz/tinyvecio.cc> // I/O functions #include <blitz/tinyvecio.cc> // I/O functions
 End of changes. 65 change blocks. 
161 lines changed or deleted 131 lines changed or added


 tinyvecio.cc   tinyvecio.cc 
/* /*
* $Id: tinyvecio.cc,v 1.1.1.1 2000/06/19 12:26:12 tveldhui Exp $ * $Id: tinyvecio.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: tinyvecio.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/ */
#ifndef BZ_TINYVECIO_CC #ifndef BZ_TINYVECIO_CC
#define BZ_TINYVECIO_CC #define BZ_TINYVECIO_CC
#ifndef BZ_TINYVEC_H #ifndef BZ_TINYVEC_H
#include <blitz/tinyvec.h> #include <blitz/tinyvec.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// NEEDS_WORK // NEEDS_WORK
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
ostream& operator<<(ostream& os, const TinyVector<P_numtype, N_length>& x) ostream& operator<<(ostream& os, const TinyVector<P_numtype, N_length>& x)
{ {
os << N_length << " [ "; os << N_length << " [ ";
for (int i=0; i < N_length; ++i) for (int i=0; i < N_length; ++i)
{ {
os << setw(10) << x[i]; os << setw(10) << x[i];
if (!((i+1)%7)) if (!((i+1)%7))
os << endl << " "; os << endl << " ";
} }
os << " ]"; os << " ]";
 End of changes. 3 change blocks. 
12 lines changed or deleted 2 lines changed or added


 tinyveciter.h   tinyveciter.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/tinyveciter.h Declaration of TinyVectorIter<T,N,stride> * blitz/tinyveciter.h Declaration of TinyVectorIter<T,N,stride>
* *
* $Id: tinyveciter.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: tinyveciter.h,v 1.6 2005/05/07 04:17:56 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tinyveciter.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_TINYVECITER_H #ifndef BZ_TINYVECITER_H
#define BZ_TINYVECITER_H #define BZ_TINYVECITER_H
#ifndef BZ_TINYVEC_H #ifndef BZ_TINYVEC_H
#include <blitz/tinyvec.h> #include <blitz/tinyvec.h>
#endif #endif
#ifndef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR #ifndef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
#error "Debug in tinyveciter.h (this line shouldn't be here)" #error "Debug in tinyveciter.h (this line shouldn't be here)"
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// N_stride has default 1, in forward declaration in <blitz/tinyvec.h> // N_stride has default 1, in forward declaration in <blitz/tinyvec.h>
template<class P_numtype, int N_length, int N_stride> template<typename P_numtype, int N_length, int N_stride>
class TinyVectorIter { class TinyVectorIter {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
_bz_explicit TinyVectorIter(TinyVector<T_numtype, N_length>& x) explicit TinyVectorIter(TinyVector<T_numtype, N_length>& x)
: data_(x.data()) : data_(x.data())
{ } { }
#ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
TinyVectorIter(const TinyVectorIter<T_numtype, N_length, N_stride>& ite r) TinyVectorIter(const TinyVectorIter<T_numtype, N_length, N_stride>& ite r)
: data_(iter.data_) : data_(iter.data_)
{ {
} }
#endif #endif
T_numtype operator[](unsigned i) const T_numtype operator[](int i) const
{ {
BZPRECONDITION(i < N_length); BZPRECONDITION(i >= 0 && i &lt; N_length);
return data_[i * N_stride]; return data_[i * N_stride];
} }
T_numtype& _bz_restrict operator[](unsigned i) T_numtype& restrict operator[](int i)
{ {
BZPRECONDITION(i < N_length); BZPRECONDITION(i >= 0 && i &lt; N_length);
return data_[i * N_stride]; return data_[i * N_stride];
} }
T_numtype operator()(unsigned i) const T_numtype operator()(int i) const
{ {
BZPRECONDITION(i < N_length); BZPRECONDITION(i >= 0 && i &lt; N_length);
return data_[i * N_stride]; return data_[i * N_stride];
} }
T_numtype& _bz_restrict operator()(unsigned i) T_numtype& restrict operator()(int i)
{ {
BZPRECONDITION(i < N_length); BZPRECONDITION(i >= 0 && i &lt; N_length);
return data_[i * N_stride]; return data_[i * N_stride];
} }
unsigned length(unsigned) const int length(int) const
{ return N_length; } { return N_length; }
enum { _bz_staticLengthCount = 1, static const int _bz_staticLengthCount = 1,
_bz_dynamicLengthCount = 0, _bz_dynamicLengthCount = 0,
_bz_staticLength = 0 }; _bz_staticLength = 0;
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return _bz_true; } { return true; }
T_numtype _bz_fastAccess(unsigned i) const T_numtype _bz_fastAccess(int i) const
{ return data_[i * N_stride]; } { return data_[i * N_stride]; }
T_numtype& _bz_fastAccess(unsigned i) T_numtype& _bz_fastAccess(int i)
{ return data_[i * N_stride]; } { return data_[i * N_stride]; }
unsigned _bz_suggestLength() const int _bz_suggestLength() const
{ return N_length; } { return N_length; }
private: private:
T_numtype * _bz_restrict data_; T_numtype * restrict data_;
}; };
// N_stride has default 1, in forward declaration in <blitz/tinyvec.h> // N_stride has default 1, in forward declaration in <blitz/tinyvec.h>
template<class P_numtype, int N_length, int N_stride> template<typename P_numtype, int N_length, int N_stride>
class TinyVectorIterConst { class TinyVectorIterConst {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
_bz_explicit TinyVectorIterConst(const TinyVector<T_numtype, N_length>& x) explicit TinyVectorIterConst(const TinyVector<T_numtype, N_length>& x)
: data_(x.data()) : data_(x.data())
{ } { }
#ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
TinyVectorIterConst(const TinyVectorIterConst<T_numtype, N_length, TinyVectorIterConst(const TinyVectorIterConst<T_numtype, N_length,
N_stride>& iter) N_stride>& iter)
: data_(iter.data_) : data_(iter.data_)
{ {
} }
void operator=(const TinyVectorIterConst<T_numtype, N_length, N_stride> & void operator=(const TinyVectorIterConst<T_numtype, N_length, N_stride> &
iter) iter)
{ {
data_ = iter.data_; data_ = iter.data_;
} }
#endif #endif
T_numtype operator[](unsigned i) const T_numtype operator[](int i) const
{ {
BZPRECONDITION(i < N_length); BZPRECONDITION(i >= 0 && i &lt; N_length);
return data_[i * N_stride]; return data_[i * N_stride];
} }
T_numtype operator()(unsigned i) const T_numtype operator()(int i) const
{ {
BZPRECONDITION(i < N_length); BZPRECONDITION(i >= 0 && i &lt; N_length);
return data_[i * N_stride]; return data_[i * N_stride];
} }
unsigned length(unsigned) const int length(int) const
{ return N_length; } { return N_length; }
enum { _bz_staticLengthCount = 1, static const int _bz_staticLengthCount = 1,
_bz_dynamicLengthCount = 0, _bz_dynamicLengthCount = 0,
_bz_staticLength = 0 }; _bz_staticLength = 0;
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return _bz_true; } { return true; }
T_numtype _bz_fastAccess(unsigned i) const T_numtype _bz_fastAccess(int i) const
{ return data_[i * N_stride]; } { return data_[i * N_stride]; }
unsigned _bz_suggestLength() const int _bz_suggestLength() const
{ return N_length; } { return N_length; }
private: private:
const T_numtype * _bz_restrict data_; const T_numtype * restrict data_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_TINYVECITER_H #endif // BZ_TINYVECITER_H
 End of changes. 32 change blocks. 
52 lines changed or deleted 39 lines changed or added


 traversal.cc   traversal.cc 
/************************************************************************** * /************************************************************************** *
* blitz/traversal.cc Space-filling curve based traversal orders * blitz/traversal.cc Space-filling curve based traversal orders
* *
* $Id: traversal.cc,v 1.3 2002/03/06 17:18:11 patricg Exp $ * $Id: traversal.cc,v 1.4 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: traversal.cc,v $
* Revision 1.3 2002/03/06 17:18:11 patricg
*
* template declaration
* template<int N_dimensions>
* _bz_typename TraversalOrderCollection<N_dimensions>::T_set
* TraversalOrderCollection<N_dimensions>::traversals_;
* in blitz/transversal.cc moved before template specialisation
* template<>
* class TraversalOrderCollection<0> {}
* in blitz/transversal.h
*
* Revision 1.2 2001/01/25 00:25:55 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_TRAVERSAL_CC #ifndef BZ_TRAVERSAL_CC
#define BZ_TRAVERSAL_CC #define BZ_TRAVERSAL_CC
#ifndef BZ_TRAVERSAL_H #ifndef BZ_TRAVERSAL_H
#error <blitz/traversal.cc> must be included via <blitz/traversal.h> #error <blitz/traversal.cc> must be included via <blitz/traversal.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
 End of changes. 2 change blocks. 
19 lines changed or deleted 3 lines changed or added


 traversal.h   traversal.h 
/************************************************************************** * /************************************************************************** *
* blitz/traversal.h Declaration of the TraversalOrder classes * blitz/traversal.h Declaration of the TraversalOrder classes
* *
* $Id: traversal.h,v 1.4 2002/03/07 08:38:20 patricg Exp $ * $Id: traversal.h,v 1.5 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: traversal.h,v $
* Revision 1.4 2002/03/07 08:38:20 patricg
*
* moved
* template<int N_dimensions>
* _bz_typename TraversalOrderCollection<N_dimensions>::T_set
* TraversalOrderCollection<N_dimensions>::traversals_;
* after the declaration of
* template<int N_dimensions> class TraversalOrderCollection
*
* Revision 1.3 2002/03/06 17:18:11 patricg
*
* template declaration
* template<int N_dimensions>
* _bz_typename TraversalOrderCollection<N_dimensions>::T_set
* TraversalOrderCollection<N_dimensions>::traversals_;
* in blitz/transversal.cc moved before template specialisation
* template<>
* class TraversalOrderCollection<0> {}
* in blitz/transversal.h
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
// Fast traversal orders require the ISO/ANSI C++ standard library // Fast traversal orders require the ISO/ANSI C++ standard library
// (particularly set). // (particularly set).
#ifdef BZ_HAVE_STD #ifdef BZ_HAVE_STD
#ifndef BZ_TRAVERSAL_H #ifndef BZ_TRAVERSAL_H
#define BZ_TRAVERSAL_H #define BZ_TRAVERSAL_H
#ifndef BZ_TINYVEC_H #ifndef BZ_TINYVEC_H
#include <blitz/tinyvec.h> #include <blitz/tinyvec.h>
 End of changes. 2 change blocks. 
37 lines changed or deleted 3 lines changed or added


 tuning.h   tuning.h 
/************************************************************************** * /************************************************************************** *
* blitz/tuning.h Platform-specific code tuning * blitz/tuning.h Platform-specific code tuning
* *
* $Id: tuning.h,v 1.3 2001/01/26 18:30:50 tveldhui Exp $ * $Id: tuning.h,v 1.4 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tuning.h,v $
* Revision 1.3 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.6 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.5 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.4 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.3 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
* Revision 1.1 1996/11/11 17:29:13 tveldhui
* Initial revision
*
*
*/
#ifndef BZ_TUNING_H #ifndef BZ_TUNING_H
#define BZ_TUNING_H #define BZ_TUNING_H
// These estimates should be conservative (i.e. underestimate the // These estimates should be conservative (i.e. underestimate the
// cache sizes). // cache sizes).
#define BZ_L1_CACHE_ESTIMATED_SIZE 8192 #define BZ_L1_CACHE_ESTIMATED_SIZE 8192
#define BZ_L2_CACHE_ESTIMATED_SIZE 65536 #define BZ_L2_CACHE_ESTIMATED_SIZE 65536
#undef BZ_PARTIAL_LOOP_UNROLL #undef BZ_PARTIAL_LOOP_UNROLL
 End of changes. 2 change blocks. 
33 lines changed or deleted 3 lines changed or added


 tvcross.h   tvcross.h 
/************************************************************************** * /************************************************************************** *
* blitz/tvcross.h Cross product of TinyVector<N,3>'s * blitz/tvcross.h Cross product of TinyVector<N,3>'s
* *
* $Id: tvcross.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: tvcross.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tvcross.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.1 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
*/
#ifndef BZ_TVCROSS_H #ifndef BZ_TVCROSS_H
#define BZ_TVCROSS_H #define BZ_TVCROSS_H
#ifndef BZ_TINYVEC_H #ifndef BZ_TINYVEC_H
#error <blitz/tvcross.h> must be included via <blitz/tinyvec.h> #error <blitz/tvcross.h> must be included via <blitz/tinyvec.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/* /*
* cross product. * cross product.
* *
* NEEDS_WORK: - cross product of two different vector types * NEEDS_WORK: - cross product of two different vector types
* - cross product involving expressions * - cross product involving expressions
*/ */
template<class T_numtype> template<typename T_numtype>
TinyVector<T_numtype,3> cross(const TinyVector<T_numtype,3>& x, TinyVector<T_numtype,3> cross(const TinyVector<T_numtype,3>& x,
const TinyVector<T_numtype,3>& y) const TinyVector<T_numtype,3>& y)
{ {
return TinyVector<T_numtype,3>(x[1]*y[2] - y[1]*x[2], return TinyVector<T_numtype,3>(x[1]*y[2] - y[1]*x[2],
y[0]*x[2] - x[0]*y[2], x[0]*y[1] - y[0]*x[1]); y[0]*x[2] - x[0]*y[2], x[0]*y[1] - y[0]*x[1]);
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_TVCROSS_H #endif // BZ_TVCROSS_H
 End of changes. 3 change blocks. 
15 lines changed or deleted 4 lines changed or added


 tvecglobs.h   tvecglobs.h 
/************************************************************************** * /************************************************************************** *
* blitz/tvecglobs.h TinyVector global functions * blitz/tvecglobs.h TinyVector global functions
* *
* $Id: tvecglobs.h,v 1.1.1.1 2000/06/19 12:26:12 tveldhui Exp $ * $Id: tvecglobs.h,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: tvecglobs.h,v $
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_TVECGLOBS_H #ifndef BZ_TVECGLOBS_H
#define BZ_TVECGLOBS_H #define BZ_TVECGLOBS_H
#ifndef BZ_META_METAPROG_H #ifndef BZ_META_METAPROG_H
#include <blitz/meta/metaprog.h> #include <blitz/meta/metaprog.h>
#endif #endif
#ifndef BZ_NUMTRAIT_H #ifndef BZ_NUMTRAIT_H
#include <blitz/numtrait.h> #include <blitz/numtrait.h>
#endif #endif
#include <blitz/tvcross.h> // Cross products #include <blitz/tvcross.h> // Cross products
#include <blitz/meta/dot.h> #include <blitz/meta/dot.h>
#include <blitz/meta/product.h> #include <blitz/meta/product.h>
#include <blitz/meta/sum.h> #include <blitz/meta/sum.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class T_numtype1, class T_numtype2, int N_length> template<typename T_numtype1, typename T_numtype2, int N_length>
inline BZ_PROMOTE(T_numtype1, T_numtype2) inline BZ_PROMOTE(T_numtype1, T_numtype2)
dot(const TinyVector<T_numtype1, N_length>& a, dot(const TinyVector<T_numtype1, N_length>& a,
const TinyVector<T_numtype2, N_length>& b) const TinyVector<T_numtype2, N_length>& b)
{ {
return _bz_meta_vectorDot<N_length, 0>::f(a,b); return _bz_meta_vectorDot<N_length, 0>::f(a,b);
} }
template<class T_expr1, class T_numtype2, int N_length> template<typename T_expr1, typename T_numtype2, int N_length>
inline BZ_PROMOTE(_bz_typename T_expr1::T_numtype, T_numtype2) inline BZ_PROMOTE(_bz_typename T_expr1::T_numtype, T_numtype2)
dot(_bz_VecExpr<T_expr1> a, const TinyVector<T_numtype2, N_length>& b) dot(_bz_VecExpr<T_expr1> a, const TinyVector<T_numtype2, N_length>& b)
{ {
return _bz_meta_vectorDot<N_length, 0>::f_value_ref(a,b); return _bz_meta_vectorDot<N_length, 0>::f_value_ref(a,b);
} }
template<class T_numtype1, class T_expr2, int N_length> template<typename T_numtype1, typename T_expr2, int N_length>
inline BZ_PROMOTE(T_numtype1, _bz_typename T_expr2::T_numtype) inline BZ_PROMOTE(T_numtype1, _bz_typename T_expr2::T_numtype)
dot(const TinyVector<T_numtype1, N_length>& a, _bz_VecExpr<T_expr2> b) dot(const TinyVector<T_numtype1, N_length>& a, _bz_VecExpr<T_expr2> b)
{ {
return _bz_meta_vectorDot<N_length, 0>::f_ref_value(a,b); return _bz_meta_vectorDot<N_length, 0>::f_ref_value(a,b);
} }
template<class T_numtype1, int N_length> template<typename T_numtype1, int N_length>
inline BZ_SUMTYPE(T_numtype1) inline BZ_SUMTYPE(T_numtype1)
product(const TinyVector<T_numtype1, N_length>& a) product(const TinyVector<T_numtype1, N_length>& a)
{ {
return _bz_meta_vectorProduct<N_length, 0>::f(a); return _bz_meta_vectorProduct<N_length, 0>::f(a);
} }
template<class T_numtype, int N_length> template<typename T_numtype, int N_length>
inline T_numtype inline T_numtype
sum(const TinyVector<T_numtype, N_length>& a) sum(const TinyVector<T_numtype, N_length>& a)
{ {
return _bz_meta_vectorSum<N_length, 0>::f(a); return _bz_meta_vectorSum<N_length, 0>::f(a);
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_TVECGLOBS_H #endif // BZ_TVECGLOBS_H
 End of changes. 7 change blocks. 
19 lines changed or deleted 8 lines changed or added


 uops.cc   uops.cc 
/************************************************************************** * /************************************************************************** *
* blitz/arrayuops.cc Expression templates for arrays, unary functions * blitz/../array/uops.cc Expression templates for arrays, unary funct
* ions
* $Id: uops.cc,v 1.2 2001/01/26 20:11:25 tveldhui Exp $
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-suggest@cybervision.com
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@cybervision.com
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://seurat.uwaterloo.ca/blitz/
* *
************************************************************************** * ************************************************************************** *
* $Log: uops.cc,v $
* Revision 1.2 2001/01/26 20:11:25 tveldhui
* Changed isnan to blitz_isnan, to avoid conflicts with implementations
* that define isnan as a preprocessor macro.
*
* Revision 1.1.1.1 2000/06/19 12:26:14 tveldhui
* Imported sources
* *
*/ */
// Generated source file. Do not edit. // Generated source file. Do not edit.
// genarruops.cpp Dec 5 1998 17:08:40 // genarruops.cpp Dec 30 2003 16:49:07
#ifndef BZ_ARRAYUOPS_CC #ifndef BZ_ARRAYUOPS_CC
#define BZ_ARRAYUOPS_CC #define BZ_ARRAYUOPS_CC
#ifndef BZ_ARRAYEXPR_H #ifndef BZ_ARRAYEXPR_H
#error <blitz/arrayuops.cc> must be included after <blitz/arrayexpr.h> #error <blitz/array/uops.cc> must be included after <blitz/arrayexpr.h>
#endif // BZ_ARRAYEXPR_H #endif // BZ_ARRAYEXPR_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/************************************************************************** ** /************************************************************************** **
* abs * abs
************************************************************************** **/ ************************************************************************** **/
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
skipping to change at line 62 skipping to change at line 53
_bz_abs<T_numtype1> > > _bz_abs<T_numtype1> > >
abs(const Array<T_numtype1, N_rank1>& d1) abs(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_abs<T_numtype1> >(d1.begin()); _bz_abs<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > > _bz_abs<typename P_expr1::T_numtype> > >
abs(_bz_ArrayExpr<P_expr1> d1) abs(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> >(d1); _bz_abs<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_abs<int> > > _bz_abs<int> > >
abs(IndexPlaceholder<N_index1> d1) abs(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_abs<int> >(d1); _bz_abs<int> >(d1);
skipping to change at line 96 skipping to change at line 87
_bz_acos<T_numtype1> > > _bz_acos<T_numtype1> > >
acos(const Array<T_numtype1, N_rank1>& d1) acos(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_acos<T_numtype1> >(d1.begin()); _bz_acos<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_acos<_bz_typename P_expr1::T_numtype> > > _bz_acos<typename P_expr1::T_numtype> > >
acos(_bz_ArrayExpr<P_expr1> d1) acos(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_acos<_bz_typename P_expr1::T_numtype> >(d1); _bz_acos<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_acos<int> > > _bz_acos<int> > >
acos(IndexPlaceholder<N_index1> d1) acos(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_acos<int> >(d1); _bz_acos<int> >(d1);
skipping to change at line 131 skipping to change at line 122
_bz_acosh<T_numtype1> > > _bz_acosh<T_numtype1> > >
acosh(const Array<T_numtype1, N_rank1>& d1) acosh(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_acosh<T_numtype1> >(d1.begin()); _bz_acosh<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_acosh<_bz_typename P_expr1::T_numtype> > > _bz_acosh<typename P_expr1::T_numtype> > >
acosh(_bz_ArrayExpr<P_expr1> d1) acosh(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_acosh<_bz_typename P_expr1::T_numtype> >(d1); _bz_acosh<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_acosh<int> > > _bz_acosh<int> > >
acosh(IndexPlaceholder<N_index1> d1) acosh(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_acosh<int> >(d1); _bz_acosh<int> >(d1);
skipping to change at line 167 skipping to change at line 158
_bz_asin<T_numtype1> > > _bz_asin<T_numtype1> > >
asin(const Array<T_numtype1, N_rank1>& d1) asin(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_asin<T_numtype1> >(d1.begin()); _bz_asin<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_asin<_bz_typename P_expr1::T_numtype> > > _bz_asin<typename P_expr1::T_numtype> > >
asin(_bz_ArrayExpr<P_expr1> d1) asin(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_asin<_bz_typename P_expr1::T_numtype> >(d1); _bz_asin<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_asin<int> > > _bz_asin<int> > >
asin(IndexPlaceholder<N_index1> d1) asin(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_asin<int> >(d1); _bz_asin<int> >(d1);
skipping to change at line 202 skipping to change at line 193
_bz_asinh<T_numtype1> > > _bz_asinh<T_numtype1> > >
asinh(const Array<T_numtype1, N_rank1>& d1) asinh(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_asinh<T_numtype1> >(d1.begin()); _bz_asinh<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_asinh<_bz_typename P_expr1::T_numtype> > > _bz_asinh<typename P_expr1::T_numtype> > >
asinh(_bz_ArrayExpr<P_expr1> d1) asinh(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_asinh<_bz_typename P_expr1::T_numtype> >(d1); _bz_asinh<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_asinh<int> > > _bz_asinh<int> > >
asinh(IndexPlaceholder<N_index1> d1) asinh(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_asinh<int> >(d1); _bz_asinh<int> >(d1);
skipping to change at line 238 skipping to change at line 229
_bz_atan<T_numtype1> > > _bz_atan<T_numtype1> > >
atan(const Array<T_numtype1, N_rank1>& d1) atan(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_atan<T_numtype1> >(d1.begin()); _bz_atan<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_atan<_bz_typename P_expr1::T_numtype> > > _bz_atan<typename P_expr1::T_numtype> > >
atan(_bz_ArrayExpr<P_expr1> d1) atan(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_atan<_bz_typename P_expr1::T_numtype> >(d1); _bz_atan<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_atan<int> > > _bz_atan<int> > >
atan(IndexPlaceholder<N_index1> d1) atan(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_atan<int> >(d1); _bz_atan<int> >(d1);
skipping to change at line 273 skipping to change at line 264
_bz_atanh<T_numtype1> > > _bz_atanh<T_numtype1> > >
atanh(const Array<T_numtype1, N_rank1>& d1) atanh(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_atanh<T_numtype1> >(d1.begin()); _bz_atanh<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_atanh<_bz_typename P_expr1::T_numtype> > > _bz_atanh<typename P_expr1::T_numtype> > >
atanh(_bz_ArrayExpr<P_expr1> d1) atanh(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_atanh<_bz_typename P_expr1::T_numtype> >(d1); _bz_atanh<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_atanh<int> > > _bz_atanh<int> > >
atanh(IndexPlaceholder<N_index1> d1) atanh(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_atanh<int> >(d1); _bz_atanh<int> >(d1);
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* atan2 * atan2
************************************************************************** **/ ************************************************************************** **/
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_atan2<T_numtype1,T_numtype2> > > _bz_atan2<T_numtype1,T_numtype2> > >
atan2(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2 >& d2) atan2(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2 >& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, ArrayI terator<T_numtype2, N_rank2>,
_bz_atan2<T_numtype1,T_numtype2> >(d1.begin(), d2.begin()); _bz_atan2<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
} }
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_atan2<T_numtype1,_bz_typename P_expr2::T_numtype> > > _bz_atan2<T_numtype1,typename P_expr2::T_numtype> > >
atan2(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2) atan2(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_atan2<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), d2) _bz_atan2<T_numtype1,typename P_expr2::T_numtype> >(d1.begin(), d2);
;
} }
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Ind exPlaceholder<N_index2>,
_bz_atan2<T_numtype1,int> > > _bz_atan2<T_numtype1,int> > >
atan2(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2) atan2(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, IndexP laceholder<N_index2>,
_bz_atan2<T_numtype1,int> >(d1.begin(), d2); _bz_atan2<T_numtype1,int> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<float>,
_bz_atan2<T_numtype1,float> > > _bz_atan2<T_numtype1,float> > >
atan2(const Array<T_numtype1, N_rank1>& d1, float d2) atan2(const Array<T_numtype1, N_rank1>& d1, float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<float>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<float>,
_bz_atan2<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>( d2)); _bz_atan2<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>( d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<double>,
_bz_atan2<T_numtype1,double> > > _bz_atan2<T_numtype1,double> > >
atan2(const Array<T_numtype1, N_rank1>& d1, double d2) atan2(const Array<T_numtype1, N_rank1>& d1, double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<double>,
_bz_atan2<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double >(d2)); _bz_atan2<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double >(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<long double>,
_bz_atan2<T_numtype1,long double> > > _bz_atan2<T_numtype1,long double> > >
atan2(const Array<T_numtype1, N_rank1>& d1, long double d2) atan2(const Array<T_numtype1, N_rank1>& d1, long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<long double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<long double>,
_bz_atan2<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<l ong double>(d2)); _bz_atan2<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<l ong double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<complex<T2> > ,
_bz_atan2<T_numtype1,complex<T2> > > > _bz_atan2<T_numtype1,complex<T2> > > >
atan2(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2) atan2(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<complex<T2> > , return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<complex<T2> > ,
_bz_atan2<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant< complex<T2> > (d2)); _bz_atan2<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant< complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numty _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T
pe2, N_rank2>, _numtype2, N_rank2>,
_bz_atan2<_bz_typename P_expr1::T_numtype,T_numtype2> > > _bz_atan2<typename P_expr1::T_numtype,T_numtype2> > >
atan2(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2) atan2(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numtype2 return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_nu
, N_rank2>, mtype2, N_rank2>,
_bz_atan2<_bz_typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin()) _bz_atan2<typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin());
;
} }
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2 _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P
>, _expr2>,
_bz_atan2<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numty _bz_atan2<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
pe> > >
atan2(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2) atan2(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_ex
_bz_atan2<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numty pr2>,
pe> >(d1, d2); _bz_atan2<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >(d1
, d2);
} }
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_in _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholde
dex2>, r<N_index2>,
_bz_atan2<_bz_typename P_expr1::T_numtype,int> > > _bz_atan2<typename P_expr1::T_numtype,int> > >
atan2(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2) atan2(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_index return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N
2>, _index2>,
_bz_atan2<_bz_typename P_expr1::T_numtype,int> >(d1, d2); _bz_atan2<typename P_expr1::T_numtype,int> >(d1, d2);
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<float>, nstant<float>,
_bz_atan2<_bz_typename P_expr1::T_numtype,float> > > _bz_atan2<typename P_expr1::T_numtype,float> > >
atan2(_bz_ArrayExpr<P_expr1> d1, float d2) atan2(_bz_ArrayExpr<P_expr1> d1, float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<fl return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
oat>, ant<float>,
_bz_atan2<_bz_typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprCon _bz_atan2<typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprConstan
stant<float>(d2)); t<float>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<double>, nstant<double>,
_bz_atan2<_bz_typename P_expr1::T_numtype,double> > > _bz_atan2<typename P_expr1::T_numtype,double> > >
atan2(_bz_ArrayExpr<P_expr1> d1, double d2) atan2(_bz_ArrayExpr<P_expr1> d1, double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<do return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
uble>, ant<double>,
_bz_atan2<_bz_typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprCo _bz_atan2<typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprConsta
nstant<double>(d2)); nt<double>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<long double>, nstant<long double>,
_bz_atan2<_bz_typename P_expr1::T_numtype,long double> > > _bz_atan2<typename P_expr1::T_numtype,long double> > >
atan2(_bz_ArrayExpr<P_expr1> d1, long double d2) atan2(_bz_ArrayExpr<P_expr1> d1, long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<lo return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
ng double>, ant<long double>,
_bz_atan2<_bz_typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayE _bz_atan2<typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayExprC
xprConstant<long double>(d2)); onstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<complex<T2> > , nstant<complex<T2> > ,
_bz_atan2<_bz_typename P_expr1::T_numtype,complex<T2> > > > _bz_atan2<typename P_expr1::T_numtype,complex<T2> > > >
atan2(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2) atan2(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<co return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
mplex<T2> > , ant<complex<T2> > ,
_bz_atan2<_bz_typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_Array _bz_atan2<typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_ArrayExpr
ExprConstant<complex<T2> > (d2)); Constant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_n umtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_atan2<int,T_numtype2> > > _bz_atan2<int,T_numtype2> > >
atan2(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2) atan2(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_numt ype2, N_rank2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterator< T_numtype2, N_rank2>,
_bz_atan2<int,T_numtype2> >(d1, d2.begin()); _bz_atan2<int,T_numtype2> >(d1, d2.begin());
} }
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_e _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_atan2<int,_bz_typename P_expr2::T_numtype> > > _bz_atan2<int,typename P_expr2::T_numtype> > >
atan2(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2) atan2(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_expr return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<
2>, P_expr2>,
_bz_atan2<int,_bz_typename P_expr2::T_numtype> >(d1, d2); _bz_atan2<int,typename P_expr2::T_numtype> >(d1, d2);
} }
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder< N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlaceh older<N_index2>,
_bz_atan2<int,int> > > _bz_atan2<int,int> > >
atan2(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2) atan2(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder<N_i ndex2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlacehold er<N_index2>,
_bz_atan2<int,int> >(d1, d2); _bz_atan2<int,int> >(d1, d2);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<float>,
_bz_atan2<int,float> > > _bz_atan2<int,float> > >
atan2(IndexPlaceholder<N_index1> d1, float d2) atan2(IndexPlaceholder<N_index1> d1, float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<float>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<float>,
_bz_atan2<int,float> >(d1, _bz_ArrayExprConstant<float>(d2)); _bz_atan2<int,float> >(d1, _bz_ArrayExprConstant<float>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<double>,
_bz_atan2<int,double> > > _bz_atan2<int,double> > >
atan2(IndexPlaceholder<N_index1> d1, double d2) atan2(IndexPlaceholder<N_index1> d1, double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<double>,
_bz_atan2<int,double> >(d1, _bz_ArrayExprConstant<double>(d2)); _bz_atan2<int,double> >(d1, _bz_ArrayExprConstant<double>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<long double>,
_bz_atan2<int,long double> > > _bz_atan2<int,long double> > >
atan2(IndexPlaceholder<N_index1> d1, long double d2) atan2(IndexPlaceholder<N_index1> d1, long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<long double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<long double>,
_bz_atan2<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2) ); _bz_atan2<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2) );
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<complex<T2> > ,
_bz_atan2<int,complex<T2> > > > _bz_atan2<int,complex<T2> > > >
atan2(IndexPlaceholder<N_index1> d1, complex<T2> d2) atan2(IndexPlaceholder<N_index1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<complex<T2> > , return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<complex<T2> > ,
_bz_atan2<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > ( d2)); _bz_atan2<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > ( d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T _numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIter ator<T_numtype2, N_rank2>,
_bz_atan2<float,T_numtype2> > > _bz_atan2<float,T_numtype2> > >
atan2(float d1, const Array<T_numtype2, N_rank2>& d2) atan2(float d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T_nu mtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIterato r<T_numtype2, N_rank2>,
_bz_atan2<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begi n()); _bz_atan2<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begi n());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_Array
_expr2>, Expr<P_expr2>,
_bz_atan2<float,_bz_typename P_expr2::T_numtype> > > _bz_atan2<float,typename P_expr2::T_numtype> > >
atan2(float d1, _bz_ArrayExpr<P_expr2> d2) atan2(float d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P_ex return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_ArrayExp
pr2>, r<P_expr2>,
_bz_atan2<float,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConstan _bz_atan2<float,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<fl
t<float>(d1), d2); oat>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholde r<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlac eholder<N_index2>,
_bz_atan2<float,int> > > _bz_atan2<float,int> > >
atan2(float d1, IndexPlaceholder<N_index2> d2) atan2(float d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholder<N _index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlaceho lder<N_index2>,
_bz_atan2<float,int> >(_bz_ArrayExprConstant<float>(d1), d2); _bz_atan2<float,int> >(_bz_ArrayExprConstant<float>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator< T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIte rator<T_numtype2, N_rank2>,
_bz_atan2<double,T_numtype2> > > _bz_atan2<double,T_numtype2> > >
atan2(double d1, const Array<T_numtype2, N_rank2>& d2) atan2(double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator<T_n umtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_atan2<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.be gin()); _bz_atan2<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.be gin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr< _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_Arra
P_expr2>, yExpr<P_expr2>,
_bz_atan2<double,_bz_typename P_expr2::T_numtype> > > _bz_atan2<double,typename P_expr2::T_numtype> > >
atan2(double d1, _bz_ArrayExpr<P_expr2> d2) atan2(double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<P_e return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_atan2<double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConsta _bz_atan2<double,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<d
nt<double>(d1), d2); ouble>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlacehold er<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPla ceholder<N_index2>,
_bz_atan2<double,int> > > _bz_atan2<double,int> > >
atan2(double d1, IndexPlaceholder<N_index2> d2) atan2(double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlaceholder< N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPlaceh older<N_index2>,
_bz_atan2<double,int> >(_bz_ArrayExprConstant<double>(d1), d2); _bz_atan2<double,int> >(_bz_ArrayExprConstant<double>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_atan2<long double,T_numtype2> > > _bz_atan2<long double,T_numtype2> > >
atan2(long double d1, const Array<T_numtype2, N_rank2>& d2) atan2(long double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, ArrayI terator<T_numtype2, N_rank2>,
_bz_atan2<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>( d1), d2.begin()); _bz_atan2<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>( d1), d2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_atan2<long double,_bz_typename P_expr2::T_numtype> > > _bz_atan2<long double,typename P_expr2::T_numtype> > >
atan2(long double d1, _bz_ArrayExpr<P_expr2> d2) atan2(long double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_atan2<long double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprC _bz_atan2<long double,typename P_expr2::T_numtype> >(_bz_ArrayExprConst
onstant<long double>(d1), d2); ant<long double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Ind exPlaceholder<N_index2>,
_bz_atan2<long double,int> > > _bz_atan2<long double,int> > >
atan2(long double d1, IndexPlaceholder<N_index2> d2) atan2(long double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, IndexP laceholder<N_index2>,
_bz_atan2<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2 ); _bz_atan2<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2 );
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayIt erator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , A rrayIterator<T_numtype2, N_rank2>,
_bz_atan2<complex<T1> ,T_numtype2> > > _bz_atan2<complex<T1> ,T_numtype2> > >
atan2(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2) atan2(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayItera tor<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Arra yIterator<T_numtype2, N_rank2>,
_bz_atan2<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin()); _bz_atan2<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_Arr _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _
ayExpr<P_expr2>, bz_ArrayExpr<P_expr2>,
_bz_atan2<complex<T1> ,_bz_typename P_expr2::T_numtype> > > _bz_atan2<complex<T1> ,typename P_expr2::T_numtype> > >
atan2(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2) atan2(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayE return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _bz_
xpr<P_expr2>, ArrayExpr<P_expr2>,
_bz_atan2<complex<T1> ,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExpr _bz_atan2<complex<T1> ,typename P_expr2::T_numtype> >(_bz_ArrayExprCons
Constant<complex<T1> > (d1), d2); tant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPl aceholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , I ndexPlaceholder<N_index2>,
_bz_atan2<complex<T1> ,int> > > _bz_atan2<complex<T1> ,int> > >
atan2(complex<T1> d1, IndexPlaceholder<N_index2> d2) atan2(complex<T1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPlace holder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Inde xPlaceholder<N_index2>,
_bz_atan2<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2); _bz_atan2<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* _class * _class
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
skipping to change at line 662 skipping to change at line 653
_bz__class<T_numtype1> > > _bz__class<T_numtype1> > >
_class(const Array<T_numtype1, N_rank1>& d1) _class(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz__class<T_numtype1> >(d1.begin()); _bz__class<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz__class<_bz_typename P_expr1::T_numtype> > > _bz__class<typename P_expr1::T_numtype> > >
_class(_bz_ArrayExpr<P_expr1> d1) _class(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz__class<_bz_typename P_expr1::T_numtype> >(d1); _bz__class<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz__class<int> > > _bz__class<int> > >
_class(IndexPlaceholder<N_index1> d1) _class(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz__class<int> >(d1); _bz__class<int> >(d1);
skipping to change at line 699 skipping to change at line 690
_bz_cbrt<T_numtype1> > > _bz_cbrt<T_numtype1> > >
cbrt(const Array<T_numtype1, N_rank1>& d1) cbrt(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_cbrt<T_numtype1> >(d1.begin()); _bz_cbrt<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_cbrt<_bz_typename P_expr1::T_numtype> > > _bz_cbrt<typename P_expr1::T_numtype> > >
cbrt(_bz_ArrayExpr<P_expr1> d1) cbrt(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_cbrt<_bz_typename P_expr1::T_numtype> >(d1); _bz_cbrt<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_cbrt<int> > > _bz_cbrt<int> > >
cbrt(IndexPlaceholder<N_index1> d1) cbrt(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_cbrt<int> >(d1); _bz_cbrt<int> >(d1);
skipping to change at line 735 skipping to change at line 726
_bz_ceil<T_numtype1> > > _bz_ceil<T_numtype1> > >
ceil(const Array<T_numtype1, N_rank1>& d1) ceil(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ceil<T_numtype1> >(d1.begin()); _bz_ceil<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ceil<_bz_typename P_expr1::T_numtype> > > _bz_ceil<typename P_expr1::T_numtype> > >
ceil(_bz_ArrayExpr<P_expr1> d1) ceil(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ceil<_bz_typename P_expr1::T_numtype> >(d1); _bz_ceil<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_ceil<int> > > _bz_ceil<int> > >
ceil(IndexPlaceholder<N_index1> d1) ceil(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_ceil<int> >(d1); _bz_ceil<int> >(d1);
skipping to change at line 769 skipping to change at line 760
_bz_cexp<T_numtype1> > > _bz_cexp<T_numtype1> > >
cexp(const Array<T_numtype1, N_rank1>& d1) cexp(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_cexp<T_numtype1> >(d1.begin()); _bz_cexp<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_cexp<_bz_typename P_expr1::T_numtype> > > _bz_cexp<typename P_expr1::T_numtype> > >
cexp(_bz_ArrayExpr<P_expr1> d1) cexp(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_cexp<_bz_typename P_expr1::T_numtype> >(d1); _bz_cexp<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_cexp<int> > > _bz_cexp<int> > >
cexp(IndexPlaceholder<N_index1> d1) cexp(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_cexp<int> >(d1); _bz_cexp<int> >(d1);
skipping to change at line 803 skipping to change at line 794
_bz_cos<T_numtype1> > > _bz_cos<T_numtype1> > >
cos(const Array<T_numtype1, N_rank1>& d1) cos(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_cos<T_numtype1> >(d1.begin()); _bz_cos<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_cos<_bz_typename P_expr1::T_numtype> > > _bz_cos<typename P_expr1::T_numtype> > >
cos(_bz_ArrayExpr<P_expr1> d1) cos(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_cos<_bz_typename P_expr1::T_numtype> >(d1); _bz_cos<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_cos<int> > > _bz_cos<int> > >
cos(IndexPlaceholder<N_index1> d1) cos(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_cos<int> >(d1); _bz_cos<int> >(d1);
skipping to change at line 837 skipping to change at line 828
_bz_cosh<T_numtype1> > > _bz_cosh<T_numtype1> > >
cosh(const Array<T_numtype1, N_rank1>& d1) cosh(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_cosh<T_numtype1> >(d1.begin()); _bz_cosh<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_cosh<_bz_typename P_expr1::T_numtype> > > _bz_cosh<typename P_expr1::T_numtype> > >
cosh(_bz_ArrayExpr<P_expr1> d1) cosh(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_cosh<_bz_typename P_expr1::T_numtype> >(d1); _bz_cosh<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_cosh<int> > > _bz_cosh<int> > >
cosh(IndexPlaceholder<N_index1> d1) cosh(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_cosh<int> >(d1); _bz_cosh<int> >(d1);
} }
/************************************************************************** ** /************************************************************************** **
* copysign * copysign
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_copysign<T_numtype1,T_numtype2> > > _bz_copysign<T_numtype1,T_numtype2> > >
copysign(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_ra nk2>& d2) copysign(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_ra nk2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, ArrayI terator<T_numtype2, N_rank2>,
_bz_copysign<T_numtype1,T_numtype2> >(d1.begin(), d2.begin()); _bz_copysign<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
} }
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_copysign<T_numtype1,_bz_typename P_expr2::T_numtype> > > _bz_copysign<T_numtype1,typename P_expr2::T_numtype> > >
copysign(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2) copysign(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_copysign<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), _bz_copysign<T_numtype1,typename P_expr2::T_numtype> >(d1.begin(), d2);
d2);
} }
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Ind exPlaceholder<N_index2>,
_bz_copysign<T_numtype1,int> > > _bz_copysign<T_numtype1,int> > >
copysign(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d 2) copysign(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d 2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, IndexP laceholder<N_index2>,
_bz_copysign<T_numtype1,int> >(d1.begin(), d2); _bz_copysign<T_numtype1,int> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<float>,
_bz_copysign<T_numtype1,float> > > _bz_copysign<T_numtype1,float> > >
copysign(const Array<T_numtype1, N_rank1>& d1, float d2) copysign(const Array<T_numtype1, N_rank1>& d1, float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<float>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<float>,
_bz_copysign<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<floa t>(d2)); _bz_copysign<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<floa t>(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<double>,
_bz_copysign<T_numtype1,double> > > _bz_copysign<T_numtype1,double> > >
copysign(const Array<T_numtype1, N_rank1>& d1, double d2) copysign(const Array<T_numtype1, N_rank1>& d1, double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<double>,
_bz_copysign<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<dou ble>(d2)); _bz_copysign<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<dou ble>(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<long double>,
_bz_copysign<T_numtype1,long double> > > _bz_copysign<T_numtype1,long double> > >
copysign(const Array<T_numtype1, N_rank1>& d1, long double d2) copysign(const Array<T_numtype1, N_rank1>& d1, long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<long double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<long double>,
_bz_copysign<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstan t<long double>(d2)); _bz_copysign<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstan t<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<complex<T2> > ,
_bz_copysign<T_numtype1,complex<T2> > > > _bz_copysign<T_numtype1,complex<T2> > > >
copysign(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2) copysign(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<complex<T2> > , return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<complex<T2> > ,
_bz_copysign<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConsta nt<complex<T2> > (d2)); _bz_copysign<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConsta nt<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numty _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T
pe2, N_rank2>, _numtype2, N_rank2>,
_bz_copysign<_bz_typename P_expr1::T_numtype,T_numtype2> > > _bz_copysign<typename P_expr1::T_numtype,T_numtype2> > >
copysign(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2) copysign(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numtype2 return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_nu
, N_rank2>, mtype2, N_rank2>,
_bz_copysign<_bz_typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin _bz_copysign<typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin());
());
} }
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2 _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P
>, _expr2>,
_bz_copysign<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_nu _bz_copysign<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >
mtype> > > >
copysign(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2) copysign(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_ex
_bz_copysign<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_nu pr2>,
mtype> >(d1, d2); _bz_copysign<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >
(d1, d2);
} }
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_in _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholde
dex2>, r<N_index2>,
_bz_copysign<_bz_typename P_expr1::T_numtype,int> > > _bz_copysign<typename P_expr1::T_numtype,int> > >
copysign(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2) copysign(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_index return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N
2>, _index2>,
_bz_copysign<_bz_typename P_expr1::T_numtype,int> >(d1, d2); _bz_copysign<typename P_expr1::T_numtype,int> >(d1, d2);
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<float>, nstant<float>,
_bz_copysign<_bz_typename P_expr1::T_numtype,float> > > _bz_copysign<typename P_expr1::T_numtype,float> > >
copysign(_bz_ArrayExpr<P_expr1> d1, float d2) copysign(_bz_ArrayExpr<P_expr1> d1, float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<fl return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
oat>, ant<float>,
_bz_copysign<_bz_typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExpr _bz_copysign<typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprCons
Constant<float>(d2)); tant<float>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<double>, nstant<double>,
_bz_copysign<_bz_typename P_expr1::T_numtype,double> > > _bz_copysign<typename P_expr1::T_numtype,double> > >
copysign(_bz_ArrayExpr<P_expr1> d1, double d2) copysign(_bz_ArrayExpr<P_expr1> d1, double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<do return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
uble>, ant<double>,
_bz_copysign<_bz_typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExp _bz_copysign<typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprCon
rConstant<double>(d2)); stant<double>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<long double>, nstant<long double>,
_bz_copysign<_bz_typename P_expr1::T_numtype,long double> > > _bz_copysign<typename P_expr1::T_numtype,long double> > >
copysign(_bz_ArrayExpr<P_expr1> d1, long double d2) copysign(_bz_ArrayExpr<P_expr1> d1, long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<lo return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
ng double>, ant<long double>,
_bz_copysign<_bz_typename P_expr1::T_numtype,long double> >(d1, _bz_Arr _bz_copysign<typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayEx
ayExprConstant<long double>(d2)); prConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<complex<T2> > , nstant<complex<T2> > ,
_bz_copysign<_bz_typename P_expr1::T_numtype,complex<T2> > > > _bz_copysign<typename P_expr1::T_numtype,complex<T2> > > >
copysign(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2) copysign(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<co return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
mplex<T2> > , ant<complex<T2> > ,
_bz_copysign<_bz_typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_Ar _bz_copysign<typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_ArrayE
rayExprConstant<complex<T2> > (d2)); xprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_n umtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_copysign<int,T_numtype2> > > _bz_copysign<int,T_numtype2> > >
copysign(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d 2) copysign(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d 2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_numt ype2, N_rank2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterator< T_numtype2, N_rank2>,
_bz_copysign<int,T_numtype2> >(d1, d2.begin()); _bz_copysign<int,T_numtype2> >(d1, d2.begin());
} }
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_e _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_copysign<int,_bz_typename P_expr2::T_numtype> > > _bz_copysign<int,typename P_expr2::T_numtype> > >
copysign(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2) copysign(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_expr return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<
2>, P_expr2>,
_bz_copysign<int,_bz_typename P_expr2::T_numtype> >(d1, d2); _bz_copysign<int,typename P_expr2::T_numtype> >(d1, d2);
} }
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder< N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlaceh older<N_index2>,
_bz_copysign<int,int> > > _bz_copysign<int,int> > >
copysign(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2) copysign(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder<N_i ndex2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlacehold er<N_index2>,
_bz_copysign<int,int> >(d1, d2); _bz_copysign<int,int> >(d1, d2);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<float>,
_bz_copysign<int,float> > > _bz_copysign<int,float> > >
copysign(IndexPlaceholder<N_index1> d1, float d2) copysign(IndexPlaceholder<N_index1> d1, float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<float>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<float>,
_bz_copysign<int,float> >(d1, _bz_ArrayExprConstant<float>(d2)); _bz_copysign<int,float> >(d1, _bz_ArrayExprConstant<float>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<double>,
_bz_copysign<int,double> > > _bz_copysign<int,double> > >
copysign(IndexPlaceholder<N_index1> d1, double d2) copysign(IndexPlaceholder<N_index1> d1, double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<double>,
_bz_copysign<int,double> >(d1, _bz_ArrayExprConstant<double>(d2)); _bz_copysign<int,double> >(d1, _bz_ArrayExprConstant<double>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<long double>,
_bz_copysign<int,long double> > > _bz_copysign<int,long double> > >
copysign(IndexPlaceholder<N_index1> d1, long double d2) copysign(IndexPlaceholder<N_index1> d1, long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<long double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<long double>,
_bz_copysign<int,long double> >(d1, _bz_ArrayExprConstant<long double>( d2)); _bz_copysign<int,long double> >(d1, _bz_ArrayExprConstant<long double>( d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<complex<T2> > ,
_bz_copysign<int,complex<T2> > > > _bz_copysign<int,complex<T2> > > >
copysign(IndexPlaceholder<N_index1> d1, complex<T2> d2) copysign(IndexPlaceholder<N_index1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<complex<T2> > , return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<complex<T2> > ,
_bz_copysign<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d2)); _bz_copysign<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T _numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIter ator<T_numtype2, N_rank2>,
_bz_copysign<float,T_numtype2> > > _bz_copysign<float,T_numtype2> > >
copysign(float d1, const Array<T_numtype2, N_rank2>& d2) copysign(float d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T_nu mtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIterato r<T_numtype2, N_rank2>,
_bz_copysign<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.b egin()); _bz_copysign<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.b egin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_Array
_expr2>, Expr<P_expr2>,
_bz_copysign<float,_bz_typename P_expr2::T_numtype> > > _bz_copysign<float,typename P_expr2::T_numtype> > >
copysign(float d1, _bz_ArrayExpr<P_expr2> d2) copysign(float d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P_ex return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_ArrayExp
pr2>, r<P_expr2>,
_bz_copysign<float,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCons _bz_copysign<float,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant
tant<float>(d1), d2); <float>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholde r<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlac eholder<N_index2>,
_bz_copysign<float,int> > > _bz_copysign<float,int> > >
copysign(float d1, IndexPlaceholder<N_index2> d2) copysign(float d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholder<N _index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlaceho lder<N_index2>,
_bz_copysign<float,int> >(_bz_ArrayExprConstant<float>(d1), d2); _bz_copysign<float,int> >(_bz_ArrayExprConstant<float>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator< T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIte rator<T_numtype2, N_rank2>,
_bz_copysign<double,T_numtype2> > > _bz_copysign<double,T_numtype2> > >
copysign(double d1, const Array<T_numtype2, N_rank2>& d2) copysign(double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator<T_n umtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_copysign<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2 .begin()); _bz_copysign<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2 .begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr< _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_Arra
P_expr2>, yExpr<P_expr2>,
_bz_copysign<double,_bz_typename P_expr2::T_numtype> > > _bz_copysign<double,typename P_expr2::T_numtype> > >
copysign(double d1, _bz_ArrayExpr<P_expr2> d2) copysign(double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<P_e return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_copysign<double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCon _bz_copysign<double,typename P_expr2::T_numtype> >(_bz_ArrayExprConstan
stant<double>(d1), d2); t<double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlacehold er<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPla ceholder<N_index2>,
_bz_copysign<double,int> > > _bz_copysign<double,int> > >
copysign(double d1, IndexPlaceholder<N_index2> d2) copysign(double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlaceholder< N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPlaceh older<N_index2>,
_bz_copysign<double,int> >(_bz_ArrayExprConstant<double>(d1), d2); _bz_copysign<double,int> >(_bz_ArrayExprConstant<double>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_copysign<long double,T_numtype2> > > _bz_copysign<long double,T_numtype2> > >
copysign(long double d1, const Array<T_numtype2, N_rank2>& d2) copysign(long double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, ArrayI terator<T_numtype2, N_rank2>,
_bz_copysign<long double,T_numtype2> >(_bz_ArrayExprConstant<long doubl e>(d1), d2.begin()); _bz_copysign<long double,T_numtype2> >(_bz_ArrayExprConstant<long doubl e>(d1), d2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_copysign<long double,_bz_typename P_expr2::T_numtype> > > _bz_copysign<long double,typename P_expr2::T_numtype> > >
copysign(long double d1, _bz_ArrayExpr<P_expr2> d2) copysign(long double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_copysign<long double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayEx _bz_copysign<long double,typename P_expr2::T_numtype> >(_bz_ArrayExprCo
prConstant<long double>(d1), d2); nstant<long double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Ind exPlaceholder<N_index2>,
_bz_copysign<long double,int> > > _bz_copysign<long double,int> > >
copysign(long double d1, IndexPlaceholder<N_index2> d2) copysign(long double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, IndexP laceholder<N_index2>,
_bz_copysign<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2); _bz_copysign<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayIt erator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , A rrayIterator<T_numtype2, N_rank2>,
_bz_copysign<complex<T1> ,T_numtype2> > > _bz_copysign<complex<T1> ,T_numtype2> > >
copysign(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2) copysign(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayItera tor<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Arra yIterator<T_numtype2, N_rank2>,
_bz_copysign<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T 1> > (d1), d2.begin()); _bz_copysign<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T 1> > (d1), d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_Arr _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _
ayExpr<P_expr2>, bz_ArrayExpr<P_expr2>,
_bz_copysign<complex<T1> ,_bz_typename P_expr2::T_numtype> > > _bz_copysign<complex<T1> ,typename P_expr2::T_numtype> > >
copysign(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2) copysign(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayE return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _bz_
xpr<P_expr2>, ArrayExpr<P_expr2>,
_bz_copysign<complex<T1> ,_bz_typename P_expr2::T_numtype> >(_bz_ArrayE _bz_copysign<complex<T1> ,typename P_expr2::T_numtype> >(_bz_ArrayExprC
xprConstant<complex<T1> > (d1), d2); onstant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPl aceholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , I ndexPlaceholder<N_index2>,
_bz_copysign<complex<T1> ,int> > > _bz_copysign<complex<T1> ,int> > >
copysign(complex<T1> d1, IndexPlaceholder<N_index2> d2) copysign(complex<T1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPlace holder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Inde xPlaceholder<N_index2>,
_bz_copysign<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d 1), d2); _bz_copysign<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d 1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#endif #endif
/************************************************************************** ** /************************************************************************** **
* csqrt * csqrt
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 1226 skipping to change at line 1217
_bz_csqrt<T_numtype1> > > _bz_csqrt<T_numtype1> > >
csqrt(const Array<T_numtype1, N_rank1>& d1) csqrt(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_csqrt<T_numtype1> >(d1.begin()); _bz_csqrt<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_csqrt<_bz_typename P_expr1::T_numtype> > > _bz_csqrt<typename P_expr1::T_numtype> > >
csqrt(_bz_ArrayExpr<P_expr1> d1) csqrt(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_csqrt<_bz_typename P_expr1::T_numtype> >(d1); _bz_csqrt<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_csqrt<int> > > _bz_csqrt<int> > >
csqrt(IndexPlaceholder<N_index1> d1) csqrt(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_csqrt<int> >(d1); _bz_csqrt<int> >(d1);
} }
/************************************************************************** ** /************************************************************************** **
* drem * drem
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_drem<T_numtype1,T_numtype2> > > _bz_drem<T_numtype1,T_numtype2> > >
drem(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2> & d2) drem(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2> & d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, ArrayI terator<T_numtype2, N_rank2>,
_bz_drem<T_numtype1,T_numtype2> >(d1.begin(), d2.begin()); _bz_drem<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
} }
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_drem<T_numtype1,_bz_typename P_expr2::T_numtype> > > _bz_drem<T_numtype1,typename P_expr2::T_numtype> > >
drem(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2) drem(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_drem<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), d2); _bz_drem<T_numtype1,typename P_expr2::T_numtype> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Ind exPlaceholder<N_index2>,
_bz_drem<T_numtype1,int> > > _bz_drem<T_numtype1,int> > >
drem(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2) drem(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, IndexP laceholder<N_index2>,
_bz_drem<T_numtype1,int> >(d1.begin(), d2); _bz_drem<T_numtype1,int> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<float>,
_bz_drem<T_numtype1,float> > > _bz_drem<T_numtype1,float> > >
drem(const Array<T_numtype1, N_rank1>& d1, float d2) drem(const Array<T_numtype1, N_rank1>& d1, float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<float>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<float>,
_bz_drem<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>(d 2)); _bz_drem<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>(d 2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<double>,
_bz_drem<T_numtype1,double> > > _bz_drem<T_numtype1,double> > >
drem(const Array<T_numtype1, N_rank1>& d1, double d2) drem(const Array<T_numtype1, N_rank1>& d1, double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<double>,
_bz_drem<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double> (d2)); _bz_drem<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double> (d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<long double>,
_bz_drem<T_numtype1,long double> > > _bz_drem<T_numtype1,long double> > >
drem(const Array<T_numtype1, N_rank1>& d1, long double d2) drem(const Array<T_numtype1, N_rank1>& d1, long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<long double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<long double>,
_bz_drem<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<lo ng double>(d2)); _bz_drem<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<lo ng double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<complex<T2> > ,
_bz_drem<T_numtype1,complex<T2> > > > _bz_drem<T_numtype1,complex<T2> > > >
drem(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2) drem(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<complex<T2> > , return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<complex<T2> > ,
_bz_drem<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant<c omplex<T2> > (d2)); _bz_drem<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant<c omplex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numty _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T
pe2, N_rank2>, _numtype2, N_rank2>,
_bz_drem<_bz_typename P_expr1::T_numtype,T_numtype2> > > _bz_drem<typename P_expr1::T_numtype,T_numtype2> > >
drem(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2) drem(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numtype2 return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_nu
, N_rank2>, mtype2, N_rank2>,
_bz_drem<_bz_typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin()); _bz_drem<typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin());
} }
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2 _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P
>, _expr2>,
_bz_drem<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numtyp _bz_drem<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
e> > >
drem(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2) drem(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_ex
_bz_drem<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numtyp pr2>,
e> >(d1, d2); _bz_drem<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >(d1,
d2);
} }
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_in _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholde
dex2>, r<N_index2>,
_bz_drem<_bz_typename P_expr1::T_numtype,int> > > _bz_drem<typename P_expr1::T_numtype,int> > >
drem(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2) drem(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_index return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N
2>, _index2>,
_bz_drem<_bz_typename P_expr1::T_numtype,int> >(d1, d2); _bz_drem<typename P_expr1::T_numtype,int> >(d1, d2);
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<float>, nstant<float>,
_bz_drem<_bz_typename P_expr1::T_numtype,float> > > _bz_drem<typename P_expr1::T_numtype,float> > >
drem(_bz_ArrayExpr<P_expr1> d1, float d2) drem(_bz_ArrayExpr<P_expr1> d1, float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<fl return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
oat>, ant<float>,
_bz_drem<_bz_typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprCons _bz_drem<typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprConstant
tant<float>(d2)); <float>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<double>, nstant<double>,
_bz_drem<_bz_typename P_expr1::T_numtype,double> > > _bz_drem<typename P_expr1::T_numtype,double> > >
drem(_bz_ArrayExpr<P_expr1> d1, double d2) drem(_bz_ArrayExpr<P_expr1> d1, double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<do return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
uble>, ant<double>,
_bz_drem<_bz_typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprCon _bz_drem<typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprConstan
stant<double>(d2)); t<double>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<long double>, nstant<long double>,
_bz_drem<_bz_typename P_expr1::T_numtype,long double> > > _bz_drem<typename P_expr1::T_numtype,long double> > >
drem(_bz_ArrayExpr<P_expr1> d1, long double d2) drem(_bz_ArrayExpr<P_expr1> d1, long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<lo return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
ng double>, ant<long double>,
_bz_drem<_bz_typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayEx _bz_drem<typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayExprCo
prConstant<long double>(d2)); nstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<complex<T2> > , nstant<complex<T2> > ,
_bz_drem<_bz_typename P_expr1::T_numtype,complex<T2> > > > _bz_drem<typename P_expr1::T_numtype,complex<T2> > > >
drem(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2) drem(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<co return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
mplex<T2> > , ant<complex<T2> > ,
_bz_drem<_bz_typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_ArrayE _bz_drem<typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_ArrayExprC
xprConstant<complex<T2> > (d2)); onstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_n umtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_drem<int,T_numtype2> > > _bz_drem<int,T_numtype2> > >
drem(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2) drem(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_numt ype2, N_rank2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterator< T_numtype2, N_rank2>,
_bz_drem<int,T_numtype2> >(d1, d2.begin()); _bz_drem<int,T_numtype2> >(d1, d2.begin());
} }
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_e _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_drem<int,_bz_typename P_expr2::T_numtype> > > _bz_drem<int,typename P_expr2::T_numtype> > >
drem(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2) drem(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_expr return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<
2>, P_expr2>,
_bz_drem<int,_bz_typename P_expr2::T_numtype> >(d1, d2); _bz_drem<int,typename P_expr2::T_numtype> >(d1, d2);
} }
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder< N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlaceh older<N_index2>,
_bz_drem<int,int> > > _bz_drem<int,int> > >
drem(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2) drem(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder<N_i ndex2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlacehold er<N_index2>,
_bz_drem<int,int> >(d1, d2); _bz_drem<int,int> >(d1, d2);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<float>,
_bz_drem<int,float> > > _bz_drem<int,float> > >
drem(IndexPlaceholder<N_index1> d1, float d2) drem(IndexPlaceholder<N_index1> d1, float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<float>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<float>,
_bz_drem<int,float> >(d1, _bz_ArrayExprConstant<float>(d2)); _bz_drem<int,float> >(d1, _bz_ArrayExprConstant<float>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<double>,
_bz_drem<int,double> > > _bz_drem<int,double> > >
drem(IndexPlaceholder<N_index1> d1, double d2) drem(IndexPlaceholder<N_index1> d1, double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<double>,
_bz_drem<int,double> >(d1, _bz_ArrayExprConstant<double>(d2)); _bz_drem<int,double> >(d1, _bz_ArrayExprConstant<double>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<long double>,
_bz_drem<int,long double> > > _bz_drem<int,long double> > >
drem(IndexPlaceholder<N_index1> d1, long double d2) drem(IndexPlaceholder<N_index1> d1, long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<long double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<long double>,
_bz_drem<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2)) ; _bz_drem<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2)) ;
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<complex<T2> > ,
_bz_drem<int,complex<T2> > > > _bz_drem<int,complex<T2> > > >
drem(IndexPlaceholder<N_index1> d1, complex<T2> d2) drem(IndexPlaceholder<N_index1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<complex<T2> > , return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<complex<T2> > ,
_bz_drem<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d 2)); _bz_drem<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d 2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T _numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIter ator<T_numtype2, N_rank2>,
_bz_drem<float,T_numtype2> > > _bz_drem<float,T_numtype2> > >
drem(float d1, const Array<T_numtype2, N_rank2>& d2) drem(float d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T_nu mtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIterato r<T_numtype2, N_rank2>,
_bz_drem<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begin ()); _bz_drem<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begin ());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_Array
_expr2>, Expr<P_expr2>,
_bz_drem<float,_bz_typename P_expr2::T_numtype> > > _bz_drem<float,typename P_expr2::T_numtype> > >
drem(float d1, _bz_ArrayExpr<P_expr2> d2) drem(float d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P_ex return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_ArrayExp
pr2>, r<P_expr2>,
_bz_drem<float,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConstant _bz_drem<float,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<flo
<float>(d1), d2); at>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholde r<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlac eholder<N_index2>,
_bz_drem<float,int> > > _bz_drem<float,int> > >
drem(float d1, IndexPlaceholder<N_index2> d2) drem(float d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholder<N _index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlaceho lder<N_index2>,
_bz_drem<float,int> >(_bz_ArrayExprConstant<float>(d1), d2); _bz_drem<float,int> >(_bz_ArrayExprConstant<float>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator< T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIte rator<T_numtype2, N_rank2>,
_bz_drem<double,T_numtype2> > > _bz_drem<double,T_numtype2> > >
drem(double d1, const Array<T_numtype2, N_rank2>& d2) drem(double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator<T_n umtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_drem<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.beg in()); _bz_drem<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.beg in());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr< _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_Arra
P_expr2>, yExpr<P_expr2>,
_bz_drem<double,_bz_typename P_expr2::T_numtype> > > _bz_drem<double,typename P_expr2::T_numtype> > >
drem(double d1, _bz_ArrayExpr<P_expr2> d2) drem(double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<P_e return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_drem<double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConstan _bz_drem<double,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<do
t<double>(d1), d2); uble>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlacehold er<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPla ceholder<N_index2>,
_bz_drem<double,int> > > _bz_drem<double,int> > >
drem(double d1, IndexPlaceholder<N_index2> d2) drem(double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlaceholder< N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPlaceh older<N_index2>,
_bz_drem<double,int> >(_bz_ArrayExprConstant<double>(d1), d2); _bz_drem<double,int> >(_bz_ArrayExprConstant<double>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_drem<long double,T_numtype2> > > _bz_drem<long double,T_numtype2> > >
drem(long double d1, const Array<T_numtype2, N_rank2>& d2) drem(long double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, ArrayI terator<T_numtype2, N_rank2>,
_bz_drem<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>(d 1), d2.begin()); _bz_drem<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>(d 1), d2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_drem<long double,_bz_typename P_expr2::T_numtype> > > _bz_drem<long double,typename P_expr2::T_numtype> > >
drem(long double d1, _bz_ArrayExpr<P_expr2> d2) drem(long double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_drem<long double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCo _bz_drem<long double,typename P_expr2::T_numtype> >(_bz_ArrayExprConsta
nstant<long double>(d1), d2); nt<long double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Ind exPlaceholder<N_index2>,
_bz_drem<long double,int> > > _bz_drem<long double,int> > >
drem(long double d1, IndexPlaceholder<N_index2> d2) drem(long double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, IndexP laceholder<N_index2>,
_bz_drem<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2) ; _bz_drem<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2) ;
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayIt erator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , A rrayIterator<T_numtype2, N_rank2>,
_bz_drem<complex<T1> ,T_numtype2> > > _bz_drem<complex<T1> ,T_numtype2> > >
drem(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2) drem(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayItera tor<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Arra yIterator<T_numtype2, N_rank2>,
_bz_drem<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin()); _bz_drem<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_Arr _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _
ayExpr<P_expr2>, bz_ArrayExpr<P_expr2>,
_bz_drem<complex<T1> ,_bz_typename P_expr2::T_numtype> > > _bz_drem<complex<T1> ,typename P_expr2::T_numtype> > >
drem(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2) drem(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayE return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _bz_
xpr<P_expr2>, ArrayExpr<P_expr2>,
_bz_drem<complex<T1> ,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprC _bz_drem<complex<T1> ,typename P_expr2::T_numtype> >(_bz_ArrayExprConst
onstant<complex<T1> > (d1), d2); ant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPl aceholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , I ndexPlaceholder<N_index2>,
_bz_drem<complex<T1> ,int> > > _bz_drem<complex<T1> ,int> > >
drem(complex<T1> d1, IndexPlaceholder<N_index2> d2) drem(complex<T1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPlace holder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Inde xPlaceholder<N_index2>,
_bz_drem<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2); _bz_drem<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#endif #endif
/************************************************************************** ** /************************************************************************** **
* exp * exp
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 1615 skipping to change at line 1606
_bz_exp<T_numtype1> > > _bz_exp<T_numtype1> > >
exp(const Array<T_numtype1, N_rank1>& d1) exp(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_exp<T_numtype1> >(d1.begin()); _bz_exp<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_exp<_bz_typename P_expr1::T_numtype> > > _bz_exp<typename P_expr1::T_numtype> > >
exp(_bz_ArrayExpr<P_expr1> d1) exp(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_exp<_bz_typename P_expr1::T_numtype> >(d1); _bz_exp<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_exp<int> > > _bz_exp<int> > >
exp(IndexPlaceholder<N_index1> d1) exp(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_exp<int> >(d1); _bz_exp<int> >(d1);
skipping to change at line 1650 skipping to change at line 1641
_bz_expm1<T_numtype1> > > _bz_expm1<T_numtype1> > >
expm1(const Array<T_numtype1, N_rank1>& d1) expm1(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_expm1<T_numtype1> >(d1.begin()); _bz_expm1<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_expm1<_bz_typename P_expr1::T_numtype> > > _bz_expm1<typename P_expr1::T_numtype> > >
expm1(_bz_ArrayExpr<P_expr1> d1) expm1(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_expm1<_bz_typename P_expr1::T_numtype> >(d1); _bz_expm1<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_expm1<int> > > _bz_expm1<int> > >
expm1(IndexPlaceholder<N_index1> d1) expm1(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_expm1<int> >(d1); _bz_expm1<int> >(d1);
skipping to change at line 1687 skipping to change at line 1678
_bz_erf<T_numtype1> > > _bz_erf<T_numtype1> > >
erf(const Array<T_numtype1, N_rank1>& d1) erf(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_erf<T_numtype1> >(d1.begin()); _bz_erf<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_erf<_bz_typename P_expr1::T_numtype> > > _bz_erf<typename P_expr1::T_numtype> > >
erf(_bz_ArrayExpr<P_expr1> d1) erf(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_erf<_bz_typename P_expr1::T_numtype> >(d1); _bz_erf<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_erf<int> > > _bz_erf<int> > >
erf(IndexPlaceholder<N_index1> d1) erf(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_erf<int> >(d1); _bz_erf<int> >(d1);
skipping to change at line 1724 skipping to change at line 1715
_bz_erfc<T_numtype1> > > _bz_erfc<T_numtype1> > >
erfc(const Array<T_numtype1, N_rank1>& d1) erfc(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_erfc<T_numtype1> >(d1.begin()); _bz_erfc<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_erfc<_bz_typename P_expr1::T_numtype> > > _bz_erfc<typename P_expr1::T_numtype> > >
erfc(_bz_ArrayExpr<P_expr1> d1) erfc(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_erfc<_bz_typename P_expr1::T_numtype> >(d1); _bz_erfc<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_erfc<int> > > _bz_erfc<int> > >
erfc(IndexPlaceholder<N_index1> d1) erfc(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_erfc<int> >(d1); _bz_erfc<int> >(d1);
skipping to change at line 1760 skipping to change at line 1751
_bz_abs<T_numtype1> > > _bz_abs<T_numtype1> > >
fabs(const Array<T_numtype1, N_rank1>& d1) fabs(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_abs<T_numtype1> >(d1.begin()); _bz_abs<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > > _bz_abs<typename P_expr1::T_numtype> > >
fabs(_bz_ArrayExpr<P_expr1> d1) fabs(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> >(d1); _bz_abs<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_abs<int> > > _bz_abs<int> > >
fabs(IndexPlaceholder<N_index1> d1) fabs(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_abs<int> >(d1); _bz_abs<int> >(d1);
skipping to change at line 1794 skipping to change at line 1785
_bz_floor<T_numtype1> > > _bz_floor<T_numtype1> > >
floor(const Array<T_numtype1, N_rank1>& d1) floor(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_floor<T_numtype1> >(d1.begin()); _bz_floor<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_floor<_bz_typename P_expr1::T_numtype> > > _bz_floor<typename P_expr1::T_numtype> > >
floor(_bz_ArrayExpr<P_expr1> d1) floor(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_floor<_bz_typename P_expr1::T_numtype> >(d1); _bz_floor<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_floor<int> > > _bz_floor<int> > >
floor(IndexPlaceholder<N_index1> d1) floor(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_floor<int> >(d1); _bz_floor<int> >(d1);
} }
/************************************************************************** ** /************************************************************************** **
* fmod * fmod
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_fmod<T_numtype1,T_numtype2> > > _bz_fmod<T_numtype1,T_numtype2> > >
fmod(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2> & d2) fmod(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2> & d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, ArrayI terator<T_numtype2, N_rank2>,
_bz_fmod<T_numtype1,T_numtype2> >(d1.begin(), d2.begin()); _bz_fmod<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
} }
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_fmod<T_numtype1,_bz_typename P_expr2::T_numtype> > > _bz_fmod<T_numtype1,typename P_expr2::T_numtype> > >
fmod(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2) fmod(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_fmod<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), d2); _bz_fmod<T_numtype1,typename P_expr2::T_numtype> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Ind exPlaceholder<N_index2>,
_bz_fmod<T_numtype1,int> > > _bz_fmod<T_numtype1,int> > >
fmod(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2) fmod(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, IndexP laceholder<N_index2>,
_bz_fmod<T_numtype1,int> >(d1.begin(), d2); _bz_fmod<T_numtype1,int> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<float>,
_bz_fmod<T_numtype1,float> > > _bz_fmod<T_numtype1,float> > >
fmod(const Array<T_numtype1, N_rank1>& d1, float d2) fmod(const Array<T_numtype1, N_rank1>& d1, float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<float>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<float>,
_bz_fmod<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>(d 2)); _bz_fmod<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>(d 2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<double>,
_bz_fmod<T_numtype1,double> > > _bz_fmod<T_numtype1,double> > >
fmod(const Array<T_numtype1, N_rank1>& d1, double d2) fmod(const Array<T_numtype1, N_rank1>& d1, double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<double>,
_bz_fmod<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double> (d2)); _bz_fmod<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double> (d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<long double>,
_bz_fmod<T_numtype1,long double> > > _bz_fmod<T_numtype1,long double> > >
fmod(const Array<T_numtype1, N_rank1>& d1, long double d2) fmod(const Array<T_numtype1, N_rank1>& d1, long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<long double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<long double>,
_bz_fmod<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<lo ng double>(d2)); _bz_fmod<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<lo ng double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<complex<T2> > ,
_bz_fmod<T_numtype1,complex<T2> > > > _bz_fmod<T_numtype1,complex<T2> > > >
fmod(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2) fmod(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<complex<T2> > , return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<complex<T2> > ,
_bz_fmod<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant<c omplex<T2> > (d2)); _bz_fmod<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant<c omplex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numty _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T
pe2, N_rank2>, _numtype2, N_rank2>,
_bz_fmod<_bz_typename P_expr1::T_numtype,T_numtype2> > > _bz_fmod<typename P_expr1::T_numtype,T_numtype2> > >
fmod(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2) fmod(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numtype2 return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_nu
, N_rank2>, mtype2, N_rank2>,
_bz_fmod<_bz_typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin()); _bz_fmod<typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin());
} }
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2 _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P
>, _expr2>,
_bz_fmod<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numtyp _bz_fmod<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
e> > >
fmod(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2) fmod(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_ex
_bz_fmod<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numtyp pr2>,
e> >(d1, d2); _bz_fmod<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >(d1,
d2);
} }
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_in _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholde
dex2>, r<N_index2>,
_bz_fmod<_bz_typename P_expr1::T_numtype,int> > > _bz_fmod<typename P_expr1::T_numtype,int> > >
fmod(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2) fmod(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_index return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N
2>, _index2>,
_bz_fmod<_bz_typename P_expr1::T_numtype,int> >(d1, d2); _bz_fmod<typename P_expr1::T_numtype,int> >(d1, d2);
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<float>, nstant<float>,
_bz_fmod<_bz_typename P_expr1::T_numtype,float> > > _bz_fmod<typename P_expr1::T_numtype,float> > >
fmod(_bz_ArrayExpr<P_expr1> d1, float d2) fmod(_bz_ArrayExpr<P_expr1> d1, float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<fl return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
oat>, ant<float>,
_bz_fmod<_bz_typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprCons _bz_fmod<typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprConstant
tant<float>(d2)); <float>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<double>, nstant<double>,
_bz_fmod<_bz_typename P_expr1::T_numtype,double> > > _bz_fmod<typename P_expr1::T_numtype,double> > >
fmod(_bz_ArrayExpr<P_expr1> d1, double d2) fmod(_bz_ArrayExpr<P_expr1> d1, double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<do return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
uble>, ant<double>,
_bz_fmod<_bz_typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprCon _bz_fmod<typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprConstan
stant<double>(d2)); t<double>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<long double>, nstant<long double>,
_bz_fmod<_bz_typename P_expr1::T_numtype,long double> > > _bz_fmod<typename P_expr1::T_numtype,long double> > >
fmod(_bz_ArrayExpr<P_expr1> d1, long double d2) fmod(_bz_ArrayExpr<P_expr1> d1, long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<lo return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
ng double>, ant<long double>,
_bz_fmod<_bz_typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayEx _bz_fmod<typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayExprCo
prConstant<long double>(d2)); nstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<complex<T2> > , nstant<complex<T2> > ,
_bz_fmod<_bz_typename P_expr1::T_numtype,complex<T2> > > > _bz_fmod<typename P_expr1::T_numtype,complex<T2> > > >
fmod(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2) fmod(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<co return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
mplex<T2> > , ant<complex<T2> > ,
_bz_fmod<_bz_typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_ArrayE _bz_fmod<typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_ArrayExprC
xprConstant<complex<T2> > (d2)); onstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_n umtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_fmod<int,T_numtype2> > > _bz_fmod<int,T_numtype2> > >
fmod(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2) fmod(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_numt ype2, N_rank2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterator< T_numtype2, N_rank2>,
_bz_fmod<int,T_numtype2> >(d1, d2.begin()); _bz_fmod<int,T_numtype2> >(d1, d2.begin());
} }
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_e _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_fmod<int,_bz_typename P_expr2::T_numtype> > > _bz_fmod<int,typename P_expr2::T_numtype> > >
fmod(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2) fmod(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_expr return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<
2>, P_expr2>,
_bz_fmod<int,_bz_typename P_expr2::T_numtype> >(d1, d2); _bz_fmod<int,typename P_expr2::T_numtype> >(d1, d2);
} }
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder< N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlaceh older<N_index2>,
_bz_fmod<int,int> > > _bz_fmod<int,int> > >
fmod(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2) fmod(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder<N_i ndex2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlacehold er<N_index2>,
_bz_fmod<int,int> >(d1, d2); _bz_fmod<int,int> >(d1, d2);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<float>,
_bz_fmod<int,float> > > _bz_fmod<int,float> > >
fmod(IndexPlaceholder<N_index1> d1, float d2) fmod(IndexPlaceholder<N_index1> d1, float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<float>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<float>,
_bz_fmod<int,float> >(d1, _bz_ArrayExprConstant<float>(d2)); _bz_fmod<int,float> >(d1, _bz_ArrayExprConstant<float>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<double>,
_bz_fmod<int,double> > > _bz_fmod<int,double> > >
fmod(IndexPlaceholder<N_index1> d1, double d2) fmod(IndexPlaceholder<N_index1> d1, double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<double>,
_bz_fmod<int,double> >(d1, _bz_ArrayExprConstant<double>(d2)); _bz_fmod<int,double> >(d1, _bz_ArrayExprConstant<double>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<long double>,
_bz_fmod<int,long double> > > _bz_fmod<int,long double> > >
fmod(IndexPlaceholder<N_index1> d1, long double d2) fmod(IndexPlaceholder<N_index1> d1, long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<long double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<long double>,
_bz_fmod<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2)) ; _bz_fmod<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2)) ;
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<complex<T2> > ,
_bz_fmod<int,complex<T2> > > > _bz_fmod<int,complex<T2> > > >
fmod(IndexPlaceholder<N_index1> d1, complex<T2> d2) fmod(IndexPlaceholder<N_index1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<complex<T2> > , return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<complex<T2> > ,
_bz_fmod<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d 2)); _bz_fmod<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d 2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T _numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIter ator<T_numtype2, N_rank2>,
_bz_fmod<float,T_numtype2> > > _bz_fmod<float,T_numtype2> > >
fmod(float d1, const Array<T_numtype2, N_rank2>& d2) fmod(float d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T_nu mtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIterato r<T_numtype2, N_rank2>,
_bz_fmod<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begin ()); _bz_fmod<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begin ());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_Array
_expr2>, Expr<P_expr2>,
_bz_fmod<float,_bz_typename P_expr2::T_numtype> > > _bz_fmod<float,typename P_expr2::T_numtype> > >
fmod(float d1, _bz_ArrayExpr<P_expr2> d2) fmod(float d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P_ex return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_ArrayExp
pr2>, r<P_expr2>,
_bz_fmod<float,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConstant _bz_fmod<float,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<flo
<float>(d1), d2); at>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholde r<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlac eholder<N_index2>,
_bz_fmod<float,int> > > _bz_fmod<float,int> > >
fmod(float d1, IndexPlaceholder<N_index2> d2) fmod(float d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholder<N _index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlaceho lder<N_index2>,
_bz_fmod<float,int> >(_bz_ArrayExprConstant<float>(d1), d2); _bz_fmod<float,int> >(_bz_ArrayExprConstant<float>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator< T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIte rator<T_numtype2, N_rank2>,
_bz_fmod<double,T_numtype2> > > _bz_fmod<double,T_numtype2> > >
fmod(double d1, const Array<T_numtype2, N_rank2>& d2) fmod(double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator<T_n umtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_fmod<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.beg in()); _bz_fmod<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.beg in());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr< _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_Arra
P_expr2>, yExpr<P_expr2>,
_bz_fmod<double,_bz_typename P_expr2::T_numtype> > > _bz_fmod<double,typename P_expr2::T_numtype> > >
fmod(double d1, _bz_ArrayExpr<P_expr2> d2) fmod(double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<P_e return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_fmod<double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConstan _bz_fmod<double,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<do
t<double>(d1), d2); uble>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlacehold er<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPla ceholder<N_index2>,
_bz_fmod<double,int> > > _bz_fmod<double,int> > >
fmod(double d1, IndexPlaceholder<N_index2> d2) fmod(double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlaceholder< N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPlaceh older<N_index2>,
_bz_fmod<double,int> >(_bz_ArrayExprConstant<double>(d1), d2); _bz_fmod<double,int> >(_bz_ArrayExprConstant<double>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_fmod<long double,T_numtype2> > > _bz_fmod<long double,T_numtype2> > >
fmod(long double d1, const Array<T_numtype2, N_rank2>& d2) fmod(long double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, ArrayI terator<T_numtype2, N_rank2>,
_bz_fmod<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>(d 1), d2.begin()); _bz_fmod<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>(d 1), d2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_fmod<long double,_bz_typename P_expr2::T_numtype> > > _bz_fmod<long double,typename P_expr2::T_numtype> > >
fmod(long double d1, _bz_ArrayExpr<P_expr2> d2) fmod(long double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_fmod<long double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCo _bz_fmod<long double,typename P_expr2::T_numtype> >(_bz_ArrayExprConsta
nstant<long double>(d1), d2); nt<long double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Ind exPlaceholder<N_index2>,
_bz_fmod<long double,int> > > _bz_fmod<long double,int> > >
fmod(long double d1, IndexPlaceholder<N_index2> d2) fmod(long double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, IndexP laceholder<N_index2>,
_bz_fmod<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2) ; _bz_fmod<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2) ;
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayIt erator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , A rrayIterator<T_numtype2, N_rank2>,
_bz_fmod<complex<T1> ,T_numtype2> > > _bz_fmod<complex<T1> ,T_numtype2> > >
fmod(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2) fmod(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayItera tor<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Arra yIterator<T_numtype2, N_rank2>,
_bz_fmod<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin()); _bz_fmod<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_Arr _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _
ayExpr<P_expr2>, bz_ArrayExpr<P_expr2>,
_bz_fmod<complex<T1> ,_bz_typename P_expr2::T_numtype> > > _bz_fmod<complex<T1> ,typename P_expr2::T_numtype> > >
fmod(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2) fmod(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayE return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _bz_
xpr<P_expr2>, ArrayExpr<P_expr2>,
_bz_fmod<complex<T1> ,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprC _bz_fmod<complex<T1> ,typename P_expr2::T_numtype> >(_bz_ArrayExprConst
onstant<complex<T1> > (d1), d2); ant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPl aceholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , I ndexPlaceholder<N_index2>,
_bz_fmod<complex<T1> ,int> > > _bz_fmod<complex<T1> ,int> > >
fmod(complex<T1> d1, IndexPlaceholder<N_index2> d2) fmod(complex<T1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPlace holder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Inde xPlaceholder<N_index2>,
_bz_fmod<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2); _bz_fmod<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#endif #endif
/************************************************************************** ** /************************************************************************** **
* hypot * hypot
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_hypot<T_numtype1,T_numtype2> > > _bz_hypot<T_numtype1,T_numtype2> > >
hypot(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2 >& d2) hypot(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2 >& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, ArrayI terator<T_numtype2, N_rank2>,
_bz_hypot<T_numtype1,T_numtype2> >(d1.begin(), d2.begin()); _bz_hypot<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
} }
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_hypot<T_numtype1,_bz_typename P_expr2::T_numtype> > > _bz_hypot<T_numtype1,typename P_expr2::T_numtype> > >
hypot(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2) hypot(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_hypot<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), d2) _bz_hypot<T_numtype1,typename P_expr2::T_numtype> >(d1.begin(), d2);
;
} }
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Ind exPlaceholder<N_index2>,
_bz_hypot<T_numtype1,int> > > _bz_hypot<T_numtype1,int> > >
hypot(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2) hypot(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, IndexP laceholder<N_index2>,
_bz_hypot<T_numtype1,int> >(d1.begin(), d2); _bz_hypot<T_numtype1,int> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<float>,
_bz_hypot<T_numtype1,float> > > _bz_hypot<T_numtype1,float> > >
hypot(const Array<T_numtype1, N_rank1>& d1, float d2) hypot(const Array<T_numtype1, N_rank1>& d1, float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<float>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<float>,
_bz_hypot<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>( d2)); _bz_hypot<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>( d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<double>,
_bz_hypot<T_numtype1,double> > > _bz_hypot<T_numtype1,double> > >
hypot(const Array<T_numtype1, N_rank1>& d1, double d2) hypot(const Array<T_numtype1, N_rank1>& d1, double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<double>,
_bz_hypot<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double >(d2)); _bz_hypot<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double >(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<long double>,
_bz_hypot<T_numtype1,long double> > > _bz_hypot<T_numtype1,long double> > >
hypot(const Array<T_numtype1, N_rank1>& d1, long double d2) hypot(const Array<T_numtype1, N_rank1>& d1, long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<long double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<long double>,
_bz_hypot<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<l ong double>(d2)); _bz_hypot<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<l ong double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<complex<T2> > ,
_bz_hypot<T_numtype1,complex<T2> > > > _bz_hypot<T_numtype1,complex<T2> > > >
hypot(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2) hypot(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<complex<T2> > , return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<complex<T2> > ,
_bz_hypot<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant< complex<T2> > (d2)); _bz_hypot<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant< complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numty _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T
pe2, N_rank2>, _numtype2, N_rank2>,
_bz_hypot<_bz_typename P_expr1::T_numtype,T_numtype2> > > _bz_hypot<typename P_expr1::T_numtype,T_numtype2> > >
hypot(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2) hypot(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numtype2 return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_nu
, N_rank2>, mtype2, N_rank2>,
_bz_hypot<_bz_typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin()) _bz_hypot<typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin());
;
} }
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2 _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P
>, _expr2>,
_bz_hypot<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numty _bz_hypot<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
pe> > >
hypot(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2) hypot(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_ex
_bz_hypot<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numty pr2>,
pe> >(d1, d2); _bz_hypot<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >(d1
, d2);
} }
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_in _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholde
dex2>, r<N_index2>,
_bz_hypot<_bz_typename P_expr1::T_numtype,int> > > _bz_hypot<typename P_expr1::T_numtype,int> > >
hypot(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2) hypot(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_index return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N
2>, _index2>,
_bz_hypot<_bz_typename P_expr1::T_numtype,int> >(d1, d2); _bz_hypot<typename P_expr1::T_numtype,int> >(d1, d2);
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<float>, nstant<float>,
_bz_hypot<_bz_typename P_expr1::T_numtype,float> > > _bz_hypot<typename P_expr1::T_numtype,float> > >
hypot(_bz_ArrayExpr<P_expr1> d1, float d2) hypot(_bz_ArrayExpr<P_expr1> d1, float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<fl return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
oat>, ant<float>,
_bz_hypot<_bz_typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprCon _bz_hypot<typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprConstan
stant<float>(d2)); t<float>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<double>, nstant<double>,
_bz_hypot<_bz_typename P_expr1::T_numtype,double> > > _bz_hypot<typename P_expr1::T_numtype,double> > >
hypot(_bz_ArrayExpr<P_expr1> d1, double d2) hypot(_bz_ArrayExpr<P_expr1> d1, double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<do return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
uble>, ant<double>,
_bz_hypot<_bz_typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprCo _bz_hypot<typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprConsta
nstant<double>(d2)); nt<double>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<long double>, nstant<long double>,
_bz_hypot<_bz_typename P_expr1::T_numtype,long double> > > _bz_hypot<typename P_expr1::T_numtype,long double> > >
hypot(_bz_ArrayExpr<P_expr1> d1, long double d2) hypot(_bz_ArrayExpr<P_expr1> d1, long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<lo return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
ng double>, ant<long double>,
_bz_hypot<_bz_typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayE _bz_hypot<typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayExprC
xprConstant<long double>(d2)); onstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<complex<T2> > , nstant<complex<T2> > ,
_bz_hypot<_bz_typename P_expr1::T_numtype,complex<T2> > > > _bz_hypot<typename P_expr1::T_numtype,complex<T2> > > >
hypot(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2) hypot(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<co return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
mplex<T2> > , ant<complex<T2> > ,
_bz_hypot<_bz_typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_Array _bz_hypot<typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_ArrayExpr
ExprConstant<complex<T2> > (d2)); Constant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_n umtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_hypot<int,T_numtype2> > > _bz_hypot<int,T_numtype2> > >
hypot(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2) hypot(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_numt ype2, N_rank2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterator< T_numtype2, N_rank2>,
_bz_hypot<int,T_numtype2> >(d1, d2.begin()); _bz_hypot<int,T_numtype2> >(d1, d2.begin());
} }
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_e _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_hypot<int,_bz_typename P_expr2::T_numtype> > > _bz_hypot<int,typename P_expr2::T_numtype> > >
hypot(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2) hypot(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_expr return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<
2>, P_expr2>,
_bz_hypot<int,_bz_typename P_expr2::T_numtype> >(d1, d2); _bz_hypot<int,typename P_expr2::T_numtype> >(d1, d2);
} }
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder< N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlaceh older<N_index2>,
_bz_hypot<int,int> > > _bz_hypot<int,int> > >
hypot(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2) hypot(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder<N_i ndex2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlacehold er<N_index2>,
_bz_hypot<int,int> >(d1, d2); _bz_hypot<int,int> >(d1, d2);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<float>,
_bz_hypot<int,float> > > _bz_hypot<int,float> > >
hypot(IndexPlaceholder<N_index1> d1, float d2) hypot(IndexPlaceholder<N_index1> d1, float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<float>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<float>,
_bz_hypot<int,float> >(d1, _bz_ArrayExprConstant<float>(d2)); _bz_hypot<int,float> >(d1, _bz_ArrayExprConstant<float>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<double>,
_bz_hypot<int,double> > > _bz_hypot<int,double> > >
hypot(IndexPlaceholder<N_index1> d1, double d2) hypot(IndexPlaceholder<N_index1> d1, double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<double>,
_bz_hypot<int,double> >(d1, _bz_ArrayExprConstant<double>(d2)); _bz_hypot<int,double> >(d1, _bz_ArrayExprConstant<double>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<long double>,
_bz_hypot<int,long double> > > _bz_hypot<int,long double> > >
hypot(IndexPlaceholder<N_index1> d1, long double d2) hypot(IndexPlaceholder<N_index1> d1, long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<long double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<long double>,
_bz_hypot<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2) ); _bz_hypot<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2) );
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<complex<T2> > ,
_bz_hypot<int,complex<T2> > > > _bz_hypot<int,complex<T2> > > >
hypot(IndexPlaceholder<N_index1> d1, complex<T2> d2) hypot(IndexPlaceholder<N_index1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<complex<T2> > , return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<complex<T2> > ,
_bz_hypot<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > ( d2)); _bz_hypot<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > ( d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T _numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIter ator<T_numtype2, N_rank2>,
_bz_hypot<float,T_numtype2> > > _bz_hypot<float,T_numtype2> > >
hypot(float d1, const Array<T_numtype2, N_rank2>& d2) hypot(float d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T_nu mtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIterato r<T_numtype2, N_rank2>,
_bz_hypot<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begi n()); _bz_hypot<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begi n());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_Array
_expr2>, Expr<P_expr2>,
_bz_hypot<float,_bz_typename P_expr2::T_numtype> > > _bz_hypot<float,typename P_expr2::T_numtype> > >
hypot(float d1, _bz_ArrayExpr<P_expr2> d2) hypot(float d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P_ex return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_ArrayExp
pr2>, r<P_expr2>,
_bz_hypot<float,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConstan _bz_hypot<float,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<fl
t<float>(d1), d2); oat>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholde r<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlac eholder<N_index2>,
_bz_hypot<float,int> > > _bz_hypot<float,int> > >
hypot(float d1, IndexPlaceholder<N_index2> d2) hypot(float d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholder<N _index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlaceho lder<N_index2>,
_bz_hypot<float,int> >(_bz_ArrayExprConstant<float>(d1), d2); _bz_hypot<float,int> >(_bz_ArrayExprConstant<float>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator< T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIte rator<T_numtype2, N_rank2>,
_bz_hypot<double,T_numtype2> > > _bz_hypot<double,T_numtype2> > >
hypot(double d1, const Array<T_numtype2, N_rank2>& d2) hypot(double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator<T_n umtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_hypot<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.be gin()); _bz_hypot<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.be gin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr< _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_Arra
P_expr2>, yExpr<P_expr2>,
_bz_hypot<double,_bz_typename P_expr2::T_numtype> > > _bz_hypot<double,typename P_expr2::T_numtype> > >
hypot(double d1, _bz_ArrayExpr<P_expr2> d2) hypot(double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<P_e return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_hypot<double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConsta _bz_hypot<double,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<d
nt<double>(d1), d2); ouble>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlacehold er<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPla ceholder<N_index2>,
_bz_hypot<double,int> > > _bz_hypot<double,int> > >
hypot(double d1, IndexPlaceholder<N_index2> d2) hypot(double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlaceholder< N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPlaceh older<N_index2>,
_bz_hypot<double,int> >(_bz_ArrayExprConstant<double>(d1), d2); _bz_hypot<double,int> >(_bz_ArrayExprConstant<double>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_hypot<long double,T_numtype2> > > _bz_hypot<long double,T_numtype2> > >
hypot(long double d1, const Array<T_numtype2, N_rank2>& d2) hypot(long double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, ArrayI terator<T_numtype2, N_rank2>,
_bz_hypot<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>( d1), d2.begin()); _bz_hypot<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>( d1), d2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_hypot<long double,_bz_typename P_expr2::T_numtype> > > _bz_hypot<long double,typename P_expr2::T_numtype> > >
hypot(long double d1, _bz_ArrayExpr<P_expr2> d2) hypot(long double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_hypot<long double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprC _bz_hypot<long double,typename P_expr2::T_numtype> >(_bz_ArrayExprConst
onstant<long double>(d1), d2); ant<long double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Ind exPlaceholder<N_index2>,
_bz_hypot<long double,int> > > _bz_hypot<long double,int> > >
hypot(long double d1, IndexPlaceholder<N_index2> d2) hypot(long double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, IndexP laceholder<N_index2>,
_bz_hypot<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2 ); _bz_hypot<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2 );
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayIt erator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , A rrayIterator<T_numtype2, N_rank2>,
_bz_hypot<complex<T1> ,T_numtype2> > > _bz_hypot<complex<T1> ,T_numtype2> > >
hypot(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2) hypot(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayItera tor<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Arra yIterator<T_numtype2, N_rank2>,
_bz_hypot<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin()); _bz_hypot<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_Arr _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _
ayExpr<P_expr2>, bz_ArrayExpr<P_expr2>,
_bz_hypot<complex<T1> ,_bz_typename P_expr2::T_numtype> > > _bz_hypot<complex<T1> ,typename P_expr2::T_numtype> > >
hypot(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2) hypot(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayE return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _bz_
xpr<P_expr2>, ArrayExpr<P_expr2>,
_bz_hypot<complex<T1> ,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExpr _bz_hypot<complex<T1> ,typename P_expr2::T_numtype> >(_bz_ArrayExprCons
Constant<complex<T1> > (d1), d2); tant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPl aceholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , I ndexPlaceholder<N_index2>,
_bz_hypot<complex<T1> ,int> > > _bz_hypot<complex<T1> ,int> > >
hypot(complex<T1> d1, IndexPlaceholder<N_index2> d2) hypot(complex<T1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPlace holder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Inde xPlaceholder<N_index2>,
_bz_hypot<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2); _bz_hypot<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#endif #endif
/************************************************************************** ** /************************************************************************** **
* ilogb * ilogb
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 2539 skipping to change at line 2530
_bz_ilogb<T_numtype1> > > _bz_ilogb<T_numtype1> > >
ilogb(const Array<T_numtype1, N_rank1>& d1) ilogb(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_ilogb<T_numtype1> >(d1.begin()); _bz_ilogb<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ilogb<_bz_typename P_expr1::T_numtype> > > _bz_ilogb<typename P_expr1::T_numtype> > >
ilogb(_bz_ArrayExpr<P_expr1> d1) ilogb(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_ilogb<_bz_typename P_expr1::T_numtype> >(d1); _bz_ilogb<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_ilogb<int> > > _bz_ilogb<int> > >
ilogb(IndexPlaceholder<N_index1> d1) ilogb(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_ilogb<int> >(d1); _bz_ilogb<int> >(d1);
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* blitz_isnan * isnan
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_blitz_isnan<T_numtype1> > > _bz_isnan<T_numtype1> > >
blitz_isnan(const Array<T_numtype1, N_rank1>& d1) isnan(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_blitz_isnan<T_numtype1> >(d1.begin()); _bz_isnan<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_blitz_isnan<_bz_typename P_expr1::T_numtype> > > _bz_isnan<typename P_expr1::T_numtype> > >
blitz_isnan(_bz_ArrayExpr<P_expr1> d1) isnan(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_blitz_isnan<_bz_typename P_expr1::T_numtype> >(d1); _bz_isnan<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_blitz_isnan<int> > > _bz_isnan<int> > >
blitz_isnan(IndexPlaceholder<N_index1> d1) isnan(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_blitz_isnan<int> >(d1); _bz_isnan<int> >(d1);
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* itrunc * itrunc
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
skipping to change at line 2613 skipping to change at line 2604
_bz_itrunc<T_numtype1> > > _bz_itrunc<T_numtype1> > >
itrunc(const Array<T_numtype1, N_rank1>& d1) itrunc(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_itrunc<T_numtype1> >(d1.begin()); _bz_itrunc<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_itrunc<_bz_typename P_expr1::T_numtype> > > _bz_itrunc<typename P_expr1::T_numtype> > >
itrunc(_bz_ArrayExpr<P_expr1> d1) itrunc(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_itrunc<_bz_typename P_expr1::T_numtype> >(d1); _bz_itrunc<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_itrunc<int> > > _bz_itrunc<int> > >
itrunc(IndexPlaceholder<N_index1> d1) itrunc(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_itrunc<int> >(d1); _bz_itrunc<int> >(d1);
skipping to change at line 2650 skipping to change at line 2641
_bz_j0<T_numtype1> > > _bz_j0<T_numtype1> > >
j0(const Array<T_numtype1, N_rank1>& d1) j0(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_j0<T_numtype1> >(d1.begin()); _bz_j0<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_j0<_bz_typename P_expr1::T_numtype> > > _bz_j0<typename P_expr1::T_numtype> > >
j0(_bz_ArrayExpr<P_expr1> d1) j0(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_j0<_bz_typename P_expr1::T_numtype> >(d1); _bz_j0<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_j0<int> > > _bz_j0<int> > >
j0(IndexPlaceholder<N_index1> d1) j0(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_j0<int> >(d1); _bz_j0<int> >(d1);
skipping to change at line 2687 skipping to change at line 2678
_bz_j1<T_numtype1> > > _bz_j1<T_numtype1> > >
j1(const Array<T_numtype1, N_rank1>& d1) j1(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_j1<T_numtype1> >(d1.begin()); _bz_j1<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_j1<_bz_typename P_expr1::T_numtype> > > _bz_j1<typename P_expr1::T_numtype> > >
j1(_bz_ArrayExpr<P_expr1> d1) j1(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_j1<_bz_typename P_expr1::T_numtype> >(d1); _bz_j1<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_j1<int> > > _bz_j1<int> > >
j1(IndexPlaceholder<N_index1> d1) j1(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_j1<int> >(d1); _bz_j1<int> >(d1);
skipping to change at line 2724 skipping to change at line 2715
_bz_lgamma<T_numtype1> > > _bz_lgamma<T_numtype1> > >
lgamma(const Array<T_numtype1, N_rank1>& d1) lgamma(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_lgamma<T_numtype1> >(d1.begin()); _bz_lgamma<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_lgamma<_bz_typename P_expr1::T_numtype> > > _bz_lgamma<typename P_expr1::T_numtype> > >
lgamma(_bz_ArrayExpr<P_expr1> d1) lgamma(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_lgamma<_bz_typename P_expr1::T_numtype> >(d1); _bz_lgamma<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_lgamma<int> > > _bz_lgamma<int> > >
lgamma(IndexPlaceholder<N_index1> d1) lgamma(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_lgamma<int> >(d1); _bz_lgamma<int> >(d1);
skipping to change at line 2760 skipping to change at line 2751
_bz_log<T_numtype1> > > _bz_log<T_numtype1> > >
log(const Array<T_numtype1, N_rank1>& d1) log(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_log<T_numtype1> >(d1.begin()); _bz_log<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_log<_bz_typename P_expr1::T_numtype> > > _bz_log<typename P_expr1::T_numtype> > >
log(_bz_ArrayExpr<P_expr1> d1) log(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_log<_bz_typename P_expr1::T_numtype> >(d1); _bz_log<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_log<int> > > _bz_log<int> > >
log(IndexPlaceholder<N_index1> d1) log(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_log<int> >(d1); _bz_log<int> >(d1);
skipping to change at line 2795 skipping to change at line 2786
_bz_logb<T_numtype1> > > _bz_logb<T_numtype1> > >
logb(const Array<T_numtype1, N_rank1>& d1) logb(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_logb<T_numtype1> >(d1.begin()); _bz_logb<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_logb<_bz_typename P_expr1::T_numtype> > > _bz_logb<typename P_expr1::T_numtype> > >
logb(_bz_ArrayExpr<P_expr1> d1) logb(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_logb<_bz_typename P_expr1::T_numtype> >(d1); _bz_logb<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_logb<int> > > _bz_logb<int> > >
logb(IndexPlaceholder<N_index1> d1) logb(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_logb<int> >(d1); _bz_logb<int> >(d1);
skipping to change at line 2832 skipping to change at line 2823
_bz_log1p<T_numtype1> > > _bz_log1p<T_numtype1> > >
log1p(const Array<T_numtype1, N_rank1>& d1) log1p(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_log1p<T_numtype1> >(d1.begin()); _bz_log1p<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_log1p<_bz_typename P_expr1::T_numtype> > > _bz_log1p<typename P_expr1::T_numtype> > >
log1p(_bz_ArrayExpr<P_expr1> d1) log1p(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_log1p<_bz_typename P_expr1::T_numtype> >(d1); _bz_log1p<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_log1p<int> > > _bz_log1p<int> > >
log1p(IndexPlaceholder<N_index1> d1) log1p(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_log1p<int> >(d1); _bz_log1p<int> >(d1);
skipping to change at line 2868 skipping to change at line 2859
_bz_log10<T_numtype1> > > _bz_log10<T_numtype1> > >
log10(const Array<T_numtype1, N_rank1>& d1) log10(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_log10<T_numtype1> >(d1.begin()); _bz_log10<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_log10<_bz_typename P_expr1::T_numtype> > > _bz_log10<typename P_expr1::T_numtype> > >
log10(_bz_ArrayExpr<P_expr1> d1) log10(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_log10<_bz_typename P_expr1::T_numtype> >(d1); _bz_log10<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_log10<int> > > _bz_log10<int> > >
log10(IndexPlaceholder<N_index1> d1) log10(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_log10<int> >(d1); _bz_log10<int> >(d1);
skipping to change at line 2903 skipping to change at line 2894
_bz_nearest<T_numtype1> > > _bz_nearest<T_numtype1> > >
nearest(const Array<T_numtype1, N_rank1>& d1) nearest(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_nearest<T_numtype1> >(d1.begin()); _bz_nearest<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_nearest<_bz_typename P_expr1::T_numtype> > > _bz_nearest<typename P_expr1::T_numtype> > >
nearest(_bz_ArrayExpr<P_expr1> d1) nearest(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_nearest<_bz_typename P_expr1::T_numtype> >(d1); _bz_nearest<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_nearest<int> > > _bz_nearest<int> > >
nearest(IndexPlaceholder<N_index1> d1) nearest(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_nearest<int> >(d1); _bz_nearest<int> >(d1);
skipping to change at line 2929 skipping to change at line 2920
#endif #endif
/************************************************************************** ** /************************************************************************** **
* nextafter * nextafter
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_nextafter<T_numtype1,T_numtype2> > > _bz_nextafter<T_numtype1,T_numtype2> > >
nextafter(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_r ank2>& d2) nextafter(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_r ank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, ArrayI terator<T_numtype2, N_rank2>,
_bz_nextafter<T_numtype1,T_numtype2> >(d1.begin(), d2.begin()); _bz_nextafter<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
} }
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_nextafter<T_numtype1,_bz_typename P_expr2::T_numtype> > > _bz_nextafter<T_numtype1,typename P_expr2::T_numtype> > >
nextafter(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2) nextafter(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_nextafter<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), _bz_nextafter<T_numtype1,typename P_expr2::T_numtype> >(d1.begin(), d2)
d2); ;
} }
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Ind exPlaceholder<N_index2>,
_bz_nextafter<T_numtype1,int> > > _bz_nextafter<T_numtype1,int> > >
nextafter(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2) nextafter(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, IndexP laceholder<N_index2>,
_bz_nextafter<T_numtype1,int> >(d1.begin(), d2); _bz_nextafter<T_numtype1,int> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<float>,
_bz_nextafter<T_numtype1,float> > > _bz_nextafter<T_numtype1,float> > >
nextafter(const Array<T_numtype1, N_rank1>& d1, float d2) nextafter(const Array<T_numtype1, N_rank1>& d1, float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<float>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<float>,
_bz_nextafter<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<flo at>(d2)); _bz_nextafter<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<flo at>(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<double>,
_bz_nextafter<T_numtype1,double> > > _bz_nextafter<T_numtype1,double> > >
nextafter(const Array<T_numtype1, N_rank1>& d1, double d2) nextafter(const Array<T_numtype1, N_rank1>& d1, double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<double>,
_bz_nextafter<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<do uble>(d2)); _bz_nextafter<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<do uble>(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<long double>,
_bz_nextafter<T_numtype1,long double> > > _bz_nextafter<T_numtype1,long double> > >
nextafter(const Array<T_numtype1, N_rank1>& d1, long double d2) nextafter(const Array<T_numtype1, N_rank1>& d1, long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<long double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<long double>,
_bz_nextafter<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConsta nt<long double>(d2)); _bz_nextafter<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConsta nt<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<complex<T2> > ,
_bz_nextafter<T_numtype1,complex<T2> > > > _bz_nextafter<T_numtype1,complex<T2> > > >
nextafter(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2) nextafter(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<complex<T2> > , return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<complex<T2> > ,
_bz_nextafter<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConst ant<complex<T2> > (d2)); _bz_nextafter<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConst ant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numty _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T
pe2, N_rank2>, _numtype2, N_rank2>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,T_numtype2> > > _bz_nextafter<typename P_expr1::T_numtype,T_numtype2> > >
nextafter(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2) nextafter(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numtype2 return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_nu
, N_rank2>, mtype2, N_rank2>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begi _bz_nextafter<typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin())
n()); ;
} }
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2 _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P
>, _expr2>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_n _bz_nextafter<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
umtype> > > > >
nextafter(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2) nextafter(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_ex
_bz_nextafter<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_n pr2>,
umtype> >(d1, d2); _bz_nextafter<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
>(d1, d2);
} }
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_in _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholde
dex2>, r<N_index2>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,int> > > _bz_nextafter<typename P_expr1::T_numtype,int> > >
nextafter(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2) nextafter(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_index return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N
2>, _index2>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,int> >(d1, d2); _bz_nextafter<typename P_expr1::T_numtype,int> >(d1, d2);
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<float>, nstant<float>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,float> > > _bz_nextafter<typename P_expr1::T_numtype,float> > >
nextafter(_bz_ArrayExpr<P_expr1> d1, float d2) nextafter(_bz_ArrayExpr<P_expr1> d1, float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<fl return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
oat>, ant<float>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExp _bz_nextafter<typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprCon
rConstant<float>(d2)); stant<float>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<double>, nstant<double>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,double> > > _bz_nextafter<typename P_expr1::T_numtype,double> > >
nextafter(_bz_ArrayExpr<P_expr1> d1, double d2) nextafter(_bz_ArrayExpr<P_expr1> d1, double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<do return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
uble>, ant<double>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,double> >(d1, _bz_ArrayEx _bz_nextafter<typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprCo
prConstant<double>(d2)); nstant<double>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<long double>, nstant<long double>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,long double> > > _bz_nextafter<typename P_expr1::T_numtype,long double> > >
nextafter(_bz_ArrayExpr<P_expr1> d1, long double d2) nextafter(_bz_ArrayExpr<P_expr1> d1, long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<lo return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
ng double>, ant<long double>,
_bz_nextafter<_bz_typename P_expr1::T_numtype,long double> >(d1, _bz_Ar _bz_nextafter<typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayE
rayExprConstant<long double>(d2)); xprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<complex<T2> > , nstant<complex<T2> > ,
_bz_nextafter<_bz_typename P_expr1::T_numtype,complex<T2> > > > _bz_nextafter<typename P_expr1::T_numtype,complex<T2> > > >
nextafter(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2) nextafter(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<co return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
mplex<T2> > , ant<complex<T2> > ,
_bz_nextafter<_bz_typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_A _bz_nextafter<typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_Array
rrayExprConstant<complex<T2> > (d2)); ExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_n umtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_nextafter<int,T_numtype2> > > _bz_nextafter<int,T_numtype2> > >
nextafter(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2) nextafter(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_numt ype2, N_rank2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterator< T_numtype2, N_rank2>,
_bz_nextafter<int,T_numtype2> >(d1, d2.begin()); _bz_nextafter<int,T_numtype2> >(d1, d2.begin());
} }
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_e _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_nextafter<int,_bz_typename P_expr2::T_numtype> > > _bz_nextafter<int,typename P_expr2::T_numtype> > >
nextafter(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2) nextafter(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_expr return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<
2>, P_expr2>,
_bz_nextafter<int,_bz_typename P_expr2::T_numtype> >(d1, d2); _bz_nextafter<int,typename P_expr2::T_numtype> >(d1, d2);
} }
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder< N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlaceh older<N_index2>,
_bz_nextafter<int,int> > > _bz_nextafter<int,int> > >
nextafter(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2) nextafter(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder<N_i ndex2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlacehold er<N_index2>,
_bz_nextafter<int,int> >(d1, d2); _bz_nextafter<int,int> >(d1, d2);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<float>,
_bz_nextafter<int,float> > > _bz_nextafter<int,float> > >
nextafter(IndexPlaceholder<N_index1> d1, float d2) nextafter(IndexPlaceholder<N_index1> d1, float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<float>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<float>,
_bz_nextafter<int,float> >(d1, _bz_ArrayExprConstant<float>(d2)); _bz_nextafter<int,float> >(d1, _bz_ArrayExprConstant<float>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<double>,
_bz_nextafter<int,double> > > _bz_nextafter<int,double> > >
nextafter(IndexPlaceholder<N_index1> d1, double d2) nextafter(IndexPlaceholder<N_index1> d1, double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<double>,
_bz_nextafter<int,double> >(d1, _bz_ArrayExprConstant<double>(d2)); _bz_nextafter<int,double> >(d1, _bz_ArrayExprConstant<double>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<long double>,
_bz_nextafter<int,long double> > > _bz_nextafter<int,long double> > >
nextafter(IndexPlaceholder<N_index1> d1, long double d2) nextafter(IndexPlaceholder<N_index1> d1, long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<long double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<long double>,
_bz_nextafter<int,long double> >(d1, _bz_ArrayExprConstant<long double> (d2)); _bz_nextafter<int,long double> >(d1, _bz_ArrayExprConstant<long double> (d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<complex<T2> > ,
_bz_nextafter<int,complex<T2> > > > _bz_nextafter<int,complex<T2> > > >
nextafter(IndexPlaceholder<N_index1> d1, complex<T2> d2) nextafter(IndexPlaceholder<N_index1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<complex<T2> > , return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<complex<T2> > ,
_bz_nextafter<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d2)); _bz_nextafter<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T _numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIter ator<T_numtype2, N_rank2>,
_bz_nextafter<float,T_numtype2> > > _bz_nextafter<float,T_numtype2> > >
nextafter(float d1, const Array<T_numtype2, N_rank2>& d2) nextafter(float d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T_nu mtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIterato r<T_numtype2, N_rank2>,
_bz_nextafter<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2. begin()); _bz_nextafter<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2. begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_Array
_expr2>, Expr<P_expr2>,
_bz_nextafter<float,_bz_typename P_expr2::T_numtype> > > _bz_nextafter<float,typename P_expr2::T_numtype> > >
nextafter(float d1, _bz_ArrayExpr<P_expr2> d2) nextafter(float d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P_ex return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_ArrayExp
pr2>, r<P_expr2>,
_bz_nextafter<float,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCon _bz_nextafter<float,typename P_expr2::T_numtype> >(_bz_ArrayExprConstan
stant<float>(d1), d2); t<float>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholde r<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlac eholder<N_index2>,
_bz_nextafter<float,int> > > _bz_nextafter<float,int> > >
nextafter(float d1, IndexPlaceholder<N_index2> d2) nextafter(float d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholder<N _index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlaceho lder<N_index2>,
_bz_nextafter<float,int> >(_bz_ArrayExprConstant<float>(d1), d2); _bz_nextafter<float,int> >(_bz_ArrayExprConstant<float>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator< T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIte rator<T_numtype2, N_rank2>,
_bz_nextafter<double,T_numtype2> > > _bz_nextafter<double,T_numtype2> > >
nextafter(double d1, const Array<T_numtype2, N_rank2>& d2) nextafter(double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator<T_n umtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_nextafter<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d 2.begin()); _bz_nextafter<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d 2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr< _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_Arra
P_expr2>, yExpr<P_expr2>,
_bz_nextafter<double,_bz_typename P_expr2::T_numtype> > > _bz_nextafter<double,typename P_expr2::T_numtype> > >
nextafter(double d1, _bz_ArrayExpr<P_expr2> d2) nextafter(double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<P_e return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_nextafter<double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCo _bz_nextafter<double,typename P_expr2::T_numtype> >(_bz_ArrayExprConsta
nstant<double>(d1), d2); nt<double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlacehold er<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPla ceholder<N_index2>,
_bz_nextafter<double,int> > > _bz_nextafter<double,int> > >
nextafter(double d1, IndexPlaceholder<N_index2> d2) nextafter(double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlaceholder< N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPlaceh older<N_index2>,
_bz_nextafter<double,int> >(_bz_ArrayExprConstant<double>(d1), d2); _bz_nextafter<double,int> >(_bz_ArrayExprConstant<double>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_nextafter<long double,T_numtype2> > > _bz_nextafter<long double,T_numtype2> > >
nextafter(long double d1, const Array<T_numtype2, N_rank2>& d2) nextafter(long double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, ArrayI terator<T_numtype2, N_rank2>,
_bz_nextafter<long double,T_numtype2> >(_bz_ArrayExprConstant<long doub le>(d1), d2.begin()); _bz_nextafter<long double,T_numtype2> >(_bz_ArrayExprConstant<long doub le>(d1), d2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_nextafter<long double,_bz_typename P_expr2::T_numtype> > > _bz_nextafter<long double,typename P_expr2::T_numtype> > >
nextafter(long double d1, _bz_ArrayExpr<P_expr2> d2) nextafter(long double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_nextafter<long double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayE _bz_nextafter<long double,typename P_expr2::T_numtype> >(_bz_ArrayExprC
xprConstant<long double>(d1), d2); onstant<long double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Ind exPlaceholder<N_index2>,
_bz_nextafter<long double,int> > > _bz_nextafter<long double,int> > >
nextafter(long double d1, IndexPlaceholder<N_index2> d2) nextafter(long double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, IndexP laceholder<N_index2>,
_bz_nextafter<long double,int> >(_bz_ArrayExprConstant<long double>(d1) , d2); _bz_nextafter<long double,int> >(_bz_ArrayExprConstant<long double>(d1) , d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayIt erator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , A rrayIterator<T_numtype2, N_rank2>,
_bz_nextafter<complex<T1> ,T_numtype2> > > _bz_nextafter<complex<T1> ,T_numtype2> > >
nextafter(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2) nextafter(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayItera tor<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Arra yIterator<T_numtype2, N_rank2>,
_bz_nextafter<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex< T1> > (d1), d2.begin()); _bz_nextafter<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex< T1> > (d1), d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_Arr _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _
ayExpr<P_expr2>, bz_ArrayExpr<P_expr2>,
_bz_nextafter<complex<T1> ,_bz_typename P_expr2::T_numtype> > > _bz_nextafter<complex<T1> ,typename P_expr2::T_numtype> > >
nextafter(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2) nextafter(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayE return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _bz_
xpr<P_expr2>, ArrayExpr<P_expr2>,
_bz_nextafter<complex<T1> ,_bz_typename P_expr2::T_numtype> >(_bz_Array _bz_nextafter<complex<T1> ,typename P_expr2::T_numtype> >(_bz_ArrayExpr
ExprConstant<complex<T1> > (d1), d2); Constant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPl aceholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , I ndexPlaceholder<N_index2>,
_bz_nextafter<complex<T1> ,int> > > _bz_nextafter<complex<T1> ,int> > >
nextafter(complex<T1> d1, IndexPlaceholder<N_index2> d2) nextafter(complex<T1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPlace holder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Inde xPlaceholder<N_index2>,
_bz_nextafter<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > ( d1), d2); _bz_nextafter<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > ( d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#endif #endif
/************************************************************************** ** /************************************************************************** **
* pow * pow
************************************************************************** **/ ************************************************************************** **/
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_pow<T_numtype1,T_numtype2> > > _bz_pow<T_numtype1,T_numtype2> > >
pow(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2>& d2) pow(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, ArrayI terator<T_numtype2, N_rank2>,
_bz_pow<T_numtype1,T_numtype2> >(d1.begin(), d2.begin()); _bz_pow<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
} }
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_pow<T_numtype1,_bz_typename P_expr2::T_numtype> > > _bz_pow<T_numtype1,typename P_expr2::T_numtype> > >
pow(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2) pow(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_pow<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), d2); _bz_pow<T_numtype1,typename P_expr2::T_numtype> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Ind exPlaceholder<N_index2>,
_bz_pow<T_numtype1,int> > > _bz_pow<T_numtype1,int> > >
pow(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2) pow(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, IndexP laceholder<N_index2>,
_bz_pow<T_numtype1,int> >(d1.begin(), d2); _bz_pow<T_numtype1,int> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<float>,
_bz_pow<T_numtype1,float> > > _bz_pow<T_numtype1,float> > >
pow(const Array<T_numtype1, N_rank1>& d1, float d2) pow(const Array<T_numtype1, N_rank1>& d1, float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<float>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<float>,
_bz_pow<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>(d2 )); _bz_pow<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>(d2 ));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<double>,
_bz_pow<T_numtype1,double> > > _bz_pow<T_numtype1,double> > >
pow(const Array<T_numtype1, N_rank1>& d1, double d2) pow(const Array<T_numtype1, N_rank1>& d1, double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<double>,
_bz_pow<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double>( d2)); _bz_pow<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double>( d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<long double>,
_bz_pow<T_numtype1,long double> > > _bz_pow<T_numtype1,long double> > >
pow(const Array<T_numtype1, N_rank1>& d1, long double d2) pow(const Array<T_numtype1, N_rank1>& d1, long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<long double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<long double>,
_bz_pow<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<lon g double>(d2)); _bz_pow<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<lon g double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<complex<T2> > ,
_bz_pow<T_numtype1,complex<T2> > > > _bz_pow<T_numtype1,complex<T2> > > >
pow(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2) pow(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<complex<T2> > , return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<complex<T2> > ,
_bz_pow<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant<co mplex<T2> > (d2)); _bz_pow<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant<co mplex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numty _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T
pe2, N_rank2>, _numtype2, N_rank2>,
_bz_pow<_bz_typename P_expr1::T_numtype,T_numtype2> > > _bz_pow<typename P_expr1::T_numtype,T_numtype2> > >
pow(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2) pow(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numtype2 return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_nu
, N_rank2>, mtype2, N_rank2>,
_bz_pow<_bz_typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin()); _bz_pow<typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin());
} }
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2 _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P
>, _expr2>,
_bz_pow<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numtype _bz_pow<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
> > >
pow(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2) pow(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_ex
_bz_pow<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numtype pr2>,
> >(d1, d2); _bz_pow<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >(d1,
d2);
} }
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_in _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholde
dex2>, r<N_index2>,
_bz_pow<_bz_typename P_expr1::T_numtype,int> > > _bz_pow<typename P_expr1::T_numtype,int> > >
pow(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2) pow(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_index return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N
2>, _index2>,
_bz_pow<_bz_typename P_expr1::T_numtype,int> >(d1, d2); _bz_pow<typename P_expr1::T_numtype,int> >(d1, d2);
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<float>, nstant<float>,
_bz_pow<_bz_typename P_expr1::T_numtype,float> > > _bz_pow<typename P_expr1::T_numtype,float> > >
pow(_bz_ArrayExpr<P_expr1> d1, float d2) pow(_bz_ArrayExpr<P_expr1> d1, float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<fl return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
oat>, ant<float>,
_bz_pow<_bz_typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprConst _bz_pow<typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprConstant<
ant<float>(d2)); float>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<double>, nstant<double>,
_bz_pow<_bz_typename P_expr1::T_numtype,double> > > _bz_pow<typename P_expr1::T_numtype,double> > >
pow(_bz_ArrayExpr<P_expr1> d1, double d2) pow(_bz_ArrayExpr<P_expr1> d1, double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<do return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
uble>, ant<double>,
_bz_pow<_bz_typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprCons _bz_pow<typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprConstant
tant<double>(d2)); <double>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<long double>, nstant<long double>,
_bz_pow<_bz_typename P_expr1::T_numtype,long double> > > _bz_pow<typename P_expr1::T_numtype,long double> > >
pow(_bz_ArrayExpr<P_expr1> d1, long double d2) pow(_bz_ArrayExpr<P_expr1> d1, long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<lo return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
ng double>, ant<long double>,
_bz_pow<_bz_typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayExp _bz_pow<typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayExprCon
rConstant<long double>(d2)); stant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<complex<T2> > , nstant<complex<T2> > ,
_bz_pow<_bz_typename P_expr1::T_numtype,complex<T2> > > > _bz_pow<typename P_expr1::T_numtype,complex<T2> > > >
pow(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2) pow(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<co return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
mplex<T2> > , ant<complex<T2> > ,
_bz_pow<_bz_typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_ArrayEx _bz_pow<typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_ArrayExprCo
prConstant<complex<T2> > (d2)); nstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_n umtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_pow<int,T_numtype2> > > _bz_pow<int,T_numtype2> > >
pow(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2) pow(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_numt ype2, N_rank2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterator< T_numtype2, N_rank2>,
_bz_pow<int,T_numtype2> >(d1, d2.begin()); _bz_pow<int,T_numtype2> >(d1, d2.begin());
} }
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_e _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_pow<int,_bz_typename P_expr2::T_numtype> > > _bz_pow<int,typename P_expr2::T_numtype> > >
pow(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2) pow(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_expr return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<
2>, P_expr2>,
_bz_pow<int,_bz_typename P_expr2::T_numtype> >(d1, d2); _bz_pow<int,typename P_expr2::T_numtype> >(d1, d2);
} }
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder< N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlaceh older<N_index2>,
_bz_pow<int,int> > > _bz_pow<int,int> > >
pow(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2) pow(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder<N_i ndex2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlacehold er<N_index2>,
_bz_pow<int,int> >(d1, d2); _bz_pow<int,int> >(d1, d2);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<float>,
_bz_pow<int,float> > > _bz_pow<int,float> > >
pow(IndexPlaceholder<N_index1> d1, float d2) pow(IndexPlaceholder<N_index1> d1, float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<float>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<float>,
_bz_pow<int,float> >(d1, _bz_ArrayExprConstant<float>(d2)); _bz_pow<int,float> >(d1, _bz_ArrayExprConstant<float>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<double>,
_bz_pow<int,double> > > _bz_pow<int,double> > >
pow(IndexPlaceholder<N_index1> d1, double d2) pow(IndexPlaceholder<N_index1> d1, double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<double>,
_bz_pow<int,double> >(d1, _bz_ArrayExprConstant<double>(d2)); _bz_pow<int,double> >(d1, _bz_ArrayExprConstant<double>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<long double>,
_bz_pow<int,long double> > > _bz_pow<int,long double> > >
pow(IndexPlaceholder<N_index1> d1, long double d2) pow(IndexPlaceholder<N_index1> d1, long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<long double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<long double>,
_bz_pow<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2)); _bz_pow<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<complex<T2> > ,
_bz_pow<int,complex<T2> > > > _bz_pow<int,complex<T2> > > >
pow(IndexPlaceholder<N_index1> d1, complex<T2> d2) pow(IndexPlaceholder<N_index1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<complex<T2> > , return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<complex<T2> > ,
_bz_pow<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d2 )); _bz_pow<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d2 ));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T _numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIter ator<T_numtype2, N_rank2>,
_bz_pow<float,T_numtype2> > > _bz_pow<float,T_numtype2> > >
pow(float d1, const Array<T_numtype2, N_rank2>& d2) pow(float d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T_nu mtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIterato r<T_numtype2, N_rank2>,
_bz_pow<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begin( )); _bz_pow<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begin( ));
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_Array
_expr2>, Expr<P_expr2>,
_bz_pow<float,_bz_typename P_expr2::T_numtype> > > _bz_pow<float,typename P_expr2::T_numtype> > >
pow(float d1, _bz_ArrayExpr<P_expr2> d2) pow(float d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P_ex return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_ArrayExp
pr2>, r<P_expr2>,
_bz_pow<float,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConstant< _bz_pow<float,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<floa
float>(d1), d2); t>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholde r<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlac eholder<N_index2>,
_bz_pow<float,int> > > _bz_pow<float,int> > >
pow(float d1, IndexPlaceholder<N_index2> d2) pow(float d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholder<N _index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlaceho lder<N_index2>,
_bz_pow<float,int> >(_bz_ArrayExprConstant<float>(d1), d2); _bz_pow<float,int> >(_bz_ArrayExprConstant<float>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator< T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIte rator<T_numtype2, N_rank2>,
_bz_pow<double,T_numtype2> > > _bz_pow<double,T_numtype2> > >
pow(double d1, const Array<T_numtype2, N_rank2>& d2) pow(double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator<T_n umtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_pow<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.begi n()); _bz_pow<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.begi n());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr< _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_Arra
P_expr2>, yExpr<P_expr2>,
_bz_pow<double,_bz_typename P_expr2::T_numtype> > > _bz_pow<double,typename P_expr2::T_numtype> > >
pow(double d1, _bz_ArrayExpr<P_expr2> d2) pow(double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<P_e return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_pow<double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConstant _bz_pow<double,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<dou
<double>(d1), d2); ble>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlacehold er<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPla ceholder<N_index2>,
_bz_pow<double,int> > > _bz_pow<double,int> > >
pow(double d1, IndexPlaceholder<N_index2> d2) pow(double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlaceholder< N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPlaceh older<N_index2>,
_bz_pow<double,int> >(_bz_ArrayExprConstant<double>(d1), d2); _bz_pow<double,int> >(_bz_ArrayExprConstant<double>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_pow<long double,T_numtype2> > > _bz_pow<long double,T_numtype2> > >
pow(long double d1, const Array<T_numtype2, N_rank2>& d2) pow(long double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, ArrayI terator<T_numtype2, N_rank2>,
_bz_pow<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>(d1 ), d2.begin()); _bz_pow<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>(d1 ), d2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_pow<long double,_bz_typename P_expr2::T_numtype> > > _bz_pow<long double,typename P_expr2::T_numtype> > >
pow(long double d1, _bz_ArrayExpr<P_expr2> d2) pow(long double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_pow<long double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCon _bz_pow<long double,typename P_expr2::T_numtype> >(_bz_ArrayExprConstan
stant<long double>(d1), d2); t<long double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Ind exPlaceholder<N_index2>,
_bz_pow<long double,int> > > _bz_pow<long double,int> > >
pow(long double d1, IndexPlaceholder<N_index2> d2) pow(long double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, IndexP laceholder<N_index2>,
_bz_pow<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2); _bz_pow<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayIt erator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , A rrayIterator<T_numtype2, N_rank2>,
_bz_pow<complex<T1> ,T_numtype2> > > _bz_pow<complex<T1> ,T_numtype2> > >
pow(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2) pow(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayItera tor<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Arra yIterator<T_numtype2, N_rank2>,
_bz_pow<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin()); _bz_pow<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_Arr _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _
ayExpr<P_expr2>, bz_ArrayExpr<P_expr2>,
_bz_pow<complex<T1> ,_bz_typename P_expr2::T_numtype> > > _bz_pow<complex<T1> ,typename P_expr2::T_numtype> > >
pow(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2) pow(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayE return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _bz_
xpr<P_expr2>, ArrayExpr<P_expr2>,
_bz_pow<complex<T1> ,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCo _bz_pow<complex<T1> ,typename P_expr2::T_numtype> >(_bz_ArrayExprConsta
nstant<complex<T1> > (d1), d2); nt<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPl aceholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , I ndexPlaceholder<N_index2>,
_bz_pow<complex<T1> ,int> > > _bz_pow<complex<T1> ,int> > >
pow(complex<T1> d1, IndexPlaceholder<N_index2> d2) pow(complex<T1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPlace holder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Inde xPlaceholder<N_index2>,
_bz_pow<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d 2); _bz_pow<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d 2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* pow2 * pow2
************************************************************************** **/ ************************************************************************** **/
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
skipping to change at line 3646 skipping to change at line 3637
_bz_pow2<T_numtype1> > > _bz_pow2<T_numtype1> > >
pow2(const Array<T_numtype1, N_rank1>& d1) pow2(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_pow2<T_numtype1> >(d1.begin()); _bz_pow2<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow2<_bz_typename P_expr1::T_numtype> > > _bz_pow2<typename P_expr1::T_numtype> > >
pow2(_bz_ArrayExpr<P_expr1> d1) pow2(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow2<_bz_typename P_expr1::T_numtype> >(d1); _bz_pow2<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow2<int> > > _bz_pow2<int> > >
pow2(IndexPlaceholder<N_index1> d1) pow2(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow2<int> >(d1); _bz_pow2<int> >(d1);
skipping to change at line 3680 skipping to change at line 3671
_bz_pow3<T_numtype1> > > _bz_pow3<T_numtype1> > >
pow3(const Array<T_numtype1, N_rank1>& d1) pow3(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_pow3<T_numtype1> >(d1.begin()); _bz_pow3<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow3<_bz_typename P_expr1::T_numtype> > > _bz_pow3<typename P_expr1::T_numtype> > >
pow3(_bz_ArrayExpr<P_expr1> d1) pow3(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow3<_bz_typename P_expr1::T_numtype> >(d1); _bz_pow3<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow3<int> > > _bz_pow3<int> > >
pow3(IndexPlaceholder<N_index1> d1) pow3(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow3<int> >(d1); _bz_pow3<int> >(d1);
skipping to change at line 3714 skipping to change at line 3705
_bz_pow4<T_numtype1> > > _bz_pow4<T_numtype1> > >
pow4(const Array<T_numtype1, N_rank1>& d1) pow4(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_pow4<T_numtype1> >(d1.begin()); _bz_pow4<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow4<_bz_typename P_expr1::T_numtype> > > _bz_pow4<typename P_expr1::T_numtype> > >
pow4(_bz_ArrayExpr<P_expr1> d1) pow4(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow4<_bz_typename P_expr1::T_numtype> >(d1); _bz_pow4<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow4<int> > > _bz_pow4<int> > >
pow4(IndexPlaceholder<N_index1> d1) pow4(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow4<int> >(d1); _bz_pow4<int> >(d1);
skipping to change at line 3748 skipping to change at line 3739
_bz_pow5<T_numtype1> > > _bz_pow5<T_numtype1> > >
pow5(const Array<T_numtype1, N_rank1>& d1) pow5(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_pow5<T_numtype1> >(d1.begin()); _bz_pow5<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow5<_bz_typename P_expr1::T_numtype> > > _bz_pow5<typename P_expr1::T_numtype> > >
pow5(_bz_ArrayExpr<P_expr1> d1) pow5(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow5<_bz_typename P_expr1::T_numtype> >(d1); _bz_pow5<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow5<int> > > _bz_pow5<int> > >
pow5(IndexPlaceholder<N_index1> d1) pow5(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow5<int> >(d1); _bz_pow5<int> >(d1);
skipping to change at line 3782 skipping to change at line 3773
_bz_pow6<T_numtype1> > > _bz_pow6<T_numtype1> > >
pow6(const Array<T_numtype1, N_rank1>& d1) pow6(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_pow6<T_numtype1> >(d1.begin()); _bz_pow6<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow6<_bz_typename P_expr1::T_numtype> > > _bz_pow6<typename P_expr1::T_numtype> > >
pow6(_bz_ArrayExpr<P_expr1> d1) pow6(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow6<_bz_typename P_expr1::T_numtype> >(d1); _bz_pow6<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow6<int> > > _bz_pow6<int> > >
pow6(IndexPlaceholder<N_index1> d1) pow6(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow6<int> >(d1); _bz_pow6<int> >(d1);
skipping to change at line 3816 skipping to change at line 3807
_bz_pow7<T_numtype1> > > _bz_pow7<T_numtype1> > >
pow7(const Array<T_numtype1, N_rank1>& d1) pow7(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_pow7<T_numtype1> >(d1.begin()); _bz_pow7<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow7<_bz_typename P_expr1::T_numtype> > > _bz_pow7<typename P_expr1::T_numtype> > >
pow7(_bz_ArrayExpr<P_expr1> d1) pow7(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow7<_bz_typename P_expr1::T_numtype> >(d1); _bz_pow7<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow7<int> > > _bz_pow7<int> > >
pow7(IndexPlaceholder<N_index1> d1) pow7(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow7<int> >(d1); _bz_pow7<int> >(d1);
skipping to change at line 3850 skipping to change at line 3841
_bz_pow8<T_numtype1> > > _bz_pow8<T_numtype1> > >
pow8(const Array<T_numtype1, N_rank1>& d1) pow8(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_pow8<T_numtype1> >(d1.begin()); _bz_pow8<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow8<_bz_typename P_expr1::T_numtype> > > _bz_pow8<typename P_expr1::T_numtype> > >
pow8(_bz_ArrayExpr<P_expr1> d1) pow8(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_pow8<_bz_typename P_expr1::T_numtype> >(d1); _bz_pow8<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow8<int> > > _bz_pow8<int> > >
pow8(IndexPlaceholder<N_index1> d1) pow8(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_pow8<int> >(d1); _bz_pow8<int> >(d1);
} }
/************************************************************************** ** /************************************************************************** **
* remainder * remainder
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_remainder<T_numtype1,T_numtype2> > > _bz_remainder<T_numtype1,T_numtype2> > >
remainder(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_r ank2>& d2) remainder(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_r ank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, ArrayI terator<T_numtype2, N_rank2>,
_bz_remainder<T_numtype1,T_numtype2> >(d1.begin(), d2.begin()); _bz_remainder<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
} }
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_remainder<T_numtype1,_bz_typename P_expr2::T_numtype> > > _bz_remainder<T_numtype1,typename P_expr2::T_numtype> > >
remainder(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2) remainder(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_remainder<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), _bz_remainder<T_numtype1,typename P_expr2::T_numtype> >(d1.begin(), d2)
d2); ;
} }
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Ind exPlaceholder<N_index2>,
_bz_remainder<T_numtype1,int> > > _bz_remainder<T_numtype1,int> > >
remainder(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2) remainder(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, IndexP laceholder<N_index2>,
_bz_remainder<T_numtype1,int> >(d1.begin(), d2); _bz_remainder<T_numtype1,int> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<float>,
_bz_remainder<T_numtype1,float> > > _bz_remainder<T_numtype1,float> > >
remainder(const Array<T_numtype1, N_rank1>& d1, float d2) remainder(const Array<T_numtype1, N_rank1>& d1, float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<float>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<float>,
_bz_remainder<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<flo at>(d2)); _bz_remainder<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<flo at>(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<double>,
_bz_remainder<T_numtype1,double> > > _bz_remainder<T_numtype1,double> > >
remainder(const Array<T_numtype1, N_rank1>& d1, double d2) remainder(const Array<T_numtype1, N_rank1>& d1, double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<double>,
_bz_remainder<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<do uble>(d2)); _bz_remainder<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<do uble>(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<long double>,
_bz_remainder<T_numtype1,long double> > > _bz_remainder<T_numtype1,long double> > >
remainder(const Array<T_numtype1, N_rank1>& d1, long double d2) remainder(const Array<T_numtype1, N_rank1>& d1, long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<long double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<long double>,
_bz_remainder<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConsta nt<long double>(d2)); _bz_remainder<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConsta nt<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<complex<T2> > ,
_bz_remainder<T_numtype1,complex<T2> > > > _bz_remainder<T_numtype1,complex<T2> > > >
remainder(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2) remainder(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<complex<T2> > , return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<complex<T2> > ,
_bz_remainder<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConst ant<complex<T2> > (d2)); _bz_remainder<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConst ant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numty _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T
pe2, N_rank2>, _numtype2, N_rank2>,
_bz_remainder<_bz_typename P_expr1::T_numtype,T_numtype2> > > _bz_remainder<typename P_expr1::T_numtype,T_numtype2> > >
remainder(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2) remainder(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numtype2 return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_nu
, N_rank2>, mtype2, N_rank2>,
_bz_remainder<_bz_typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begi _bz_remainder<typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin())
n()); ;
} }
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2 _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P
>, _expr2>,
_bz_remainder<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_n _bz_remainder<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
umtype> > > > >
remainder(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2) remainder(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_ex
_bz_remainder<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_n pr2>,
umtype> >(d1, d2); _bz_remainder<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
>(d1, d2);
} }
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_in _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholde
dex2>, r<N_index2>,
_bz_remainder<_bz_typename P_expr1::T_numtype,int> > > _bz_remainder<typename P_expr1::T_numtype,int> > >
remainder(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2) remainder(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_index return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N
2>, _index2>,
_bz_remainder<_bz_typename P_expr1::T_numtype,int> >(d1, d2); _bz_remainder<typename P_expr1::T_numtype,int> >(d1, d2);
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<float>, nstant<float>,
_bz_remainder<_bz_typename P_expr1::T_numtype,float> > > _bz_remainder<typename P_expr1::T_numtype,float> > >
remainder(_bz_ArrayExpr<P_expr1> d1, float d2) remainder(_bz_ArrayExpr<P_expr1> d1, float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<fl return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
oat>, ant<float>,
_bz_remainder<_bz_typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExp _bz_remainder<typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprCon
rConstant<float>(d2)); stant<float>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<double>, nstant<double>,
_bz_remainder<_bz_typename P_expr1::T_numtype,double> > > _bz_remainder<typename P_expr1::T_numtype,double> > >
remainder(_bz_ArrayExpr<P_expr1> d1, double d2) remainder(_bz_ArrayExpr<P_expr1> d1, double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<do return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
uble>, ant<double>,
_bz_remainder<_bz_typename P_expr1::T_numtype,double> >(d1, _bz_ArrayEx _bz_remainder<typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprCo
prConstant<double>(d2)); nstant<double>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<long double>, nstant<long double>,
_bz_remainder<_bz_typename P_expr1::T_numtype,long double> > > _bz_remainder<typename P_expr1::T_numtype,long double> > >
remainder(_bz_ArrayExpr<P_expr1> d1, long double d2) remainder(_bz_ArrayExpr<P_expr1> d1, long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<lo return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
ng double>, ant<long double>,
_bz_remainder<_bz_typename P_expr1::T_numtype,long double> >(d1, _bz_Ar _bz_remainder<typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayE
rayExprConstant<long double>(d2)); xprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<complex<T2> > , nstant<complex<T2> > ,
_bz_remainder<_bz_typename P_expr1::T_numtype,complex<T2> > > > _bz_remainder<typename P_expr1::T_numtype,complex<T2> > > >
remainder(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2) remainder(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<co return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
mplex<T2> > , ant<complex<T2> > ,
_bz_remainder<_bz_typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_A _bz_remainder<typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_Array
rrayExprConstant<complex<T2> > (d2)); ExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_n umtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_remainder<int,T_numtype2> > > _bz_remainder<int,T_numtype2> > >
remainder(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2) remainder(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_numt ype2, N_rank2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterator< T_numtype2, N_rank2>,
_bz_remainder<int,T_numtype2> >(d1, d2.begin()); _bz_remainder<int,T_numtype2> >(d1, d2.begin());
} }
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_e _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_remainder<int,_bz_typename P_expr2::T_numtype> > > _bz_remainder<int,typename P_expr2::T_numtype> > >
remainder(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2) remainder(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_expr return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<
2>, P_expr2>,
_bz_remainder<int,_bz_typename P_expr2::T_numtype> >(d1, d2); _bz_remainder<int,typename P_expr2::T_numtype> >(d1, d2);
} }
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder< N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlaceh older<N_index2>,
_bz_remainder<int,int> > > _bz_remainder<int,int> > >
remainder(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2) remainder(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder<N_i ndex2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlacehold er<N_index2>,
_bz_remainder<int,int> >(d1, d2); _bz_remainder<int,int> >(d1, d2);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<float>,
_bz_remainder<int,float> > > _bz_remainder<int,float> > >
remainder(IndexPlaceholder<N_index1> d1, float d2) remainder(IndexPlaceholder<N_index1> d1, float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<float>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<float>,
_bz_remainder<int,float> >(d1, _bz_ArrayExprConstant<float>(d2)); _bz_remainder<int,float> >(d1, _bz_ArrayExprConstant<float>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<double>,
_bz_remainder<int,double> > > _bz_remainder<int,double> > >
remainder(IndexPlaceholder<N_index1> d1, double d2) remainder(IndexPlaceholder<N_index1> d1, double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<double>,
_bz_remainder<int,double> >(d1, _bz_ArrayExprConstant<double>(d2)); _bz_remainder<int,double> >(d1, _bz_ArrayExprConstant<double>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<long double>,
_bz_remainder<int,long double> > > _bz_remainder<int,long double> > >
remainder(IndexPlaceholder<N_index1> d1, long double d2) remainder(IndexPlaceholder<N_index1> d1, long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<long double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<long double>,
_bz_remainder<int,long double> >(d1, _bz_ArrayExprConstant<long double> (d2)); _bz_remainder<int,long double> >(d1, _bz_ArrayExprConstant<long double> (d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<complex<T2> > ,
_bz_remainder<int,complex<T2> > > > _bz_remainder<int,complex<T2> > > >
remainder(IndexPlaceholder<N_index1> d1, complex<T2> d2) remainder(IndexPlaceholder<N_index1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<complex<T2> > , return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<complex<T2> > ,
_bz_remainder<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d2)); _bz_remainder<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T _numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIter ator<T_numtype2, N_rank2>,
_bz_remainder<float,T_numtype2> > > _bz_remainder<float,T_numtype2> > >
remainder(float d1, const Array<T_numtype2, N_rank2>& d2) remainder(float d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T_nu mtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIterato r<T_numtype2, N_rank2>,
_bz_remainder<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2. begin()); _bz_remainder<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2. begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_Array
_expr2>, Expr<P_expr2>,
_bz_remainder<float,_bz_typename P_expr2::T_numtype> > > _bz_remainder<float,typename P_expr2::T_numtype> > >
remainder(float d1, _bz_ArrayExpr<P_expr2> d2) remainder(float d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P_ex return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_ArrayExp
pr2>, r<P_expr2>,
_bz_remainder<float,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCon _bz_remainder<float,typename P_expr2::T_numtype> >(_bz_ArrayExprConstan
stant<float>(d1), d2); t<float>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholde r<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlac eholder<N_index2>,
_bz_remainder<float,int> > > _bz_remainder<float,int> > >
remainder(float d1, IndexPlaceholder<N_index2> d2) remainder(float d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholder<N _index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlaceho lder<N_index2>,
_bz_remainder<float,int> >(_bz_ArrayExprConstant<float>(d1), d2); _bz_remainder<float,int> >(_bz_ArrayExprConstant<float>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator< T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIte rator<T_numtype2, N_rank2>,
_bz_remainder<double,T_numtype2> > > _bz_remainder<double,T_numtype2> > >
remainder(double d1, const Array<T_numtype2, N_rank2>& d2) remainder(double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator<T_n umtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_remainder<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d 2.begin()); _bz_remainder<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d 2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr< _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_Arra
P_expr2>, yExpr<P_expr2>,
_bz_remainder<double,_bz_typename P_expr2::T_numtype> > > _bz_remainder<double,typename P_expr2::T_numtype> > >
remainder(double d1, _bz_ArrayExpr<P_expr2> d2) remainder(double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<P_e return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_remainder<double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCo _bz_remainder<double,typename P_expr2::T_numtype> >(_bz_ArrayExprConsta
nstant<double>(d1), d2); nt<double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlacehold er<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPla ceholder<N_index2>,
_bz_remainder<double,int> > > _bz_remainder<double,int> > >
remainder(double d1, IndexPlaceholder<N_index2> d2) remainder(double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlaceholder< N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPlaceh older<N_index2>,
_bz_remainder<double,int> >(_bz_ArrayExprConstant<double>(d1), d2); _bz_remainder<double,int> >(_bz_ArrayExprConstant<double>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_remainder<long double,T_numtype2> > > _bz_remainder<long double,T_numtype2> > >
remainder(long double d1, const Array<T_numtype2, N_rank2>& d2) remainder(long double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, ArrayI terator<T_numtype2, N_rank2>,
_bz_remainder<long double,T_numtype2> >(_bz_ArrayExprConstant<long doub le>(d1), d2.begin()); _bz_remainder<long double,T_numtype2> >(_bz_ArrayExprConstant<long doub le>(d1), d2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_remainder<long double,_bz_typename P_expr2::T_numtype> > > _bz_remainder<long double,typename P_expr2::T_numtype> > >
remainder(long double d1, _bz_ArrayExpr<P_expr2> d2) remainder(long double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_remainder<long double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayE _bz_remainder<long double,typename P_expr2::T_numtype> >(_bz_ArrayExprC
xprConstant<long double>(d1), d2); onstant<long double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Ind exPlaceholder<N_index2>,
_bz_remainder<long double,int> > > _bz_remainder<long double,int> > >
remainder(long double d1, IndexPlaceholder<N_index2> d2) remainder(long double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, IndexP laceholder<N_index2>,
_bz_remainder<long double,int> >(_bz_ArrayExprConstant<long double>(d1) , d2); _bz_remainder<long double,int> >(_bz_ArrayExprConstant<long double>(d1) , d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayIt erator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , A rrayIterator<T_numtype2, N_rank2>,
_bz_remainder<complex<T1> ,T_numtype2> > > _bz_remainder<complex<T1> ,T_numtype2> > >
remainder(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2) remainder(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayItera tor<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Arra yIterator<T_numtype2, N_rank2>,
_bz_remainder<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex< T1> > (d1), d2.begin()); _bz_remainder<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex< T1> > (d1), d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_Arr _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _
ayExpr<P_expr2>, bz_ArrayExpr<P_expr2>,
_bz_remainder<complex<T1> ,_bz_typename P_expr2::T_numtype> > > _bz_remainder<complex<T1> ,typename P_expr2::T_numtype> > >
remainder(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2) remainder(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayE return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _bz_
xpr<P_expr2>, ArrayExpr<P_expr2>,
_bz_remainder<complex<T1> ,_bz_typename P_expr2::T_numtype> >(_bz_Array _bz_remainder<complex<T1> ,typename P_expr2::T_numtype> >(_bz_ArrayExpr
ExprConstant<complex<T1> > (d1), d2); Constant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPl aceholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , I ndexPlaceholder<N_index2>,
_bz_remainder<complex<T1> ,int> > > _bz_remainder<complex<T1> ,int> > >
remainder(complex<T1> d1, IndexPlaceholder<N_index2> d2) remainder(complex<T1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPlace holder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Inde xPlaceholder<N_index2>,
_bz_remainder<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > ( d1), d2); _bz_remainder<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > ( d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#endif #endif
/************************************************************************** ** /************************************************************************** **
* rint * rint
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 4240 skipping to change at line 4231
_bz_rint<T_numtype1> > > _bz_rint<T_numtype1> > >
rint(const Array<T_numtype1, N_rank1>& d1) rint(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_rint<T_numtype1> >(d1.begin()); _bz_rint<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_rint<_bz_typename P_expr1::T_numtype> > > _bz_rint<typename P_expr1::T_numtype> > >
rint(_bz_ArrayExpr<P_expr1> d1) rint(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_rint<_bz_typename P_expr1::T_numtype> >(d1); _bz_rint<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_rint<int> > > _bz_rint<int> > >
rint(IndexPlaceholder<N_index1> d1) rint(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_rint<int> >(d1); _bz_rint<int> >(d1);
skipping to change at line 4277 skipping to change at line 4268
_bz_rsqrt<T_numtype1> > > _bz_rsqrt<T_numtype1> > >
rsqrt(const Array<T_numtype1, N_rank1>& d1) rsqrt(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_rsqrt<T_numtype1> >(d1.begin()); _bz_rsqrt<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_rsqrt<_bz_typename P_expr1::T_numtype> > > _bz_rsqrt<typename P_expr1::T_numtype> > >
rsqrt(_bz_ArrayExpr<P_expr1> d1) rsqrt(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_rsqrt<_bz_typename P_expr1::T_numtype> >(d1); _bz_rsqrt<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_rsqrt<int> > > _bz_rsqrt<int> > >
rsqrt(IndexPlaceholder<N_index1> d1) rsqrt(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_rsqrt<int> >(d1); _bz_rsqrt<int> >(d1);
skipping to change at line 4303 skipping to change at line 4294
#endif #endif
/************************************************************************** ** /************************************************************************** **
* scalb * scalb
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_scalb<T_numtype1,T_numtype2> > > _bz_scalb<T_numtype1,T_numtype2> > >
scalb(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2 >& d2) scalb(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2 >& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, ArrayI terator<T_numtype2, N_rank2>,
_bz_scalb<T_numtype1,T_numtype2> >(d1.begin(), d2.begin()); _bz_scalb<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
} }
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_scalb<T_numtype1,_bz_typename P_expr2::T_numtype> > > _bz_scalb<T_numtype1,typename P_expr2::T_numtype> > >
scalb(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2) scalb(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_scalb<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), d2) _bz_scalb<T_numtype1,typename P_expr2::T_numtype> >(d1.begin(), d2);
;
} }
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Ind exPlaceholder<N_index2>,
_bz_scalb<T_numtype1,int> > > _bz_scalb<T_numtype1,int> > >
scalb(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2) scalb(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, IndexP laceholder<N_index2>,
_bz_scalb<T_numtype1,int> >(d1.begin(), d2); _bz_scalb<T_numtype1,int> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<float>,
_bz_scalb<T_numtype1,float> > > _bz_scalb<T_numtype1,float> > >
scalb(const Array<T_numtype1, N_rank1>& d1, float d2) scalb(const Array<T_numtype1, N_rank1>& d1, float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<float>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<float>,
_bz_scalb<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>( d2)); _bz_scalb<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>( d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<double>,
_bz_scalb<T_numtype1,double> > > _bz_scalb<T_numtype1,double> > >
scalb(const Array<T_numtype1, N_rank1>& d1, double d2) scalb(const Array<T_numtype1, N_rank1>& d1, double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<double>,
_bz_scalb<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double >(d2)); _bz_scalb<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double >(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<long double>,
_bz_scalb<T_numtype1,long double> > > _bz_scalb<T_numtype1,long double> > >
scalb(const Array<T_numtype1, N_rank1>& d1, long double d2) scalb(const Array<T_numtype1, N_rank1>& d1, long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<long double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<long double>,
_bz_scalb<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<l ong double>(d2)); _bz_scalb<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<l ong double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<complex<T2> > ,
_bz_scalb<T_numtype1,complex<T2> > > > _bz_scalb<T_numtype1,complex<T2> > > >
scalb(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2) scalb(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<complex<T2> > , return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<complex<T2> > ,
_bz_scalb<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant< complex<T2> > (d2)); _bz_scalb<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant< complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numty _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T
pe2, N_rank2>, _numtype2, N_rank2>,
_bz_scalb<_bz_typename P_expr1::T_numtype,T_numtype2> > > _bz_scalb<typename P_expr1::T_numtype,T_numtype2> > >
scalb(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2) scalb(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numtype2 return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_nu
, N_rank2>, mtype2, N_rank2>,
_bz_scalb<_bz_typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin()) _bz_scalb<typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin());
;
} }
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2 _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P
>, _expr2>,
_bz_scalb<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numty _bz_scalb<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
pe> > >
scalb(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2) scalb(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_ex
_bz_scalb<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_numty pr2>,
pe> >(d1, d2); _bz_scalb<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >(d1
, d2);
} }
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_in _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholde
dex2>, r<N_index2>,
_bz_scalb<_bz_typename P_expr1::T_numtype,int> > > _bz_scalb<typename P_expr1::T_numtype,int> > >
scalb(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2) scalb(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_index return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N
2>, _index2>,
_bz_scalb<_bz_typename P_expr1::T_numtype,int> >(d1, d2); _bz_scalb<typename P_expr1::T_numtype,int> >(d1, d2);
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<float>, nstant<float>,
_bz_scalb<_bz_typename P_expr1::T_numtype,float> > > _bz_scalb<typename P_expr1::T_numtype,float> > >
scalb(_bz_ArrayExpr<P_expr1> d1, float d2) scalb(_bz_ArrayExpr<P_expr1> d1, float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<fl return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
oat>, ant<float>,
_bz_scalb<_bz_typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprCon _bz_scalb<typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprConstan
stant<float>(d2)); t<float>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<double>, nstant<double>,
_bz_scalb<_bz_typename P_expr1::T_numtype,double> > > _bz_scalb<typename P_expr1::T_numtype,double> > >
scalb(_bz_ArrayExpr<P_expr1> d1, double d2) scalb(_bz_ArrayExpr<P_expr1> d1, double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<do return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
uble>, ant<double>,
_bz_scalb<_bz_typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprCo _bz_scalb<typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprConsta
nstant<double>(d2)); nt<double>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<long double>, nstant<long double>,
_bz_scalb<_bz_typename P_expr1::T_numtype,long double> > > _bz_scalb<typename P_expr1::T_numtype,long double> > >
scalb(_bz_ArrayExpr<P_expr1> d1, long double d2) scalb(_bz_ArrayExpr<P_expr1> d1, long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<lo return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
ng double>, ant<long double>,
_bz_scalb<_bz_typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayE _bz_scalb<typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayExprC
xprConstant<long double>(d2)); onstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<complex<T2> > , nstant<complex<T2> > ,
_bz_scalb<_bz_typename P_expr1::T_numtype,complex<T2> > > > _bz_scalb<typename P_expr1::T_numtype,complex<T2> > > >
scalb(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2) scalb(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<co return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
mplex<T2> > , ant<complex<T2> > ,
_bz_scalb<_bz_typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_Array _bz_scalb<typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_ArrayExpr
ExprConstant<complex<T2> > (d2)); Constant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_n umtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_scalb<int,T_numtype2> > > _bz_scalb<int,T_numtype2> > >
scalb(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2) scalb(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_numt ype2, N_rank2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterator< T_numtype2, N_rank2>,
_bz_scalb<int,T_numtype2> >(d1, d2.begin()); _bz_scalb<int,T_numtype2> >(d1, d2.begin());
} }
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_e _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_scalb<int,_bz_typename P_expr2::T_numtype> > > _bz_scalb<int,typename P_expr2::T_numtype> > >
scalb(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2) scalb(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_expr return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<
2>, P_expr2>,
_bz_scalb<int,_bz_typename P_expr2::T_numtype> >(d1, d2); _bz_scalb<int,typename P_expr2::T_numtype> >(d1, d2);
} }
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder< N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlaceh older<N_index2>,
_bz_scalb<int,int> > > _bz_scalb<int,int> > >
scalb(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2) scalb(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder<N_i ndex2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlacehold er<N_index2>,
_bz_scalb<int,int> >(d1, d2); _bz_scalb<int,int> >(d1, d2);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<float>,
_bz_scalb<int,float> > > _bz_scalb<int,float> > >
scalb(IndexPlaceholder<N_index1> d1, float d2) scalb(IndexPlaceholder<N_index1> d1, float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<float>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<float>,
_bz_scalb<int,float> >(d1, _bz_ArrayExprConstant<float>(d2)); _bz_scalb<int,float> >(d1, _bz_ArrayExprConstant<float>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<double>,
_bz_scalb<int,double> > > _bz_scalb<int,double> > >
scalb(IndexPlaceholder<N_index1> d1, double d2) scalb(IndexPlaceholder<N_index1> d1, double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<double>,
_bz_scalb<int,double> >(d1, _bz_ArrayExprConstant<double>(d2)); _bz_scalb<int,double> >(d1, _bz_ArrayExprConstant<double>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<long double>,
_bz_scalb<int,long double> > > _bz_scalb<int,long double> > >
scalb(IndexPlaceholder<N_index1> d1, long double d2) scalb(IndexPlaceholder<N_index1> d1, long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<long double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<long double>,
_bz_scalb<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2) ); _bz_scalb<int,long double> >(d1, _bz_ArrayExprConstant<long double>(d2) );
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<complex<T2> > ,
_bz_scalb<int,complex<T2> > > > _bz_scalb<int,complex<T2> > > >
scalb(IndexPlaceholder<N_index1> d1, complex<T2> d2) scalb(IndexPlaceholder<N_index1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<complex<T2> > , return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<complex<T2> > ,
_bz_scalb<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > ( d2)); _bz_scalb<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > ( d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T _numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIter ator<T_numtype2, N_rank2>,
_bz_scalb<float,T_numtype2> > > _bz_scalb<float,T_numtype2> > >
scalb(float d1, const Array<T_numtype2, N_rank2>& d2) scalb(float d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T_nu mtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIterato r<T_numtype2, N_rank2>,
_bz_scalb<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begi n()); _bz_scalb<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2.begi n());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_Array
_expr2>, Expr<P_expr2>,
_bz_scalb<float,_bz_typename P_expr2::T_numtype> > > _bz_scalb<float,typename P_expr2::T_numtype> > >
scalb(float d1, _bz_ArrayExpr<P_expr2> d2) scalb(float d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P_ex return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_ArrayExp
pr2>, r<P_expr2>,
_bz_scalb<float,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConstan _bz_scalb<float,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<fl
t<float>(d1), d2); oat>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholde r<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlac eholder<N_index2>,
_bz_scalb<float,int> > > _bz_scalb<float,int> > >
scalb(float d1, IndexPlaceholder<N_index2> d2) scalb(float d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholder<N _index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlaceho lder<N_index2>,
_bz_scalb<float,int> >(_bz_ArrayExprConstant<float>(d1), d2); _bz_scalb<float,int> >(_bz_ArrayExprConstant<float>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator< T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIte rator<T_numtype2, N_rank2>,
_bz_scalb<double,T_numtype2> > > _bz_scalb<double,T_numtype2> > >
scalb(double d1, const Array<T_numtype2, N_rank2>& d2) scalb(double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator<T_n umtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_scalb<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.be gin()); _bz_scalb<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d2.be gin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr< _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_Arra
P_expr2>, yExpr<P_expr2>,
_bz_scalb<double,_bz_typename P_expr2::T_numtype> > > _bz_scalb<double,typename P_expr2::T_numtype> > >
scalb(double d1, _bz_ArrayExpr<P_expr2> d2) scalb(double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<P_e return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_scalb<double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprConsta _bz_scalb<double,typename P_expr2::T_numtype> >(_bz_ArrayExprConstant<d
nt<double>(d1), d2); ouble>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlacehold er<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPla ceholder<N_index2>,
_bz_scalb<double,int> > > _bz_scalb<double,int> > >
scalb(double d1, IndexPlaceholder<N_index2> d2) scalb(double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlaceholder< N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPlaceh older<N_index2>,
_bz_scalb<double,int> >(_bz_ArrayExprConstant<double>(d1), d2); _bz_scalb<double,int> >(_bz_ArrayExprConstant<double>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_scalb<long double,T_numtype2> > > _bz_scalb<long double,T_numtype2> > >
scalb(long double d1, const Array<T_numtype2, N_rank2>& d2) scalb(long double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, ArrayI terator<T_numtype2, N_rank2>,
_bz_scalb<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>( d1), d2.begin()); _bz_scalb<long double,T_numtype2> >(_bz_ArrayExprConstant<long double>( d1), d2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_scalb<long double,_bz_typename P_expr2::T_numtype> > > _bz_scalb<long double,typename P_expr2::T_numtype> > >
scalb(long double d1, _bz_ArrayExpr<P_expr2> d2) scalb(long double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_scalb<long double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprC _bz_scalb<long double,typename P_expr2::T_numtype> >(_bz_ArrayExprConst
onstant<long double>(d1), d2); ant<long double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Ind exPlaceholder<N_index2>,
_bz_scalb<long double,int> > > _bz_scalb<long double,int> > >
scalb(long double d1, IndexPlaceholder<N_index2> d2) scalb(long double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, IndexP laceholder<N_index2>,
_bz_scalb<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2 ); _bz_scalb<long double,int> >(_bz_ArrayExprConstant<long double>(d1), d2 );
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayIt erator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , A rrayIterator<T_numtype2, N_rank2>,
_bz_scalb<complex<T1> ,T_numtype2> > > _bz_scalb<complex<T1> ,T_numtype2> > >
scalb(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2) scalb(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayItera tor<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Arra yIterator<T_numtype2, N_rank2>,
_bz_scalb<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin()); _bz_scalb<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_Arr _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _
ayExpr<P_expr2>, bz_ArrayExpr<P_expr2>,
_bz_scalb<complex<T1> ,_bz_typename P_expr2::T_numtype> > > _bz_scalb<complex<T1> ,typename P_expr2::T_numtype> > >
scalb(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2) scalb(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayE return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _bz_
xpr<P_expr2>, ArrayExpr<P_expr2>,
_bz_scalb<complex<T1> ,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExpr _bz_scalb<complex<T1> ,typename P_expr2::T_numtype> >(_bz_ArrayExprCons
Constant<complex<T1> > (d1), d2); tant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPl aceholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , I ndexPlaceholder<N_index2>,
_bz_scalb<complex<T1> ,int> > > _bz_scalb<complex<T1> ,int> > >
scalb(complex<T1> d1, IndexPlaceholder<N_index2> d2) scalb(complex<T1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPlace holder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Inde xPlaceholder<N_index2>,
_bz_scalb<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2); _bz_scalb<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#endif #endif
/************************************************************************** ** /************************************************************************** **
* sin * sin
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 4668 skipping to change at line 4659
_bz_sin<T_numtype1> > > _bz_sin<T_numtype1> > >
sin(const Array<T_numtype1, N_rank1>& d1) sin(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_sin<T_numtype1> >(d1.begin()); _bz_sin<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_sin<_bz_typename P_expr1::T_numtype> > > _bz_sin<typename P_expr1::T_numtype> > >
sin(_bz_ArrayExpr<P_expr1> d1) sin(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_sin<_bz_typename P_expr1::T_numtype> >(d1); _bz_sin<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_sin<int> > > _bz_sin<int> > >
sin(IndexPlaceholder<N_index1> d1) sin(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_sin<int> >(d1); _bz_sin<int> >(d1);
skipping to change at line 4702 skipping to change at line 4693
_bz_sinh<T_numtype1> > > _bz_sinh<T_numtype1> > >
sinh(const Array<T_numtype1, N_rank1>& d1) sinh(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_sinh<T_numtype1> >(d1.begin()); _bz_sinh<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_sinh<_bz_typename P_expr1::T_numtype> > > _bz_sinh<typename P_expr1::T_numtype> > >
sinh(_bz_ArrayExpr<P_expr1> d1) sinh(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_sinh<_bz_typename P_expr1::T_numtype> >(d1); _bz_sinh<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_sinh<int> > > _bz_sinh<int> > >
sinh(IndexPlaceholder<N_index1> d1) sinh(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_sinh<int> >(d1); _bz_sinh<int> >(d1);
skipping to change at line 4736 skipping to change at line 4727
_bz_sqr<T_numtype1> > > _bz_sqr<T_numtype1> > >
sqr(const Array<T_numtype1, N_rank1>& d1) sqr(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_sqr<T_numtype1> >(d1.begin()); _bz_sqr<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_sqr<_bz_typename P_expr1::T_numtype> > > _bz_sqr<typename P_expr1::T_numtype> > >
sqr(_bz_ArrayExpr<P_expr1> d1) sqr(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_sqr<_bz_typename P_expr1::T_numtype> >(d1); _bz_sqr<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_sqr<int> > > _bz_sqr<int> > >
sqr(IndexPlaceholder<N_index1> d1) sqr(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_sqr<int> >(d1); _bz_sqr<int> >(d1);
skipping to change at line 4770 skipping to change at line 4761
_bz_sqrt<T_numtype1> > > _bz_sqrt<T_numtype1> > >
sqrt(const Array<T_numtype1, N_rank1>& d1) sqrt(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_sqrt<T_numtype1> >(d1.begin()); _bz_sqrt<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_sqrt<_bz_typename P_expr1::T_numtype> > > _bz_sqrt<typename P_expr1::T_numtype> > >
sqrt(_bz_ArrayExpr<P_expr1> d1) sqrt(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_sqrt<_bz_typename P_expr1::T_numtype> >(d1); _bz_sqrt<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_sqrt<int> > > _bz_sqrt<int> > >
sqrt(IndexPlaceholder<N_index1> d1) sqrt(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_sqrt<int> >(d1); _bz_sqrt<int> >(d1);
skipping to change at line 4804 skipping to change at line 4795
_bz_tan<T_numtype1> > > _bz_tan<T_numtype1> > >
tan(const Array<T_numtype1, N_rank1>& d1) tan(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_tan<T_numtype1> >(d1.begin()); _bz_tan<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_tan<_bz_typename P_expr1::T_numtype> > > _bz_tan<typename P_expr1::T_numtype> > >
tan(_bz_ArrayExpr<P_expr1> d1) tan(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_tan<_bz_typename P_expr1::T_numtype> >(d1); _bz_tan<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_tan<int> > > _bz_tan<int> > >
tan(IndexPlaceholder<N_index1> d1) tan(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_tan<int> >(d1); _bz_tan<int> >(d1);
skipping to change at line 4838 skipping to change at line 4829
_bz_tanh<T_numtype1> > > _bz_tanh<T_numtype1> > >
tanh(const Array<T_numtype1, N_rank1>& d1) tanh(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_tanh<T_numtype1> >(d1.begin()); _bz_tanh<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_tanh<_bz_typename P_expr1::T_numtype> > > _bz_tanh<typename P_expr1::T_numtype> > >
tanh(_bz_ArrayExpr<P_expr1> d1) tanh(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_tanh<_bz_typename P_expr1::T_numtype> >(d1); _bz_tanh<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_tanh<int> > > _bz_tanh<int> > >
tanh(IndexPlaceholder<N_index1> d1) tanh(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_tanh<int> >(d1); _bz_tanh<int> >(d1);
skipping to change at line 4873 skipping to change at line 4864
_bz_uitrunc<T_numtype1> > > _bz_uitrunc<T_numtype1> > >
uitrunc(const Array<T_numtype1, N_rank1>& d1) uitrunc(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_uitrunc<T_numtype1> >(d1.begin()); _bz_uitrunc<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_uitrunc<_bz_typename P_expr1::T_numtype> > > _bz_uitrunc<typename P_expr1::T_numtype> > >
uitrunc(_bz_ArrayExpr<P_expr1> d1) uitrunc(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_uitrunc<_bz_typename P_expr1::T_numtype> >(d1); _bz_uitrunc<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_uitrunc<int> > > _bz_uitrunc<int> > >
uitrunc(IndexPlaceholder<N_index1> d1) uitrunc(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_uitrunc<int> >(d1); _bz_uitrunc<int> >(d1);
skipping to change at line 4899 skipping to change at line 4890
#endif #endif
/************************************************************************** ** /************************************************************************** **
* unordered * unordered
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2> template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_unordered<T_numtype1,T_numtype2> > > _bz_unordered<T_numtype1,T_numtype2> > >
unordered(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_r ank2>& d2) unordered(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_r ank2>& d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, ArrayI terator<T_numtype2, N_rank2>,
_bz_unordered<T_numtype1,T_numtype2> >(d1.begin(), d2.begin()); _bz_unordered<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
} }
template<class T_numtype1, int N_rank1, class P_expr2> template<class T_numtype1, int N_rank1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_unordered<T_numtype1,_bz_typename P_expr2::T_numtype> > > _bz_unordered<T_numtype1,typename P_expr2::T_numtype> > >
unordered(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2) unordered(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_unordered<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), _bz_unordered<T_numtype1,typename P_expr2::T_numtype> >(d1.begin(), d2)
d2); ;
} }
template<class T_numtype1, int N_rank1, int N_index2> template<class T_numtype1, int N_rank1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, Ind exPlaceholder<N_index2>,
_bz_unordered<T_numtype1,int> > > _bz_unordered<T_numtype1,int> > >
unordered(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2) unordered(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, IndexP laceholder<N_index2>,
_bz_unordered<T_numtype1,int> >(d1.begin(), d2); _bz_unordered<T_numtype1,int> >(d1.begin(), d2);
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<float>,
_bz_unordered<T_numtype1,float> > > _bz_unordered<T_numtype1,float> > >
unordered(const Array<T_numtype1, N_rank1>& d1, float d2) unordered(const Array<T_numtype1, N_rank1>& d1, float d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<float>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<float>,
_bz_unordered<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<flo at>(d2)); _bz_unordered<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<flo at>(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<double>,
_bz_unordered<T_numtype1,double> > > _bz_unordered<T_numtype1,double> > >
unordered(const Array<T_numtype1, N_rank1>& d1, double d2) unordered(const Array<T_numtype1, N_rank1>& d1, double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<double>,
_bz_unordered<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<do uble>(d2)); _bz_unordered<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<do uble>(d2));
} }
template<class T_numtype1, int N_rank1> template<class T_numtype1, int N_rank1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<long double>,
_bz_unordered<T_numtype1,long double> > > _bz_unordered<T_numtype1,long double> > >
unordered(const Array<T_numtype1, N_rank1>& d1, long double d2) unordered(const Array<T_numtype1, N_rank1>& d1, long double d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<long double>, return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<long double>,
_bz_unordered<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConsta nt<long double>(d2)); _bz_unordered<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConsta nt<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2> template<class T_numtype1, int N_rank1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Array ExprConstant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz _ArrayExprConstant<complex<T2> > ,
_bz_unordered<T_numtype1,complex<T2> > > > _bz_unordered<T_numtype1,complex<T2> > > >
unordered(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2) unordered(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExp rConstant<complex<T2> > , return _bz_ArrayExprBinaryOp<ArrayIterator<T_numtype1, N_rank1>, _bz_Ar rayExprConstant<complex<T2> > ,
_bz_unordered<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConst ant<complex<T2> > (d2)); _bz_unordered<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConst ant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class P_expr1, class T_numtype2, int N_rank2> template<class P_expr1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numty _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T
pe2, N_rank2>, _numtype2, N_rank2>,
_bz_unordered<_bz_typename P_expr1::T_numtype,T_numtype2> > > _bz_unordered<typename P_expr1::T_numtype,T_numtype2> > >
unordered(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2) unordered(_bz_ArrayExpr<P_expr1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_numtype2 return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, ArrayIterator<T_nu
, N_rank2>, mtype2, N_rank2>,
_bz_unordered<_bz_typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begi _bz_unordered<typename P_expr1::T_numtype,T_numtype2> >(d1, d2.begin())
n()); ;
} }
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2 _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P
>, _expr2>,
_bz_unordered<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_n _bz_unordered<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
umtype> > > > >
unordered(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2) unordered(_bz_ArrayExpr<P_expr1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_expr2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<P_ex
_bz_unordered<_bz_typename P_expr1::T_numtype,_bz_typename P_expr2::T_n pr2>,
umtype> >(d1, d2); _bz_unordered<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
>(d1, d2);
} }
template<class P_expr1, int N_index2> template<class P_expr1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_in _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholde
dex2>, r<N_index2>,
_bz_unordered<_bz_typename P_expr1::T_numtype,int> > > _bz_unordered<typename P_expr1::T_numtype,int> > >
unordered(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2) unordered(_bz_ArrayExpr<P_expr1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N_index return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, IndexPlaceholder<N
2>, _index2>,
_bz_unordered<_bz_typename P_expr1::T_numtype,int> >(d1, d2); _bz_unordered<typename P_expr1::T_numtype,int> >(d1, d2);
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<float>, nstant<float>,
_bz_unordered<_bz_typename P_expr1::T_numtype,float> > > _bz_unordered<typename P_expr1::T_numtype,float> > >
unordered(_bz_ArrayExpr<P_expr1> d1, float d2) unordered(_bz_ArrayExpr<P_expr1> d1, float d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<fl return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
oat>, ant<float>,
_bz_unordered<_bz_typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExp _bz_unordered<typename P_expr1::T_numtype,float> >(d1, _bz_ArrayExprCon
rConstant<float>(d2)); stant<float>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<double>, nstant<double>,
_bz_unordered<_bz_typename P_expr1::T_numtype,double> > > _bz_unordered<typename P_expr1::T_numtype,double> > >
unordered(_bz_ArrayExpr<P_expr1> d1, double d2) unordered(_bz_ArrayExpr<P_expr1> d1, double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<do return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
uble>, ant<double>,
_bz_unordered<_bz_typename P_expr1::T_numtype,double> >(d1, _bz_ArrayEx _bz_unordered<typename P_expr1::T_numtype,double> >(d1, _bz_ArrayExprCo
prConstant<double>(d2)); nstant<double>(d2));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<long double>, nstant<long double>,
_bz_unordered<_bz_typename P_expr1::T_numtype,long double> > > _bz_unordered<typename P_expr1::T_numtype,long double> > >
unordered(_bz_ArrayExpr<P_expr1> d1, long double d2) unordered(_bz_ArrayExpr<P_expr1> d1, long double d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<lo return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
ng double>, ant<long double>,
_bz_unordered<_bz_typename P_expr1::T_numtype,long double> >(d1, _bz_Ar _bz_unordered<typename P_expr1::T_numtype,long double> >(d1, _bz_ArrayE
rayExprConstant<long double>(d2)); xprConstant<long double>(d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprCo
<complex<T2> > , nstant<complex<T2> > ,
_bz_unordered<_bz_typename P_expr1::T_numtype,complex<T2> > > > _bz_unordered<typename P_expr1::T_numtype,complex<T2> > > >
unordered(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2) unordered(_bz_ArrayExpr<P_expr1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConstant<co return _bz_ArrayExprBinaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExprConst
mplex<T2> > , ant<complex<T2> > ,
_bz_unordered<_bz_typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_A _bz_unordered<typename P_expr1::T_numtype,complex<T2> > >(d1, _bz_Array
rrayExprConstant<complex<T2> > (d2)); ExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<int N_index1, class T_numtype2, int N_rank2> template<int N_index1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_n umtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_unordered<int,T_numtype2> > > _bz_unordered<int,T_numtype2> > >
unordered(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2) unordered(IndexPlaceholder<N_index1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, ArrayIterator<T_numt ype2, N_rank2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, ArrayIterator< T_numtype2, N_rank2>,
_bz_unordered<int,T_numtype2> >(d1, d2.begin()); _bz_unordered<int,T_numtype2> >(d1, d2.begin());
} }
template<int N_index1, class P_expr2> template<int N_index1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_e _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_unordered<int,_bz_typename P_expr2::T_numtype> > > _bz_unordered<int,typename P_expr2::T_numtype> > >
unordered(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2) unordered(IndexPlaceholder<N_index1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<P_expr return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<
2>, P_expr2>,
_bz_unordered<int,_bz_typename P_expr2::T_numtype> >(d1, d2); _bz_unordered<int,typename P_expr2::T_numtype> >(d1, d2);
} }
template<int N_index1, int N_index2> template<int N_index1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder< N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlaceh older<N_index2>,
_bz_unordered<int,int> > > _bz_unordered<int,int> > >
unordered(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2) unordered(IndexPlaceholder<N_index1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, IndexPlaceholder<N_i ndex2>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, IndexPlacehold er<N_index2>,
_bz_unordered<int,int> >(d1, d2); _bz_unordered<int,int> >(d1, d2);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<float>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<float>,
_bz_unordered<int,float> > > _bz_unordered<int,float> > >
unordered(IndexPlaceholder<N_index1> d1, float d2) unordered(IndexPlaceholder<N_index1> d1, float d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<float>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<float>,
_bz_unordered<int,float> >(d1, _bz_ArrayExprConstant<float>(d2)); _bz_unordered<int,float> >(d1, _bz_ArrayExprConstant<float>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<double>,
_bz_unordered<int,double> > > _bz_unordered<int,double> > >
unordered(IndexPlaceholder<N_index1> d1, double d2) unordered(IndexPlaceholder<N_index1> d1, double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<double>,
_bz_unordered<int,double> >(d1, _bz_ArrayExprConstant<double>(d2)); _bz_unordered<int,double> >(d1, _bz_ArrayExprConstant<double>(d2));
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<long double>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<long double>,
_bz_unordered<int,long double> > > _bz_unordered<int,long double> > >
unordered(IndexPlaceholder<N_index1> d1, long double d2) unordered(IndexPlaceholder<N_index1> d1, long double d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<long double>, return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<long double>,
_bz_unordered<int,long double> >(d1, _bz_ArrayExprConstant<long double> (d2)); _bz_unordered<int,long double> >(d1, _bz_ArrayExprConstant<long double> (d2));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<int N_index1, class T2> template<int N_index1, class T2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprCons tant<complex<T2> > , _bz_ArrayExpr<_bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayEx prConstant<complex<T2> > ,
_bz_unordered<int,complex<T2> > > > _bz_unordered<int,complex<T2> > > >
unordered(IndexPlaceholder<N_index1> d1, complex<T2> d2) unordered(IndexPlaceholder<N_index1> d1, complex<T2> d2)
{ {
return _bz_ArrayExprOp<IndexPlaceholder<N_index1>, _bz_ArrayExprConstan t<complex<T2> > , return _bz_ArrayExprBinaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExprC onstant<complex<T2> > ,
_bz_unordered<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d2)); _bz_unordered<int,complex<T2> > >(d1, _bz_ArrayExprConstant<complex<T2> > (d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T _numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIter ator<T_numtype2, N_rank2>,
_bz_unordered<float,T_numtype2> > > _bz_unordered<float,T_numtype2> > >
unordered(float d1, const Array<T_numtype2, N_rank2>& d2) unordered(float d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, ArrayIterator<T_nu mtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, ArrayIterato r<T_numtype2, N_rank2>,
_bz_unordered<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2. begin()); _bz_unordered<float,T_numtype2> >(_bz_ArrayExprConstant<float>(d1), d2. begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_Array
_expr2>, Expr<P_expr2>,
_bz_unordered<float,_bz_typename P_expr2::T_numtype> > > _bz_unordered<float,typename P_expr2::T_numtype> > >
unordered(float d1, _bz_ArrayExpr<P_expr2> d2) unordered(float d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, _bz_ArrayExpr<P_ex return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, _bz_ArrayExp
pr2>, r<P_expr2>,
_bz_unordered<float,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCon _bz_unordered<float,typename P_expr2::T_numtype> >(_bz_ArrayExprConstan
stant<float>(d1), d2); t<float>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholde r<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlac eholder<N_index2>,
_bz_unordered<float,int> > > _bz_unordered<float,int> > >
unordered(float d1, IndexPlaceholder<N_index2> d2) unordered(float d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<float>, IndexPlaceholder<N _index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<float>, IndexPlaceho lder<N_index2>,
_bz_unordered<float,int> >(_bz_ArrayExprConstant<float>(d1), d2); _bz_unordered<float,int> >(_bz_ArrayExprConstant<float>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator< T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIte rator<T_numtype2, N_rank2>,
_bz_unordered<double,T_numtype2> > > _bz_unordered<double,T_numtype2> > >
unordered(double d1, const Array<T_numtype2, N_rank2>& d2) unordered(double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, ArrayIterator<T_n umtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, ArrayIterat or<T_numtype2, N_rank2>,
_bz_unordered<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d 2.begin()); _bz_unordered<double,T_numtype2> >(_bz_ArrayExprConstant<double>(d1), d 2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr< _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_Arra
P_expr2>, yExpr<P_expr2>,
_bz_unordered<double,_bz_typename P_expr2::T_numtype> > > _bz_unordered<double,typename P_expr2::T_numtype> > >
unordered(double d1, _bz_ArrayExpr<P_expr2> d2) unordered(double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, _bz_ArrayExpr<P_e return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, _bz_ArrayEx
xpr2>, pr<P_expr2>,
_bz_unordered<double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayExprCo _bz_unordered<double,typename P_expr2::T_numtype> >(_bz_ArrayExprConsta
nstant<double>(d1), d2); nt<double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlacehold er<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPla ceholder<N_index2>,
_bz_unordered<double,int> > > _bz_unordered<double,int> > >
unordered(double d1, IndexPlaceholder<N_index2> d2) unordered(double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<double>, IndexPlaceholder< N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<double>, IndexPlaceh older<N_index2>,
_bz_unordered<double,int> >(_bz_ArrayExprConstant<double>(d1), d2); _bz_unordered<double,int> >(_bz_ArrayExprConstant<double>(d1), d2);
} }
template<class T_numtype2, int N_rank2> template<class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIter ator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Arr ayIterator<T_numtype2, N_rank2>,
_bz_unordered<long double,T_numtype2> > > _bz_unordered<long double,T_numtype2> > >
unordered(long double d1, const Array<T_numtype2, N_rank2>& d2) unordered(long double d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, ArrayIterato r<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, ArrayI terator<T_numtype2, N_rank2>,
_bz_unordered<long double,T_numtype2> >(_bz_ArrayExprConstant<long doub le>(d1), d2.begin()); _bz_unordered<long double,T_numtype2> >(_bz_ArrayExprConstant<long doub le>(d1), d2.begin());
} }
template<class P_expr2> template<class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_Array _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz
Expr<P_expr2>, _ArrayExpr<P_expr2>,
_bz_unordered<long double,_bz_typename P_expr2::T_numtype> > > _bz_unordered<long double,typename P_expr2::T_numtype> > >
unordered(long double d1, _bz_ArrayExpr<P_expr2> d2) unordered(long double d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, _bz_ArrayExp return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, _bz_Ar
r<P_expr2>, rayExpr<P_expr2>,
_bz_unordered<long double,_bz_typename P_expr2::T_numtype> >(_bz_ArrayE _bz_unordered<long double,typename P_expr2::T_numtype> >(_bz_ArrayExprC
xprConstant<long double>(d1), d2); onstant<long double>(d1), d2);
} }
template<int N_index2> template<int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlac eholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, Ind exPlaceholder<N_index2>,
_bz_unordered<long double,int> > > _bz_unordered<long double,int> > >
unordered(long double d1, IndexPlaceholder<N_index2> d2) unordered(long double d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<long double>, IndexPlaceho lder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<long double>, IndexP laceholder<N_index2>,
_bz_unordered<long double,int> >(_bz_ArrayExprConstant<long double>(d1) , d2); _bz_unordered<long double,int> >(_bz_ArrayExprConstant<long double>(d1) , d2);
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class T_numtype2, int N_rank2> template<class T1, class T_numtype2, int N_rank2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayIt erator<T_numtype2, N_rank2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , A rrayIterator<T_numtype2, N_rank2>,
_bz_unordered<complex<T1> ,T_numtype2> > > _bz_unordered<complex<T1> ,T_numtype2> > >
unordered(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2) unordered(complex<T1> d1, const Array<T_numtype2, N_rank2>& d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , ArrayItera tor<T_numtype2, N_rank2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Arra yIterator<T_numtype2, N_rank2>,
_bz_unordered<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex< T1> > (d1), d2.begin()); _bz_unordered<complex<T1> ,T_numtype2> >(_bz_ArrayExprConstant<complex< T1> > (d1), d2.begin());
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_Arr _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _
ayExpr<P_expr2>, bz_ArrayExpr<P_expr2>,
_bz_unordered<complex<T1> ,_bz_typename P_expr2::T_numtype> > > _bz_unordered<complex<T1> ,typename P_expr2::T_numtype> > >
unordered(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2) unordered(complex<T1> d1, _bz_ArrayExpr<P_expr2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , _bz_ArrayE return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , _bz_
xpr<P_expr2>, ArrayExpr<P_expr2>,
_bz_unordered<complex<T1> ,_bz_typename P_expr2::T_numtype> >(_bz_Array _bz_unordered<complex<T1> ,typename P_expr2::T_numtype> >(_bz_ArrayExpr
ExprConstant<complex<T1> > (d1), d2); Constant<complex<T1> > (d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T1, int N_index2> template<class T1, int N_index2>
inline inline
_bz_ArrayExpr<_bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPl aceholder<N_index2>, _bz_ArrayExpr<_bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , I ndexPlaceholder<N_index2>,
_bz_unordered<complex<T1> ,int> > > _bz_unordered<complex<T1> ,int> > >
unordered(complex<T1> d1, IndexPlaceholder<N_index2> d2) unordered(complex<T1> d1, IndexPlaceholder<N_index2> d2)
{ {
return _bz_ArrayExprOp<_bz_ArrayExprConstant<complex<T1> > , IndexPlace holder<N_index2>, return _bz_ArrayExprBinaryOp<_bz_ArrayExprConstant<complex<T1> > , Inde xPlaceholder<N_index2>,
_bz_unordered<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > ( d1), d2); _bz_unordered<complex<T1> ,int> >(_bz_ArrayExprConstant<complex<T1> > ( d1), d2);
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#endif #endif
/************************************************************************** ** /************************************************************************** **
* y0 * y0
************************************************************************** **/ ************************************************************************** **/
skipping to change at line 5265 skipping to change at line 5256
_bz_y0<T_numtype1> > > _bz_y0<T_numtype1> > >
y0(const Array<T_numtype1, N_rank1>& d1) y0(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_y0<T_numtype1> >(d1.begin()); _bz_y0<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_y0<_bz_typename P_expr1::T_numtype> > > _bz_y0<typename P_expr1::T_numtype> > >
y0(_bz_ArrayExpr<P_expr1> d1) y0(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_y0<_bz_typename P_expr1::T_numtype> >(d1); _bz_y0<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_y0<int> > > _bz_y0<int> > >
y0(IndexPlaceholder<N_index1> d1) y0(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_y0<int> >(d1); _bz_y0<int> >(d1);
skipping to change at line 5302 skipping to change at line 5293
_bz_y1<T_numtype1> > > _bz_y1<T_numtype1> > >
y1(const Array<T_numtype1, N_rank1>& d1) y1(const Array<T_numtype1, N_rank1>& d1)
{ {
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>, return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_y1<T_numtype1> >(d1.begin()); _bz_y1<T_numtype1> >(d1.begin());
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_y1<_bz_typename P_expr1::T_numtype> > > _bz_y1<typename P_expr1::T_numtype> > >
y1(_bz_ArrayExpr<P_expr1> d1) y1(_bz_ArrayExpr<P_expr1> d1)
{ {
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>, return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_y1<_bz_typename P_expr1::T_numtype> >(d1); _bz_y1<typename P_expr1::T_numtype> >(d1);
} }
template<int N_index1> template<int N_index1>
inline inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, _bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_y1<int> > > _bz_y1<int> > >
y1(IndexPlaceholder<N_index1> d1) y1(IndexPlaceholder<N_index1> d1)
{ {
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>, return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_y1<int> >(d1); _bz_y1<int> >(d1);
 End of changes. 769 change blocks. 
1405 lines changed or deleted 1393 lines changed or added


 update.h   update.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/update.h Declaration of the _bz_XXXX updater classes * blitz/update.h Declaration of the _bz_XXXX updater classes
* *
* $Id: update.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: update.h,v 1.5 2004/03/09 21:55:31 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: update.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.5 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.4 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.3 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_UPDATE_H #ifndef BZ_UPDATE_H
#define BZ_UPDATE_H #define BZ_UPDATE_H
#ifndef BZ_BLITZ_H #include <blitz/blitz.h>
#include <blitz/blitz.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
class _bz_updater_base { }; class _bz_updater_base { };
#define BZ_DECL_UPDATER(name,op,symbol) \ #define BZ_DECL_UPDATER(name,op,symbol) \
template<class X, class Y> \ template<typename X, typename Y> \
class name : public _bz_updater_base { \ class name : public _bz_updater_base { \
public: \ public: \
static inline void update(X& _bz_restrict x, Y y) \ static inline void update(X& restrict x, Y y) \
{ x op y; } \ { x op y; } \
static void prettyPrint(string& str) \ static void prettyPrint(BZ_STD_SCOPE(string) &str) \
{ str += symbol; } \ { str += symbol; } \
} }
template<class X, class Y> template<typename X, typename Y>
class _bz_update : public _bz_updater_base { class _bz_update : public _bz_updater_base {
public: public:
static inline void update(X& _bz_restrict x, Y y) static inline void update(X& restrict x, Y y)
{ x = (X)y; } { x = (X)y; }
static void prettyPrint(string& str) static void prettyPrint(BZ_STD_SCOPE(string) &str)
{ str += "="; } { str += "="; }
}; };
BZ_DECL_UPDATER(_bz_plus_update, +=, "+="); BZ_DECL_UPDATER(_bz_plus_update, +=, "+=");
BZ_DECL_UPDATER(_bz_minus_update, -=, "-="); BZ_DECL_UPDATER(_bz_minus_update, -=, "-=");
BZ_DECL_UPDATER(_bz_multiply_update, *=, "*="); BZ_DECL_UPDATER(_bz_multiply_update, *=, "*=");
BZ_DECL_UPDATER(_bz_divide_update, /=, "/="); BZ_DECL_UPDATER(_bz_divide_update, /=, "/=");
BZ_DECL_UPDATER(_bz_mod_update, %=, "%="); BZ_DECL_UPDATER(_bz_mod_update, %=, "%=");
BZ_DECL_UPDATER(_bz_xor_update, ^=, "^="); BZ_DECL_UPDATER(_bz_xor_update, ^=, "^=");
BZ_DECL_UPDATER(_bz_bitand_update, &=, "&="); BZ_DECL_UPDATER(_bz_bitand_update, &=, "&=");
 End of changes. 8 change blocks. 
41 lines changed or deleted 16 lines changed or added


 vecaccum.cc   vecaccum.cc 
/* /*
* $Id: vecaccum.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $ * $Id: vecaccum.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecaccum.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECACCUM_CC #ifndef BZ_VECACCUM_CC
#define BZ_VECACCUM_CC #define BZ_VECACCUM_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/vecaccum.cc> must be included via <blitz/vecglobs.h> #error <blitz/vecaccum.cc> must be included via <blitz/vecglobs.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P> template<typename P>
inline inline
Vector<BZ_SUMTYPE(_bz_typename P::T_numtype)> _bz_vec_accumulate(P expr) Vector<BZ_SUMTYPE(_bz_typename P::T_numtype)> _bz_vec_accumulate(P expr)
{ {
typedef BZ_SUMTYPE(_bz_typename P::T_numtype) T_sumtype; typedef BZ_SUMTYPE(_bz_typename P::T_numtype) T_sumtype;
int length = expr._bz_suggestLength(); int length = expr._bz_suggestLength();
Vector<T_sumtype> z(length); Vector<T_sumtype> z(length);
T_sumtype sum = 0; T_sumtype sum = 0;
if (expr._bz_hasFastAccess()) if (expr._bz_hasFastAccess())
{ {
skipping to change at line 59 skipping to change at line 46
else { else {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
{ {
sum += expr(i); sum += expr(i);
z[i] = sum; z[i] = sum;
} }
} }
return z; return z;
} }
template<class P_numtype> template<typename P_numtype>
Vector<BZ_SUMTYPE(P_numtype)> accumulate(const Vector<P_numtype>& x) Vector<BZ_SUMTYPE(P_numtype)> accumulate(const Vector<P_numtype>& x)
{ {
return _bz_vec_accumulate(x); return _bz_vec_accumulate(x);
} }
template<class P_expr> template<typename P_expr>
Vector<BZ_SUMTYPE(_bz_typename P_expr::T_numtype)> Vector<BZ_SUMTYPE(_bz_typename P_expr::T_numtype)>
accumulate(_bz_VecExpr<P_expr> x) accumulate(_bz_VecExpr<P_expr> x)
{ {
return _bz_vec_accumulate(x); return _bz_vec_accumulate(x);
} }
template<class P_numtype> template<typename P_numtype>
Vector<BZ_SUMTYPE(P_numtype)> accumulate(const VectorPick<P_numtype>& x) Vector<BZ_SUMTYPE(P_numtype)> accumulate(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_accumulate(x); return _bz_vec_accumulate(x);
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECACCUM_CC #endif // BZ_VECACCUM_CC
 End of changes. 6 change blocks. 
18 lines changed or deleted 5 lines changed or added


 vecall.cc   vecall.cc 
/* /*
* $Id: vecall.cc,v 1.1.1.1 2000/06/19 12:26:12 tveldhui Exp $ * $Id: vecall.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecall.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECALL_CC #ifndef BZ_VECALL_CC
#define BZ_VECALL_CC #define BZ_VECALL_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/vecall.cc> must be included via <blitz/vecglobs.h> #error <blitz/vecall.cc> must be included via <blitz/vecglobs.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr> template<typename P_expr>
inline _bz_bool _bz_vec_all(P_expr vector) inline bool _bz_vec_all(P_expr vector)
{ {
int length = vector._bz_suggestLength(); int length = vector._bz_suggestLength();
if (vector._bz_hasFastAccess()) if (vector._bz_hasFastAccess())
{ {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
if (!vector._bz_fastAccess(i)) if (!vector._bz_fastAccess(i))
return _bz_false; return false;
} }
else { else {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
if (!vector[i]) if (!vector[i])
return _bz_false; return false;
} }
return _bz_true; return true;
} }
template<class P_numtype> template<typename P_numtype>
inline _bz_bool all(const Vector<P_numtype>& x) inline bool all(const Vector<P_numtype>& x)
{ {
return _bz_vec_all(x._bz_asVecExpr()); return _bz_vec_all(x._bz_asVecExpr());
} }
template<class P_expr> template<typename P_expr>
inline _bz_bool all(_bz_VecExpr<P_expr> expr) inline bool all(_bz_VecExpr<P_expr> expr)
{ {
return _bz_vec_all(expr); return _bz_vec_all(expr);
} }
template<class P_numtype> template<typename P_numtype>
inline _bz_bool all(const VectorPick<P_numtype>& x) inline bool all(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_all(x._bz_asVecExpr()); return _bz_vec_all(x._bz_asVecExpr());
} }
template<class P_numtype, int N_dimensions> template<typename P_numtype, int N_dimensions>
inline _bz_bool all(const TinyVector<P_numtype, N_dimensions>& x) inline bool all(const TinyVector<P_numtype, N_dimensions>& x)
{ {
return _bz_vec_all(x._bz_asVecExpr()); return _bz_vec_all(x._bz_asVecExpr());
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECALL_CC #endif // BZ_VECALL_CC
 End of changes. 10 change blocks. 
27 lines changed or deleted 14 lines changed or added


 vecany.cc   vecany.cc 
/* /*
* $Id: vecany.cc,v 1.1.1.1 2000/06/19 12:26:12 tveldhui Exp $ * $Id: vecany.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecany.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECANY_CC #ifndef BZ_VECANY_CC
#define BZ_VECANY_CC #define BZ_VECANY_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/vecany.cc> must be included via <blitz/vecglobs.h> #error <blitz/vecany.cc> must be included via <blitz/vecglobs.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr> template<typename P_expr>
inline _bz_bool _bz_vec_any(P_expr vector) inline bool _bz_vec_any(P_expr vector)
{ {
int length = vector._bz_suggestLength(); int length = vector._bz_suggestLength();
if (vector._bz_hasFastAccess()) if (vector._bz_hasFastAccess())
{ {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
if (vector._bz_fastAccess(i)) if (vector._bz_fastAccess(i))
return _bz_true; return true;
} }
else { else {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
if (vector[i]) if (vector[i])
return _bz_true; return true;
} }
return _bz_false; return false;
} }
template<class P_numtype> template<typename P_numtype>
inline _bz_bool any(const Vector<P_numtype>& x) inline bool any(const Vector<P_numtype>& x)
{ {
return _bz_vec_any(x._bz_asVecExpr()); return _bz_vec_any(x._bz_asVecExpr());
} }
template<class P_expr> template<typename P_expr>
inline _bz_bool any(_bz_VecExpr<P_expr> expr) inline bool any(_bz_VecExpr<P_expr> expr)
{ {
return _bz_vec_any(expr); return _bz_vec_any(expr);
} }
template<class P_numtype> template<typename P_numtype>
inline _bz_bool any(const VectorPick<P_numtype>& x) inline bool any(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_any(x._bz_asVecExpr()); return _bz_vec_any(x._bz_asVecExpr());
} }
template<class P_numtype, int N_dimensions> template<typename P_numtype, int N_dimensions>
inline _bz_bool any(const TinyVector<P_numtype, N_dimensions>& x) inline bool any(const TinyVector<P_numtype, N_dimensions>& x)
{ {
return _bz_vec_any(x._bz_asVecExpr()); return _bz_vec_any(x._bz_asVecExpr());
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECANY_CC #endif // BZ_VECANY_CC
 End of changes. 10 change blocks. 
27 lines changed or deleted 14 lines changed or added


 vecassign.h   vecassign.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/meta/vecassign.h TinyVector assignment metaprogram * blitz/meta/vecassign.h TinyVector assignment metaprogram
* *
* $Id: vecassign.h,v 1.2 2001/01/24 20:22:51 tveldhui Exp $ * $Id: vecassign.h,v 1.6 2005/05/07 04:17:57 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: vecassign.h,v $
* Revision 1.2 2001/01/24 20:22:51 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:13 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:08:44 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_META_VECASSIGN_H #ifndef BZ_META_VECASSIGN_H
#define BZ_META_VECASSIGN_H #define BZ_META_VECASSIGN_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<int N, int I> template<int N, int I>
class _bz_meta_vecAssign { class _bz_meta_vecAssign {
public: public:
enum { loopFlag = (I < N-1) ? 1 : 0 }; static const int loopFlag = (I < N-1) ? 1 : 0;
template<class T_vector, class T_expr, class T_updater> template<typename T_vector, typename T_expr, typename T_updater>
static inline void fastAssign(T_vector& vec, T_expr expr, T_updater u) static inline void fastAssign(T_vector& vec, T_expr expr, T_updater u)
{ {
u.update(vec[I], expr._bz_fastAccess(I)); u.update(vec[I], expr._bz_fastAccess(I));
_bz_meta_vecAssign<N * loopFlag, (I+1) * loopFlag> _bz_meta_vecAssign<N * loopFlag, (I+1) * loopFlag>
::fastAssign(vec,expr,u); ::fastAssign(vec,expr,u);
} }
template<class T_vector, class T_expr, class T_updater> template<typename T_vector, typename T_expr, typename T_updater>
static inline void assign(T_vector& vec, T_expr expr, T_updater u) static inline void assign(T_vector& vec, T_expr expr, T_updater u)
{ {
u.update(vec[I], expr[I]); u.update(vec[I], expr[I]);
_bz_meta_vecAssign<N * loopFlag, (I+1) * loopFlag> _bz_meta_vecAssign<N * loopFlag, (I+1) * loopFlag>
::assign(vec,expr,u); ::assign(vec,expr,u);
} }
template<class T_vector, class T_numtype, class T_updater> template<typename T_vector, typename T_numtype, typename T_updater>
static inline void assignWithArgs(T_vector& vec, T_updater u, static inline void assignWithArgs(T_vector& vec, T_updater u,
T_numtype x0, T_numtype x1=0, T_numtype x2=0, T_numtype x3=0, T_numtype x0, T_numtype x1=0, T_numtype x2=0, T_numtype x3=0,
T_numtype x4=0, T_numtype x5=0, T_numtype x6=0, T_numtype x7=0, T_numtype x4=0, T_numtype x5=0, T_numtype x6=0, T_numtype x7=0,
T_numtype x8=0, T_numtype x9=0) T_numtype x8=0, T_numtype x9=0)
{ {
u.update(vec[I], x0); u.update(vec[I], x0);
_bz_meta_vecAssign<N * loopFlag, (I+1) * loopFlag> _bz_meta_vecAssign<N * loopFlag, (I+1) * loopFlag>
::assignWithArgs(vec, u, x1, x2, x3, x4, x5, x6, x7, x8, x9); ::assignWithArgs(vec, u, x1, x2, x3, x4, x5, x6, x7, x8, x9);
} }
}; };
template<> template<>
class _bz_meta_vecAssign<0,0> { class _bz_meta_vecAssign<0,0> {
public: public:
template<class T_vector, class T_expr, class T_updater> template<typename T_vector, typename T_expr, typename T_updater>
static inline void fastAssign(T_vector& vec, T_expr expr, T_updater u) static inline void fastAssign(T_vector&, T_expr, T_updater)
{ } { }
template<class T_vector, class T_expr, class T_updater> template<typename T_vector, typename T_expr, typename T_updater>
static inline void assign(T_vector& vec, T_expr expr, T_updater u) static inline void assign(T_vector&, T_expr, T_updater)
{ } { }
template<class T_vector, class T_numtype, class T_updater> template<typename T_vector, typename T_numtype, typename T_updater>
static inline void assignWithArgs(T_vector& vec, T_updater u, static inline void assignWithArgs(T_vector&, T_updater,
T_numtype x0, T_numtype x1=0, T_numtype x2=0, T_numtype x3=0, T_numtype, T_numtype =0, T_numtype =0, T_numtype =0,
T_numtype x4=0, T_numtype x5=0, T_numtype x6=0, T_numtype x7=0, T_numtype =0, T_numtype =0, T_numtype =0, T_numtype =0,
T_numtype x8=0, T_numtype x9=0) T_numtype =0, T_numtype =0)
{ {
} }
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_META_ASSIGN_H #endif // BZ_META_ASSIGN_H
 End of changes. 10 change blocks. 
30 lines changed or deleted 17 lines changed or added


 vecbfn.cc   vecbfn.cc 
#ifndef BZ_VECBFN_H /**************************************************************************
#define BZ_VECBFN_H *
* blitz/../vecbfn.cc Vector expression binary functions (2 operands)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Suggestions: blitz-suggest@cybervision.com
* Bugs: blitz-bugs@cybervision.com
*
* For more information, please see the Blitz++ Home Page:
* http://seurat.uwaterloo.ca/blitz/
*
**************************************************************************
*
*
*/
// Generated source file. Do not edit.
// genvecbfn.cpp Oct 6 2005 15:58:50
#ifndef BZ_VECBFN_CC
#define BZ_VECBFN_CC
#ifndef BZ_VECEXPR_H #ifndef BZ_VECEXPR_H
#error <blitz/vecbfn.h> must be included via <blitz/vecexpr.h> #error <blitz/vecbfn.cc> must be included via <blitz/vecexpr.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Math functions with 2 operands have not yet been implemented. /**************************************************************************
**
* Minimum Operators
**************************************************************************
**/
// Vector<P_numtype1> min Vector<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2 > > >
min(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// Vector<P_numtype1> min _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Min<P_numtype1, typename P_expr2::T_numtype > > >
min(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Min<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// Vector<P_numtype1> min VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2 > > >
min(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// Vector<P_numtype1> min Range
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range,
_bz_Min<P_numtype1, int > > >
min(const Vector<P_numtype1>& d1,
Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range,
_bz_Min<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// Vector<P_numtype1> min TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<P_numtype1, P_numtype2 > > >
min(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// Vector<P_numtype1> min int
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>,
_bz_Min<P_numtype1, int > > >
min(const Vector<P_numtype1>& d1,
int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>,
_bz_Min<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2)));
}
// Vector<P_numtype1> min float
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>,
_bz_Min<P_numtype1, float > > >
min(const Vector<P_numtype1>& d1,
float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>,
_bz_Min<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2)));
}
// Vector<P_numtype1> min double
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>,
_bz_Min<P_numtype1, double > > >
min(const Vector<P_numtype1>& d1,
double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>,
_bz_Min<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2)));
}
// Vector<P_numtype1> min long double
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>,
_bz_Min<P_numtype1, long double > > >
min(const Vector<P_numtype1>& d1,
long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>,
_bz_Min<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> min complex<T2>
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Min<P_numtype1, complex<T2> > > >
min(const Vector<P_numtype1>& d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Min<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> min Vector<P_numtype2>
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>,
_bz_Min<typename P_expr1::T_numtype, P_numtype2 > > >
min(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>,
_bz_Min<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// _bz_VecExpr<P_expr1> min _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>,
_bz_Min<typename P_expr1::T_numtype, typename P_expr2::T_numtype > >
>
min(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>,
_bz_Min<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T
_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2));
}
// _bz_VecExpr<P_expr1> min VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>,
_bz_Min<typename P_expr1::T_numtype, P_numtype2 > > >
min(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>,
_bz_Min<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// _bz_VecExpr<P_expr1> min Range
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range,
_bz_Min<typename P_expr1::T_numtype, int > > >
min(_bz_VecExpr<P_expr1> d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range,
_bz_Min<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2));
}
// _bz_VecExpr<P_expr1> min TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<typename P_expr1::T_numtype, P_numtype2 > > >
min(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// _bz_VecExpr<P_expr1> min int
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>,
_bz_Min<typename P_expr1::T_numtype, int > > >
min(_bz_VecExpr<P_expr1> d1,
int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>,
_bz_Min<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2)));
}
// _bz_VecExpr<P_expr1> min float
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>,
_bz_Min<typename P_expr1::T_numtype, float > > >
min(_bz_VecExpr<P_expr1> d1,
float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>,
_bz_Min<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2)));
}
// _bz_VecExpr<P_expr1> min double
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>,
_bz_Min<typename P_expr1::T_numtype, double > > >
min(_bz_VecExpr<P_expr1> d1,
double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>,
_bz_Min<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2)));
}
// _bz_VecExpr<P_expr1> min long double
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>,
_bz_Min<typename P_expr1::T_numtype, long double > > >
min(_bz_VecExpr<P_expr1> d1,
long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>,
_bz_Min<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> min complex<T2>
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Min<typename P_expr1::T_numtype, complex<T2> > > >
min(_bz_VecExpr<P_expr1> d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Min<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> min Vector<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2 > > >
min(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// VectorPick<P_numtype1> min _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Min<P_numtype1, typename P_expr2::T_numtype > > >
min(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Min<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// VectorPick<P_numtype1> min VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2 > > >
min(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// VectorPick<P_numtype1> min Range
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range,
_bz_Min<P_numtype1, int > > >
min(const VectorPick<P_numtype1>& d1,
Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range,
_bz_Min<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// VectorPick<P_numtype1> min TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<P_numtype1, P_numtype2 > > >
min(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// VectorPick<P_numtype1> min int
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>,
_bz_Min<P_numtype1, int > > >
min(const VectorPick<P_numtype1>& d1,
int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>,
_bz_Min<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2)));
}
// VectorPick<P_numtype1> min float
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>,
_bz_Min<P_numtype1, float > > >
min(const VectorPick<P_numtype1>& d1,
float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>,
_bz_Min<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2)));
}
// VectorPick<P_numtype1> min double
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>,
_bz_Min<P_numtype1, double > > >
min(const VectorPick<P_numtype1>& d1,
double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>,
_bz_Min<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2)));
}
// VectorPick<P_numtype1> min long double
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>,
_bz_Min<P_numtype1, long double > > >
min(const VectorPick<P_numtype1>& d1,
long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>,
_bz_Min<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> min complex<T2>
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Min<P_numtype1, complex<T2> > > >
min(const VectorPick<P_numtype1>& d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Min<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// Range min Vector<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>,
_bz_Min<int, P_numtype2 > > >
min(Range d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>,
_bz_Min<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// Range min _bz_VecExpr<P_expr2>
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>,
_bz_Min<int, typename P_expr2::T_numtype > > >
min(Range d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>,
_bz_Min<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2));
}
// Range min VectorPick<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>,
_bz_Min<int, P_numtype2 > > >
min(Range d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>,
_bz_Min<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// Range min Range
inline
_bz_VecExpr<_bz_VecExprOp<Range,
Range,
_bz_Min<int, int > > >
min(Range d1,
Range d2)
{
typedef _bz_VecExprOp<Range,
Range,
_bz_Min<int, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2));
}
// Range min TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<int, P_numtype2 > > >
min(Range d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// Range min float
inline
_bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>,
_bz_Min<int, float > > >
min(Range d1,
float d2)
{
typedef _bz_VecExprOp<Range,
_bz_VecExprConstant<float>,
_bz_Min<int, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2)));
}
// Range min double
inline
_bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<double>,
_bz_Min<int, double > > >
min(Range d1,
double d2)
{
typedef _bz_VecExprOp<Range,
_bz_VecExprConstant<double>,
_bz_Min<int, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2)));
}
// Range min long double
inline
_bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<long double>,
_bz_Min<int, long double > > >
min(Range d1,
long double d2)
{
typedef _bz_VecExprOp<Range,
_bz_VecExprConstant<long double>,
_bz_Min<int, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// Range min complex<T2>
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<complex<T2> > ,
_bz_Min<int, complex<T2> > > >
min(Range d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<Range,
_bz_VecExprConstant<complex<T2> > ,
_bz_Min<int, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> min Vector<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2 > > >
min(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// TinyVector<P_numtype1, N_length1> min _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>,
_bz_Min<P_numtype1, typename P_expr2::T_numtype > > >
min(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>,
_bz_Min<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// TinyVector<P_numtype1, N_length1> min VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2 > > >
min(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>,
_bz_Min<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// TinyVector<P_numtype1, N_length1> min Range
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range,
_bz_Min<P_numtype1, int > > >
min(const TinyVector<P_numtype1, N_length1>& d1,
Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range,
_bz_Min<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// TinyVector<P_numtype1, N_length1> min TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<P_numtype1, P_numtype2 > > >
min(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// TinyVector<P_numtype1, N_length1> min int
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>,
_bz_Min<P_numtype1, int > > >
min(const TinyVector<P_numtype1, N_length1>& d1,
int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>,
_bz_Min<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2)));
}
// TinyVector<P_numtype1, N_length1> min float
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>,
_bz_Min<P_numtype1, float > > >
min(const TinyVector<P_numtype1, N_length1>& d1,
float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>,
_bz_Min<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2)));
}
// TinyVector<P_numtype1, N_length1> min double
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>,
_bz_Min<P_numtype1, double > > >
min(const TinyVector<P_numtype1, N_length1>& d1,
double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>,
_bz_Min<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2)));
}
// TinyVector<P_numtype1, N_length1> min long double
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>,
_bz_Min<P_numtype1, long double > > >
min(const TinyVector<P_numtype1, N_length1>& d1,
long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>,
_bz_Min<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> min complex<T2>
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Min<P_numtype1, complex<T2> > > >
min(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Min<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// int min Vector<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>,
_bz_Min<int, P_numtype2 > > >
min(int d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>,
_bz_Min<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.beginFast()));
}
// int min _bz_VecExpr<P_expr2>
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>,
_bz_Min<int, typename P_expr2::T_numtype > > >
min(int d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>,
_bz_Min<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2));
}
// int min VectorPick<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>,
_bz_Min<int, P_numtype2 > > >
min(int d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>,
_bz_Min<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.beginFast()));
}
// int min TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<int, P_numtype2 > > >
min(int d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.beginFast()));
}
// float min Vector<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>,
_bz_Min<float, P_numtype2 > > >
min(float d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>,
_bz_Min<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.beginFast()));
}
// float min _bz_VecExpr<P_expr2>
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>,
_bz_Min<float, typename P_expr2::T_numtype > > >
min(float d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>,
_bz_Min<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2));
}
// float min VectorPick<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>,
_bz_Min<float, P_numtype2 > > >
min(float d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>,
_bz_Min<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.beginFast()));
}
// float min Range
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range,
_bz_Min<float, int > > >
min(float d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
Range,
_bz_Min<float, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2));
}
// float min TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<float, P_numtype2 > > >
min(float d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.beginFast()));
}
// double min Vector<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>,
_bz_Min<double, P_numtype2 > > >
min(double d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>,
_bz_Min<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.beginFast()));
}
// double min _bz_VecExpr<P_expr2>
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>,
_bz_Min<double, typename P_expr2::T_numtype > > >
min(double d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>,
_bz_Min<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2));
}
// double min VectorPick<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>,
_bz_Min<double, P_numtype2 > > >
min(double d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>,
_bz_Min<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.beginFast()));
}
// double min Range
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range,
_bz_Min<double, int > > >
min(double d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
Range,
_bz_Min<double, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2));
}
// double min TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<double, P_numtype2 > > >
min(double d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.beginFast()));
}
// long double min Vector<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>,
_bz_Min<long double, P_numtype2 > > >
min(long double d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>,
_bz_Min<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
// long double min _bz_VecExpr<P_expr2>
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>,
_bz_Min<long double, typename P_expr2::T_numtype > > >
min(long double d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>,
_bz_Min<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
// long double min VectorPick<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>,
_bz_Min<long double, P_numtype2 > > >
min(long double d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>,
_bz_Min<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
// long double min Range
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range,
_bz_Min<long double, int > > >
min(long double d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
Range,
_bz_Min<long double, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
// long double min TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<long double, P_numtype2 > > >
min(long double d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
#ifdef BZ_HAVE_COMPLEX
// complex<T1> min Vector<P_numtype2>
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>,
_bz_Min<complex<T1> , P_numtype2 > > >
min(complex<T1> d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>,
_bz_Min<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
),
d2.beginFast()));
}
#endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX
// complex<T1> min _bz_VecExpr<P_expr2>
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>,
_bz_Min<complex<T1> , typename P_expr2::T_numtype > > >
min(complex<T1> d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>,
_bz_Min<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
),
d2));
}
#endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX
// complex<T1> min VectorPick<P_numtype2>
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>,
_bz_Min<complex<T1> , P_numtype2 > > >
min(complex<T1> d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>,
_bz_Min<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
),
d2.beginFast()));
}
#endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX
// complex<T1> min Range
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range,
_bz_Min<complex<T1> , int > > >
min(complex<T1> d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range,
_bz_Min<complex<T1> , int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
),
d2));
}
#endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX
// complex<T1> min TinyVector<P_numtype2, N_length2>
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<complex<T1> , P_numtype2 > > >
min(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Min<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
),
d2.beginFast()));
}
#endif // BZ_HAVE_COMPLEX
/**************************************************************************
**
* Maximum Operators
**************************************************************************
**/
// Vector<P_numtype1> max Vector<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2 > > >
max(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// Vector<P_numtype1> max _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Max<P_numtype1, typename P_expr2::T_numtype > > >
max(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Max<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// Vector<P_numtype1> max VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2 > > >
max(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// Vector<P_numtype1> max Range
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range,
_bz_Max<P_numtype1, int > > >
max(const Vector<P_numtype1>& d1,
Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range,
_bz_Max<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// Vector<P_numtype1> max TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<P_numtype1, P_numtype2 > > >
max(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// Vector<P_numtype1> max int
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>,
_bz_Max<P_numtype1, int > > >
max(const Vector<P_numtype1>& d1,
int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>,
_bz_Max<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2)));
}
// Vector<P_numtype1> max float
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>,
_bz_Max<P_numtype1, float > > >
max(const Vector<P_numtype1>& d1,
float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>,
_bz_Max<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2)));
}
// Vector<P_numtype1> max double
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>,
_bz_Max<P_numtype1, double > > >
max(const Vector<P_numtype1>& d1,
double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>,
_bz_Max<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2)));
}
// Vector<P_numtype1> max long double
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>,
_bz_Max<P_numtype1, long double > > >
max(const Vector<P_numtype1>& d1,
long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>,
_bz_Max<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> max complex<T2>
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Max<P_numtype1, complex<T2> > > >
max(const Vector<P_numtype1>& d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Max<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> max Vector<P_numtype2>
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>,
_bz_Max<typename P_expr1::T_numtype, P_numtype2 > > >
max(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>,
_bz_Max<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// _bz_VecExpr<P_expr1> max _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>,
_bz_Max<typename P_expr1::T_numtype, typename P_expr2::T_numtype > >
>
max(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>,
_bz_Max<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T
_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2));
}
// _bz_VecExpr<P_expr1> max VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>,
_bz_Max<typename P_expr1::T_numtype, P_numtype2 > > >
max(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>,
_bz_Max<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// _bz_VecExpr<P_expr1> max Range
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range,
_bz_Max<typename P_expr1::T_numtype, int > > >
max(_bz_VecExpr<P_expr1> d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range,
_bz_Max<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2));
}
// _bz_VecExpr<P_expr1> max TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<typename P_expr1::T_numtype, P_numtype2 > > >
max(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// _bz_VecExpr<P_expr1> max int
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>,
_bz_Max<typename P_expr1::T_numtype, int > > >
max(_bz_VecExpr<P_expr1> d1,
int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>,
_bz_Max<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2)));
}
// _bz_VecExpr<P_expr1> max float
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>,
_bz_Max<typename P_expr1::T_numtype, float > > >
max(_bz_VecExpr<P_expr1> d1,
float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>,
_bz_Max<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2)));
}
// _bz_VecExpr<P_expr1> max double
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>,
_bz_Max<typename P_expr1::T_numtype, double > > >
max(_bz_VecExpr<P_expr1> d1,
double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>,
_bz_Max<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2)));
}
// _bz_VecExpr<P_expr1> max long double
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>,
_bz_Max<typename P_expr1::T_numtype, long double > > >
max(_bz_VecExpr<P_expr1> d1,
long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>,
_bz_Max<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> max complex<T2>
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Max<typename P_expr1::T_numtype, complex<T2> > > >
max(_bz_VecExpr<P_expr1> d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Max<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> max Vector<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2 > > >
max(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// VectorPick<P_numtype1> max _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Max<P_numtype1, typename P_expr2::T_numtype > > >
max(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Max<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// VectorPick<P_numtype1> max VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2 > > >
max(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// VectorPick<P_numtype1> max Range
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range,
_bz_Max<P_numtype1, int > > >
max(const VectorPick<P_numtype1>& d1,
Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range,
_bz_Max<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// VectorPick<P_numtype1> max TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<P_numtype1, P_numtype2 > > >
max(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// VectorPick<P_numtype1> max int
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>,
_bz_Max<P_numtype1, int > > >
max(const VectorPick<P_numtype1>& d1,
int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>,
_bz_Max<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2)));
}
// VectorPick<P_numtype1> max float
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>,
_bz_Max<P_numtype1, float > > >
max(const VectorPick<P_numtype1>& d1,
float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>,
_bz_Max<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2)));
}
// VectorPick<P_numtype1> max double
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>,
_bz_Max<P_numtype1, double > > >
max(const VectorPick<P_numtype1>& d1,
double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>,
_bz_Max<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2)));
}
// VectorPick<P_numtype1> max long double
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>,
_bz_Max<P_numtype1, long double > > >
max(const VectorPick<P_numtype1>& d1,
long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>,
_bz_Max<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> max complex<T2>
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Max<P_numtype1, complex<T2> > > >
max(const VectorPick<P_numtype1>& d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Max<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// Range max Vector<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>,
_bz_Max<int, P_numtype2 > > >
max(Range d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>,
_bz_Max<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// Range max _bz_VecExpr<P_expr2>
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>,
_bz_Max<int, typename P_expr2::T_numtype > > >
max(Range d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>,
_bz_Max<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2));
}
// Range max VectorPick<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>,
_bz_Max<int, P_numtype2 > > >
max(Range d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>,
_bz_Max<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// Range max Range
inline
_bz_VecExpr<_bz_VecExprOp<Range,
Range,
_bz_Max<int, int > > >
max(Range d1,
Range d2)
{
typedef _bz_VecExprOp<Range,
Range,
_bz_Max<int, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2));
}
// Range max TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<int, P_numtype2 > > >
max(Range d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.beginFast()));
}
// Range max float
inline
_bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>,
_bz_Max<int, float > > >
max(Range d1,
float d2)
{
typedef _bz_VecExprOp<Range,
_bz_VecExprConstant<float>,
_bz_Max<int, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2)));
}
// Range max double
inline
_bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<double>,
_bz_Max<int, double > > >
max(Range d1,
double d2)
{
typedef _bz_VecExprOp<Range,
_bz_VecExprConstant<double>,
_bz_Max<int, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2)));
}
// Range max long double
inline
_bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<long double>,
_bz_Max<int, long double > > >
max(Range d1,
long double d2)
{
typedef _bz_VecExprOp<Range,
_bz_VecExprConstant<long double>,
_bz_Max<int, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// Range max complex<T2>
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<complex<T2> > ,
_bz_Max<int, complex<T2> > > >
max(Range d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<Range,
_bz_VecExprConstant<complex<T2> > ,
_bz_Max<int, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> max Vector<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2 > > >
max(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// TinyVector<P_numtype1, N_length1> max _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>,
_bz_Max<P_numtype1, typename P_expr2::T_numtype > > >
max(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>,
_bz_Max<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// TinyVector<P_numtype1, N_length1> max VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2 > > >
max(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>,
_bz_Max<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// TinyVector<P_numtype1, N_length1> max Range
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range,
_bz_Max<P_numtype1, int > > >
max(const TinyVector<P_numtype1, N_length1>& d1,
Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range,
_bz_Max<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2));
}
// TinyVector<P_numtype1, N_length1> max TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<P_numtype1, P_numtype2 > > >
max(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.beginFast()));
}
// TinyVector<P_numtype1, N_length1> max int
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>,
_bz_Max<P_numtype1, int > > >
max(const TinyVector<P_numtype1, N_length1>& d1,
int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>,
_bz_Max<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2)));
}
// TinyVector<P_numtype1, N_length1> max float
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>,
_bz_Max<P_numtype1, float > > >
max(const TinyVector<P_numtype1, N_length1>& d1,
float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>,
_bz_Max<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2)));
}
// TinyVector<P_numtype1, N_length1> max double
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>,
_bz_Max<P_numtype1, double > > >
max(const TinyVector<P_numtype1, N_length1>& d1,
double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>,
_bz_Max<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2)));
}
// TinyVector<P_numtype1, N_length1> max long double
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>,
_bz_Max<P_numtype1, long double > > >
max(const TinyVector<P_numtype1, N_length1>& d1,
long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>,
_bz_Max<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> max complex<T2>
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Max<P_numtype1, complex<T2> > > >
max(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Max<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// int max Vector<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>,
_bz_Max<int, P_numtype2 > > >
max(int d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>,
_bz_Max<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.beginFast()));
}
// int max _bz_VecExpr<P_expr2>
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>,
_bz_Max<int, typename P_expr2::T_numtype > > >
max(int d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>,
_bz_Max<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2));
}
// int max VectorPick<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>,
_bz_Max<int, P_numtype2 > > >
max(int d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>,
_bz_Max<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.beginFast()));
}
// int max TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<int, P_numtype2 > > >
max(int d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.beginFast()));
}
// float max Vector<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>,
_bz_Max<float, P_numtype2 > > >
max(float d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>,
_bz_Max<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.beginFast()));
}
// float max _bz_VecExpr<P_expr2>
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>,
_bz_Max<float, typename P_expr2::T_numtype > > >
max(float d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>,
_bz_Max<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2));
}
// float max VectorPick<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>,
_bz_Max<float, P_numtype2 > > >
max(float d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>,
_bz_Max<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.beginFast()));
}
// float max Range
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range,
_bz_Max<float, int > > >
max(float d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
Range,
_bz_Max<float, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2));
}
// float max TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<float, P_numtype2 > > >
max(float d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.beginFast()));
}
// double max Vector<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>,
_bz_Max<double, P_numtype2 > > >
max(double d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>,
_bz_Max<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.beginFast()));
}
// double max _bz_VecExpr<P_expr2>
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>,
_bz_Max<double, typename P_expr2::T_numtype > > >
max(double d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>,
_bz_Max<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2));
}
// double max VectorPick<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>,
_bz_Max<double, P_numtype2 > > >
max(double d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>,
_bz_Max<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.beginFast()));
}
// double max Range
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range,
_bz_Max<double, int > > >
max(double d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
Range,
_bz_Max<double, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2));
}
// double max TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<double, P_numtype2 > > >
max(double d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.beginFast()));
}
// long double max Vector<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>,
_bz_Max<long double, P_numtype2 > > >
max(long double d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>,
_bz_Max<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
// long double max _bz_VecExpr<P_expr2>
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>,
_bz_Max<long double, typename P_expr2::T_numtype > > >
max(long double d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>,
_bz_Max<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
// long double max VectorPick<P_numtype2>
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>,
_bz_Max<long double, P_numtype2 > > >
max(long double d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>,
_bz_Max<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
// long double max Range
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range,
_bz_Max<long double, int > > >
max(long double d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
Range,
_bz_Max<long double, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
// long double max TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<long double, P_numtype2 > > >
max(long double d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
#ifdef BZ_HAVE_COMPLEX
// complex<T1> max Vector<P_numtype2>
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>,
_bz_Max<complex<T1> , P_numtype2 > > >
max(complex<T1> d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>,
_bz_Max<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
),
d2.beginFast()));
}
#endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX
// complex<T1> max _bz_VecExpr<P_expr2>
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>,
_bz_Max<complex<T1> , typename P_expr2::T_numtype > > >
max(complex<T1> d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>,
_bz_Max<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
),
d2));
}
#endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX
// complex<T1> max VectorPick<P_numtype2>
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>,
_bz_Max<complex<T1> , P_numtype2 > > >
max(complex<T1> d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>,
_bz_Max<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
),
d2.beginFast()));
}
#endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX
// complex<T1> max Range
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range,
_bz_Max<complex<T1> , int > > >
max(complex<T1> d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range,
_bz_Max<complex<T1> , int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
),
d2));
}
#endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX
// complex<T1> max TinyVector<P_numtype2, N_length2>
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<complex<T1> , P_numtype2 > > >
max(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Max<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
),
d2.beginFast()));
}
#endif // BZ_HAVE_COMPLEX
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif #endif
 End of changes. 3 change blocks. 
4 lines changed or deleted 2586 lines changed or added


 vecbops.cc   vecbops.cc 
/************************************************************************** * /************************************************************************** *
* blitz/vecbops.cc Vector expression templates (2 operands) * blitz/../vecbops.cc Vector expression templates (2 operands)
* *
* $Id: vecbops.cc,v 1.1.1.1 2000/06/19 12:26:10 tveldhui Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * This program is distributed in the hope that it will be useful,
* All rights reserved. Please see <blitz/blitz.h> for terms and * but WITHOUT ANY WARRANTY; without even the implied warranty of
* conditions of use. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-suggest@cybervision.com
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@cybervision.com
* Licensing inquiries: blitz-licenses@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://seurat.uwaterloo.ca/blitz/
* *
************************************************************************** * ************************************************************************** *
* $Log: vecbops.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
* *
*/ */
// Generated source file. Do not edit. // Generated source file. Do not edit.
// genvecbops.cpp Aug 7 1997 15:15:07 // genvecbops.cpp Oct 6 2005 15:58:48
#ifndef BZ_VECBOPS_CC #ifndef BZ_VECBOPS_CC
#define BZ_VECBOPS_CC #define BZ_VECBOPS_CC
#ifndef BZ_VECEXPR_H #ifndef BZ_VECEXPR_H
#error <blitz/vecbops.cc> must be included via <blitz/vecexpr.h> #error <blitz/vecbops.cc> must be included via <blitz/vecexpr.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
skipping to change at line 56 skipping to change at line 53
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2 > > > _bz_Add<P_numtype1, P_numtype2 > > >
operator+(const Vector<P_numtype1>& d1, operator+(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2> > T_expr; _bz_Add<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> + _bz_VecExpr<P_expr2> // Vector<P_numtype1> + _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Add<P_numtype1, typename P_expr2::T_numtype > > >
operator+(const Vector<P_numtype1>& d1, operator+(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> + VectorPick<P_numtype2> // Vector<P_numtype1> + VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2 > > > _bz_Add<P_numtype1, P_numtype2 > > >
operator+(const Vector<P_numtype1>& d1, operator+(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2> > T_expr; _bz_Add<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> + Range // Vector<P_numtype1> + Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Add<P_numtype1, int > > > _bz_Add<P_numtype1, int > > >
operator+(const Vector<P_numtype1>& d1, operator+(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Add<P_numtype1, int> > T_expr; _bz_Add<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> + TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> + TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<P_numtype1, P_numtype2 > > > _bz_Add<P_numtype1, P_numtype2 > > >
operator+(const Vector<P_numtype1>& d1, operator+(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<P_numtype1, P_numtype2> > T_expr; _bz_Add<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> + int // Vector<P_numtype1> + int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Add<P_numtype1, int > > > _bz_Add<P_numtype1, int > > >
operator+(const Vector<P_numtype1>& d1, operator+(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Add<P_numtype1, int> > T_expr; _bz_Add<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Vector<P_numtype1> + float // Vector<P_numtype1> + float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Add<P_numtype1, float > > > _bz_Add<P_numtype1, float > > >
operator+(const Vector<P_numtype1>& d1, operator+(const Vector<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Add<P_numtype1, float> > T_expr; _bz_Add<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// Vector<P_numtype1> + double // Vector<P_numtype1> + double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Add<P_numtype1, double > > > _bz_Add<P_numtype1, double > > >
operator+(const Vector<P_numtype1>& d1, operator+(const Vector<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Add<P_numtype1, double> > T_expr; _bz_Add<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// Vector<P_numtype1> + long double // Vector<P_numtype1> + long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Add<P_numtype1, long double > > > _bz_Add<P_numtype1, long double > > >
operator+(const Vector<P_numtype1>& d1, operator+(const Vector<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Add<P_numtype1, long double> > T_expr; _bz_Add<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> + complex<T2> // Vector<P_numtype1> + complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Add<P_numtype1, complex<T2> > > > _bz_Add<P_numtype1, complex<T2> > > >
operator+(const Vector<P_numtype1>& d1, operator+(const Vector<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Add<P_numtype1, complex<T2> > > T_expr; _bz_Add<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> + Vector<P_numtype2> // _bz_VecExpr<P_expr1> + Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Add<typename P_expr1::T_numtype, P_numtype2 > > >
operator+(_bz_VecExpr<P_expr1> d1, operator+(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Add<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> + _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> + _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numt ype > > > _bz_Add<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator+(_bz_VecExpr<P_expr1> d1, operator+(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numt ype> > T_expr; _bz_Add<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T _expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> + VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> + VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Add<typename P_expr1::T_numtype, P_numtype2 > > >
operator+(_bz_VecExpr<P_expr1> d1, operator+(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Add<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> + Range // _bz_VecExpr<P_expr1> + Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Add<_bz_typename P_expr1::T_numtype, int > > > _bz_Add<typename P_expr1::T_numtype, int > > >
operator+(_bz_VecExpr<P_expr1> d1, operator+(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Add<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Add<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> + TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> + TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Add<typename P_expr1::T_numtype, P_numtype2 > > >
operator+(_bz_VecExpr<P_expr1> d1, operator+(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Add<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> + int // _bz_VecExpr<P_expr1> + int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Add<_bz_typename P_expr1::T_numtype, int > > > _bz_Add<typename P_expr1::T_numtype, int > > >
operator+(_bz_VecExpr<P_expr1> d1, operator+(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Add<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Add<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> + float // _bz_VecExpr<P_expr1> + float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Add<_bz_typename P_expr1::T_numtype, float > > > _bz_Add<typename P_expr1::T_numtype, float > > >
operator+(_bz_VecExpr<P_expr1> d1, operator+(_bz_VecExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Add<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Add<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// _bz_VecExpr<P_expr1> + double // _bz_VecExpr<P_expr1> + double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Add<_bz_typename P_expr1::T_numtype, double > > > _bz_Add<typename P_expr1::T_numtype, double > > >
operator+(_bz_VecExpr<P_expr1> d1, operator+(_bz_VecExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Add<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Add<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// _bz_VecExpr<P_expr1> + long double // _bz_VecExpr<P_expr1> + long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Add<_bz_typename P_expr1::T_numtype, long double > > > _bz_Add<typename P_expr1::T_numtype, long double > > >
operator+(_bz_VecExpr<P_expr1> d1, operator+(_bz_VecExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Add<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Add<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> + complex<T2> // _bz_VecExpr<P_expr1> + complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Add<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Add<typename P_expr1::T_numtype, complex<T2> > > >
operator+(_bz_VecExpr<P_expr1> d1, operator+(_bz_VecExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Add<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Add<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> + Vector<P_numtype2> // VectorPick<P_numtype1> + Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2 > > > _bz_Add<P_numtype1, P_numtype2 > > >
operator+(const VectorPick<P_numtype1>& d1, operator+(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2> > T_expr; _bz_Add<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> + _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> + _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Add<P_numtype1, typename P_expr2::T_numtype > > >
operator+(const VectorPick<P_numtype1>& d1, operator+(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> + VectorPick<P_numtype2> // VectorPick<P_numtype1> + VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2 > > > _bz_Add<P_numtype1, P_numtype2 > > >
operator+(const VectorPick<P_numtype1>& d1, operator+(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2> > T_expr; _bz_Add<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> + Range // VectorPick<P_numtype1> + Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Add<P_numtype1, int > > > _bz_Add<P_numtype1, int > > >
operator+(const VectorPick<P_numtype1>& d1, operator+(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Add<P_numtype1, int> > T_expr; _bz_Add<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> + TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> + TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<P_numtype1, P_numtype2 > > > _bz_Add<P_numtype1, P_numtype2 > > >
operator+(const VectorPick<P_numtype1>& d1, operator+(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<P_numtype1, P_numtype2> > T_expr; _bz_Add<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> + int // VectorPick<P_numtype1> + int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Add<P_numtype1, int > > > _bz_Add<P_numtype1, int > > >
operator+(const VectorPick<P_numtype1>& d1, operator+(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Add<P_numtype1, int> > T_expr; _bz_Add<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> + float // VectorPick<P_numtype1> + float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Add<P_numtype1, float > > > _bz_Add<P_numtype1, float > > >
operator+(const VectorPick<P_numtype1>& d1, operator+(const VectorPick<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Add<P_numtype1, float> > T_expr; _bz_Add<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// VectorPick<P_numtype1> + double // VectorPick<P_numtype1> + double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Add<P_numtype1, double > > > _bz_Add<P_numtype1, double > > >
operator+(const VectorPick<P_numtype1>& d1, operator+(const VectorPick<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Add<P_numtype1, double> > T_expr; _bz_Add<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// VectorPick<P_numtype1> + long double // VectorPick<P_numtype1> + long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Add<P_numtype1, long double > > > _bz_Add<P_numtype1, long double > > >
operator+(const VectorPick<P_numtype1>& d1, operator+(const VectorPick<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Add<P_numtype1, long double> > T_expr; _bz_Add<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> + complex<T2> // VectorPick<P_numtype1> + complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Add<P_numtype1, complex<T2> > > > _bz_Add<P_numtype1, complex<T2> > > >
operator+(const VectorPick<P_numtype1>& d1, operator+(const VectorPick<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Add<P_numtype1, complex<T2> > > T_expr; _bz_Add<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// Range + Vector<P_numtype2> // Range + Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<int, P_numtype2 > > > _bz_Add<int, P_numtype2 > > >
operator+(Range d1, operator+(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<int, P_numtype2> > T_expr; _bz_Add<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range + _bz_VecExpr<P_expr2> // Range + _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<int, _bz_typename P_expr2::T_numtype > > > _bz_Add<int, typename P_expr2::T_numtype > > >
operator+(Range d1, operator+(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range + VectorPick<P_numtype2> // Range + VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<int, P_numtype2 > > > _bz_Add<int, P_numtype2 > > >
operator+(Range d1, operator+(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<int, P_numtype2> > T_expr; _bz_Add<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range + Range // Range + Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_Add<int, int > > > _bz_Add<int, int > > >
operator+(Range d1, operator+(Range d1,
Range d2) Range d2)
skipping to change at line 641 skipping to change at line 638
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<int, P_numtype2 > > > _bz_Add<int, P_numtype2 > > >
operator+(Range d1, operator+(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<int, P_numtype2> > T_expr; _bz_Add<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range + float // Range + float
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Add<int, float > > > _bz_Add<int, float > > >
operator+(Range d1, operator+(Range d1,
float d2) float d2)
skipping to change at line 727 skipping to change at line 724
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2 > > > _bz_Add<P_numtype1, P_numtype2 > > >
operator+(const TinyVector<P_numtype1, N_length1>& d1, operator+(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2> > T_expr; _bz_Add<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> + _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> + _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Add<P_numtype1, typename P_expr2::T_numtype > > >
operator+(const TinyVector<P_numtype1, N_length1>& d1, operator+(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> + VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> + VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2 > > > _bz_Add<P_numtype1, P_numtype2 > > >
operator+(const TinyVector<P_numtype1, N_length1>& d1, operator+(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<P_numtype1, P_numtype2> > T_expr; _bz_Add<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> + Range // TinyVector<P_numtype1, N_length1> + Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Add<P_numtype1, int > > > _bz_Add<P_numtype1, int > > >
operator+(const TinyVector<P_numtype1, N_length1>& d1, operator+(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Add<P_numtype1, int> > T_expr; _bz_Add<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> + TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> + TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<P_numtype1, P_numtype2 > > > _bz_Add<P_numtype1, P_numtype2 > > >
operator+(const TinyVector<P_numtype1, N_length1>& d1, operator+(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<P_numtype1, P_numtype2> > T_expr; _bz_Add<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> + int // TinyVector<P_numtype1, N_length1> + int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Add<P_numtype1, int > > > _bz_Add<P_numtype1, int > > >
operator+(const TinyVector<P_numtype1, N_length1>& d1, operator+(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Add<P_numtype1, int> > T_expr; _bz_Add<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// TinyVector<P_numtype1, N_length1> + float // TinyVector<P_numtype1, N_length1> + float
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Add<P_numtype1, float > > > _bz_Add<P_numtype1, float > > >
operator+(const TinyVector<P_numtype1, N_length1>& d1, operator+(const TinyVector<P_numtype1, N_length1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Add<P_numtype1, float> > T_expr; _bz_Add<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// TinyVector<P_numtype1, N_length1> + double // TinyVector<P_numtype1, N_length1> + double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Add<P_numtype1, double > > > _bz_Add<P_numtype1, double > > >
operator+(const TinyVector<P_numtype1, N_length1>& d1, operator+(const TinyVector<P_numtype1, N_length1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Add<P_numtype1, double> > T_expr; _bz_Add<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// TinyVector<P_numtype1, N_length1> + long double // TinyVector<P_numtype1, N_length1> + long double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Add<P_numtype1, long double > > > _bz_Add<P_numtype1, long double > > >
operator+(const TinyVector<P_numtype1, N_length1>& d1, operator+(const TinyVector<P_numtype1, N_length1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Add<P_numtype1, long double> > T_expr; _bz_Add<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> + complex<T2> // TinyVector<P_numtype1, N_length1> + complex<T2>
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Add<P_numtype1, complex<T2> > > > _bz_Add<P_numtype1, complex<T2> > > >
operator+(const TinyVector<P_numtype1, N_length1>& d1, operator+(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Add<P_numtype1, complex<T2> > > T_expr; _bz_Add<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int + Vector<P_numtype2> // int + Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<int, P_numtype2 > > > _bz_Add<int, P_numtype2 > > >
operator+(int d1, operator+(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<int, P_numtype2> > T_expr; _bz_Add<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int + _bz_VecExpr<P_expr2> // int + _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<int, _bz_typename P_expr2::T_numtype > > > _bz_Add<int, typename P_expr2::T_numtype > > >
operator+(int d1, operator+(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int + VectorPick<P_numtype2> // int + VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<int, P_numtype2 > > > _bz_Add<int, P_numtype2 > > >
operator+(int d1, operator+(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<int, P_numtype2> > T_expr; _bz_Add<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int + TinyVector<P_numtype2, N_length2> // int + TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<int, P_numtype2 > > > _bz_Add<int, P_numtype2 > > >
operator+(int d1, operator+(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<int, P_numtype2> > T_expr; _bz_Add<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// float + Vector<P_numtype2> // float + Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<float, P_numtype2 > > > _bz_Add<float, P_numtype2 > > >
operator+(float d1, operator+(float d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<float, P_numtype2> > T_expr; _bz_Add<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float + _bz_VecExpr<P_expr2> // float + _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<float, _bz_typename P_expr2::T_numtype > > > _bz_Add<float, typename P_expr2::T_numtype > > >
operator+(float d1, operator+(float d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2)); d2));
} }
// float + VectorPick<P_numtype2> // float + VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<float, P_numtype2 > > > _bz_Add<float, P_numtype2 > > >
operator+(float d1, operator+(float d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<float, P_numtype2> > T_expr; _bz_Add<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float + Range // float + Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range, Range,
_bz_Add<float, int > > > _bz_Add<float, int > > >
operator+(float d1, operator+(float d1,
Range d2) Range d2)
skipping to change at line 1036 skipping to change at line 1033
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<float, P_numtype2 > > > _bz_Add<float, P_numtype2 > > >
operator+(float d1, operator+(float d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<float, P_numtype2> > T_expr; _bz_Add<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// double + Vector<P_numtype2> // double + Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<double, P_numtype2 > > > _bz_Add<double, P_numtype2 > > >
operator+(double d1, operator+(double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<double, P_numtype2> > T_expr; _bz_Add<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double + _bz_VecExpr<P_expr2> // double + _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<double, _bz_typename P_expr2::T_numtype > > > _bz_Add<double, typename P_expr2::T_numtype > > >
operator+(double d1, operator+(double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2)); d2));
} }
// double + VectorPick<P_numtype2> // double + VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<double, P_numtype2 > > > _bz_Add<double, P_numtype2 > > >
operator+(double d1, operator+(double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<double, P_numtype2> > T_expr; _bz_Add<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double + Range // double + Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range, Range,
_bz_Add<double, int > > > _bz_Add<double, int > > >
operator+(double d1, operator+(double d1,
Range d2) Range d2)
skipping to change at line 1121 skipping to change at line 1118
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<double, P_numtype2 > > > _bz_Add<double, P_numtype2 > > >
operator+(double d1, operator+(double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<double, P_numtype2> > T_expr; _bz_Add<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double + Vector<P_numtype2> // long double + Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<long double, P_numtype2 > > > _bz_Add<long double, P_numtype2 > > >
operator+(long double d1, operator+(long double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<long double, P_numtype2> > T_expr; _bz_Add<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double + _bz_VecExpr<P_expr2> // long double + _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<long double, _bz_typename P_expr2::T_numtype > > > _bz_Add<long double, typename P_expr2::T_numtype > > >
operator+(long double d1, operator+(long double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2)); d2));
} }
// long double + VectorPick<P_numtype2> // long double + VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<long double, P_numtype2 > > > _bz_Add<long double, P_numtype2 > > >
operator+(long double d1, operator+(long double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<long double, P_numtype2> > T_expr; _bz_Add<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double + Range // long double + Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range, Range,
_bz_Add<long double, int > > > _bz_Add<long double, int > > >
operator+(long double d1, operator+(long double d1,
Range d2) Range d2)
skipping to change at line 1206 skipping to change at line 1203
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<long double, P_numtype2 > > > _bz_Add<long double, P_numtype2 > > >
operator+(long double d1, operator+(long double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<long double, P_numtype2> > T_expr; _bz_Add<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> + Vector<P_numtype2> // complex<T1> + Vector<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<complex<T1> , P_numtype2 > > > _bz_Add<complex<T1> , P_numtype2 > > >
operator+(complex<T1> d1, operator+(complex<T1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Add<complex<T1> , P_numtype2> > T_expr; _bz_Add<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> + _bz_VecExpr<P_expr2> // complex<T1> + _bz_VecExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Add<complex<T1> , typename P_expr2::T_numtype > > >
operator+(complex<T1> d1, operator+(complex<T1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Add<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Add<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> + VectorPick<P_numtype2> // complex<T1> + VectorPick<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
skipping to change at line 1264 skipping to change at line 1261
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<complex<T1> , P_numtype2 > > > _bz_Add<complex<T1> , P_numtype2 > > >
operator+(complex<T1> d1, operator+(complex<T1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Add<complex<T1> , P_numtype2> > T_expr; _bz_Add<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> + Range // complex<T1> + Range
template<class T1> template<class T1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range, Range,
skipping to change at line 1304 skipping to change at line 1301
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<complex<T1> , P_numtype2 > > > _bz_Add<complex<T1> , P_numtype2 > > >
operator+(complex<T1> d1, operator+(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<complex<T1> , P_numtype2> > T_expr; _bz_Add<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Subtraction Operators * Subtraction Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> - Vector<P_numtype2> // Vector<P_numtype1> - Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2 > > > _bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const Vector<P_numtype1>& d1, operator-(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr; _bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> - _bz_VecExpr<P_expr2> // Vector<P_numtype1> - _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<P_numtype1, typename P_expr2::T_numtype > > >
operator-(const Vector<P_numtype1>& d1, operator-(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> - VectorPick<P_numtype2> // Vector<P_numtype1> - VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2 > > > _bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const Vector<P_numtype1>& d1, operator-(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr; _bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> - Range // Vector<P_numtype1> - Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Subtract<P_numtype1, int > > > _bz_Subtract<P_numtype1, int > > >
operator-(const Vector<P_numtype1>& d1, operator-(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Subtract<P_numtype1, int> > T_expr; _bz_Subtract<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> - TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> - TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<P_numtype1, P_numtype2 > > > _bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const Vector<P_numtype1>& d1, operator-(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr; _bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> - int // Vector<P_numtype1> - int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Subtract<P_numtype1, int > > > _bz_Subtract<P_numtype1, int > > >
operator-(const Vector<P_numtype1>& d1, operator-(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Subtract<P_numtype1, int> > T_expr; _bz_Subtract<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Vector<P_numtype1> - float // Vector<P_numtype1> - float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Subtract<P_numtype1, float > > > _bz_Subtract<P_numtype1, float > > >
operator-(const Vector<P_numtype1>& d1, operator-(const Vector<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Subtract<P_numtype1, float> > T_expr; _bz_Subtract<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// Vector<P_numtype1> - double // Vector<P_numtype1> - double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Subtract<P_numtype1, double > > > _bz_Subtract<P_numtype1, double > > >
operator-(const Vector<P_numtype1>& d1, operator-(const Vector<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Subtract<P_numtype1, double> > T_expr; _bz_Subtract<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// Vector<P_numtype1> - long double // Vector<P_numtype1> - long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Subtract<P_numtype1, long double > > > _bz_Subtract<P_numtype1, long double > > >
operator-(const Vector<P_numtype1>& d1, operator-(const Vector<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Subtract<P_numtype1, long double> > T_expr; _bz_Subtract<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> - complex<T2> // Vector<P_numtype1> - complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<P_numtype1, complex<T2> > > > _bz_Subtract<P_numtype1, complex<T2> > > >
operator-(const Vector<P_numtype1>& d1, operator-(const Vector<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<P_numtype1, complex<T2> > > T_expr; _bz_Subtract<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> - Vector<P_numtype2> // _bz_VecExpr<P_expr1> - Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Subtract<typename P_expr1::T_numtype, P_numtype2 > > >
operator-(_bz_VecExpr<P_expr1> d1, operator-(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> - _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> - _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype > > > _bz_Subtract<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator-(_bz_VecExpr<P_expr1> d1, operator-(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> - VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> - VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Subtract<typename P_expr1::T_numtype, P_numtype2 > > >
operator-(_bz_VecExpr<P_expr1> d1, operator-(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> - Range // _bz_VecExpr<P_expr1> - Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Subtract<_bz_typename P_expr1::T_numtype, int > > > _bz_Subtract<typename P_expr1::T_numtype, int > > >
operator-(_bz_VecExpr<P_expr1> d1, operator-(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Subtract<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> - TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> - TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Subtract<typename P_expr1::T_numtype, P_numtype2 > > >
operator-(_bz_VecExpr<P_expr1> d1, operator-(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> - int // _bz_VecExpr<P_expr1> - int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, int > > > _bz_Subtract<typename P_expr1::T_numtype, int > > >
operator-(_bz_VecExpr<P_expr1> d1, operator-(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> - float // _bz_VecExpr<P_expr1> - float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, float > > > _bz_Subtract<typename P_expr1::T_numtype, float > > >
operator-(_bz_VecExpr<P_expr1> d1, operator-(_bz_VecExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// _bz_VecExpr<P_expr1> - double // _bz_VecExpr<P_expr1> - double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, double > > > _bz_Subtract<typename P_expr1::T_numtype, double > > >
operator-(_bz_VecExpr<P_expr1> d1, operator-(_bz_VecExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// _bz_VecExpr<P_expr1> - long double // _bz_VecExpr<P_expr1> - long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, long double > > > _bz_Subtract<typename P_expr1::T_numtype, long double > > >
operator-(_bz_VecExpr<P_expr1> d1, operator-(_bz_VecExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Subtract<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> - complex<T2> // _bz_VecExpr<P_expr1> - complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Subtract<typename P_expr1::T_numtype, complex<T2> > > >
operator-(_bz_VecExpr<P_expr1> d1, operator-(_bz_VecExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Subtract<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> - Vector<P_numtype2> // VectorPick<P_numtype1> - Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2 > > > _bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const VectorPick<P_numtype1>& d1, operator-(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr; _bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> - _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> - _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<P_numtype1, typename P_expr2::T_numtype > > >
operator-(const VectorPick<P_numtype1>& d1, operator-(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> - VectorPick<P_numtype2> // VectorPick<P_numtype1> - VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2 > > > _bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const VectorPick<P_numtype1>& d1, operator-(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr; _bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> - Range // VectorPick<P_numtype1> - Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Subtract<P_numtype1, int > > > _bz_Subtract<P_numtype1, int > > >
operator-(const VectorPick<P_numtype1>& d1, operator-(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Subtract<P_numtype1, int> > T_expr; _bz_Subtract<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> - TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> - TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<P_numtype1, P_numtype2 > > > _bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const VectorPick<P_numtype1>& d1, operator-(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr; _bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> - int // VectorPick<P_numtype1> - int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Subtract<P_numtype1, int > > > _bz_Subtract<P_numtype1, int > > >
operator-(const VectorPick<P_numtype1>& d1, operator-(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Subtract<P_numtype1, int> > T_expr; _bz_Subtract<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> - float // VectorPick<P_numtype1> - float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Subtract<P_numtype1, float > > > _bz_Subtract<P_numtype1, float > > >
operator-(const VectorPick<P_numtype1>& d1, operator-(const VectorPick<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Subtract<P_numtype1, float> > T_expr; _bz_Subtract<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// VectorPick<P_numtype1> - double // VectorPick<P_numtype1> - double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Subtract<P_numtype1, double > > > _bz_Subtract<P_numtype1, double > > >
operator-(const VectorPick<P_numtype1>& d1, operator-(const VectorPick<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Subtract<P_numtype1, double> > T_expr; _bz_Subtract<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// VectorPick<P_numtype1> - long double // VectorPick<P_numtype1> - long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Subtract<P_numtype1, long double > > > _bz_Subtract<P_numtype1, long double > > >
operator-(const VectorPick<P_numtype1>& d1, operator-(const VectorPick<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Subtract<P_numtype1, long double> > T_expr; _bz_Subtract<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> - complex<T2> // VectorPick<P_numtype1> - complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<P_numtype1, complex<T2> > > > _bz_Subtract<P_numtype1, complex<T2> > > >
operator-(const VectorPick<P_numtype1>& d1, operator-(const VectorPick<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<P_numtype1, complex<T2> > > T_expr; _bz_Subtract<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// Range - Vector<P_numtype2> // Range - Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<int, P_numtype2 > > > _bz_Subtract<int, P_numtype2 > > >
operator-(Range d1, operator-(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<int, P_numtype2> > T_expr; _bz_Subtract<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range - _bz_VecExpr<P_expr2> // Range - _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<int, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<int, typename P_expr2::T_numtype > > >
operator-(Range d1, operator-(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range - VectorPick<P_numtype2> // Range - VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<int, P_numtype2 > > > _bz_Subtract<int, P_numtype2 > > >
operator-(Range d1, operator-(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<int, P_numtype2> > T_expr; _bz_Subtract<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range - Range // Range - Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_Subtract<int, int > > > _bz_Subtract<int, int > > >
operator-(Range d1, operator-(Range d1,
Range d2) Range d2)
skipping to change at line 1910 skipping to change at line 1907
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<int, P_numtype2 > > > _bz_Subtract<int, P_numtype2 > > >
operator-(Range d1, operator-(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<int, P_numtype2> > T_expr; _bz_Subtract<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range - float // Range - float
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Subtract<int, float > > > _bz_Subtract<int, float > > >
operator-(Range d1, operator-(Range d1,
float d2) float d2)
skipping to change at line 1996 skipping to change at line 1993
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2 > > > _bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const TinyVector<P_numtype1, N_length1>& d1, operator-(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr; _bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> - _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> - _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<P_numtype1, typename P_expr2::T_numtype > > >
operator-(const TinyVector<P_numtype1, N_length1>& d1, operator-(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> - VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> - VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2 > > > _bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const TinyVector<P_numtype1, N_length1>& d1, operator-(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr; _bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> - Range // TinyVector<P_numtype1, N_length1> - Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Subtract<P_numtype1, int > > > _bz_Subtract<P_numtype1, int > > >
operator-(const TinyVector<P_numtype1, N_length1>& d1, operator-(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Subtract<P_numtype1, int> > T_expr; _bz_Subtract<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> - TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> - TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<P_numtype1, P_numtype2 > > > _bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const TinyVector<P_numtype1, N_length1>& d1, operator-(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr; _bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> - int // TinyVector<P_numtype1, N_length1> - int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Subtract<P_numtype1, int > > > _bz_Subtract<P_numtype1, int > > >
operator-(const TinyVector<P_numtype1, N_length1>& d1, operator-(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Subtract<P_numtype1, int> > T_expr; _bz_Subtract<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// TinyVector<P_numtype1, N_length1> - float // TinyVector<P_numtype1, N_length1> - float
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Subtract<P_numtype1, float > > > _bz_Subtract<P_numtype1, float > > >
operator-(const TinyVector<P_numtype1, N_length1>& d1, operator-(const TinyVector<P_numtype1, N_length1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Subtract<P_numtype1, float> > T_expr; _bz_Subtract<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// TinyVector<P_numtype1, N_length1> - double // TinyVector<P_numtype1, N_length1> - double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Subtract<P_numtype1, double > > > _bz_Subtract<P_numtype1, double > > >
operator-(const TinyVector<P_numtype1, N_length1>& d1, operator-(const TinyVector<P_numtype1, N_length1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Subtract<P_numtype1, double> > T_expr; _bz_Subtract<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// TinyVector<P_numtype1, N_length1> - long double // TinyVector<P_numtype1, N_length1> - long double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Subtract<P_numtype1, long double > > > _bz_Subtract<P_numtype1, long double > > >
operator-(const TinyVector<P_numtype1, N_length1>& d1, operator-(const TinyVector<P_numtype1, N_length1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Subtract<P_numtype1, long double> > T_expr; _bz_Subtract<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> - complex<T2> // TinyVector<P_numtype1, N_length1> - complex<T2>
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<P_numtype1, complex<T2> > > > _bz_Subtract<P_numtype1, complex<T2> > > >
operator-(const TinyVector<P_numtype1, N_length1>& d1, operator-(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<P_numtype1, complex<T2> > > T_expr; _bz_Subtract<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int - Vector<P_numtype2> // int - Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<int, P_numtype2 > > > _bz_Subtract<int, P_numtype2 > > >
operator-(int d1, operator-(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<int, P_numtype2> > T_expr; _bz_Subtract<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int - _bz_VecExpr<P_expr2> // int - _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<int, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<int, typename P_expr2::T_numtype > > >
operator-(int d1, operator-(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int - VectorPick<P_numtype2> // int - VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<int, P_numtype2 > > > _bz_Subtract<int, P_numtype2 > > >
operator-(int d1, operator-(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<int, P_numtype2> > T_expr; _bz_Subtract<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int - TinyVector<P_numtype2, N_length2> // int - TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<int, P_numtype2 > > > _bz_Subtract<int, P_numtype2 > > >
operator-(int d1, operator-(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<int, P_numtype2> > T_expr; _bz_Subtract<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// float - Vector<P_numtype2> // float - Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<float, P_numtype2 > > > _bz_Subtract<float, P_numtype2 > > >
operator-(float d1, operator-(float d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<float, P_numtype2> > T_expr; _bz_Subtract<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float - _bz_VecExpr<P_expr2> // float - _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<float, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<float, typename P_expr2::T_numtype > > >
operator-(float d1, operator-(float d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2)); d2));
} }
// float - VectorPick<P_numtype2> // float - VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<float, P_numtype2 > > > _bz_Subtract<float, P_numtype2 > > >
operator-(float d1, operator-(float d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<float, P_numtype2> > T_expr; _bz_Subtract<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float - Range // float - Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range, Range,
_bz_Subtract<float, int > > > _bz_Subtract<float, int > > >
operator-(float d1, operator-(float d1,
Range d2) Range d2)
skipping to change at line 2305 skipping to change at line 2302
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<float, P_numtype2 > > > _bz_Subtract<float, P_numtype2 > > >
operator-(float d1, operator-(float d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<float, P_numtype2> > T_expr; _bz_Subtract<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// double - Vector<P_numtype2> // double - Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<double, P_numtype2 > > > _bz_Subtract<double, P_numtype2 > > >
operator-(double d1, operator-(double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<double, P_numtype2> > T_expr; _bz_Subtract<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double - _bz_VecExpr<P_expr2> // double - _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<double, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<double, typename P_expr2::T_numtype > > >
operator-(double d1, operator-(double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2)); d2));
} }
// double - VectorPick<P_numtype2> // double - VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<double, P_numtype2 > > > _bz_Subtract<double, P_numtype2 > > >
operator-(double d1, operator-(double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<double, P_numtype2> > T_expr; _bz_Subtract<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double - Range // double - Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range, Range,
_bz_Subtract<double, int > > > _bz_Subtract<double, int > > >
operator-(double d1, operator-(double d1,
Range d2) Range d2)
skipping to change at line 2390 skipping to change at line 2387
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<double, P_numtype2 > > > _bz_Subtract<double, P_numtype2 > > >
operator-(double d1, operator-(double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<double, P_numtype2> > T_expr; _bz_Subtract<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double - Vector<P_numtype2> // long double - Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<long double, P_numtype2 > > > _bz_Subtract<long double, P_numtype2 > > >
operator-(long double d1, operator-(long double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<long double, P_numtype2> > T_expr; _bz_Subtract<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double - _bz_VecExpr<P_expr2> // long double - _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<long double, _bz_typename P_expr2::T_numtype > > > _bz_Subtract<long double, typename P_expr2::T_numtype > > >
operator-(long double d1, operator-(long double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2)); d2));
} }
// long double - VectorPick<P_numtype2> // long double - VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<long double, P_numtype2 > > > _bz_Subtract<long double, P_numtype2 > > >
operator-(long double d1, operator-(long double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<long double, P_numtype2> > T_expr; _bz_Subtract<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double - Range // long double - Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range, Range,
_bz_Subtract<long double, int > > > _bz_Subtract<long double, int > > >
operator-(long double d1, operator-(long double d1,
Range d2) Range d2)
skipping to change at line 2475 skipping to change at line 2472
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<long double, P_numtype2 > > > _bz_Subtract<long double, P_numtype2 > > >
operator-(long double d1, operator-(long double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<long double, P_numtype2> > T_expr; _bz_Subtract<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> - Vector<P_numtype2> // complex<T1> - Vector<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<complex<T1> , P_numtype2 > > > _bz_Subtract<complex<T1> , P_numtype2 > > >
operator-(complex<T1> d1, operator-(complex<T1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Subtract<complex<T1> , P_numtype2> > T_expr; _bz_Subtract<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> - _bz_VecExpr<P_expr2> // complex<T1> - _bz_VecExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Subtract<complex<T1> , typename P_expr2::T_numtype > > >
operator-(complex<T1> d1, operator-(complex<T1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Subtract<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Subtract<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> - VectorPick<P_numtype2> // complex<T1> - VectorPick<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
skipping to change at line 2533 skipping to change at line 2530
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<complex<T1> , P_numtype2 > > > _bz_Subtract<complex<T1> , P_numtype2 > > >
operator-(complex<T1> d1, operator-(complex<T1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Subtract<complex<T1> , P_numtype2> > T_expr; _bz_Subtract<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> - Range // complex<T1> - Range
template<class T1> template<class T1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range, Range,
skipping to change at line 2573 skipping to change at line 2570
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<complex<T1> , P_numtype2 > > > _bz_Subtract<complex<T1> , P_numtype2 > > >
operator-(complex<T1> d1, operator-(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<complex<T1> , P_numtype2> > T_expr; _bz_Subtract<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Multiplication Operators * Multiplication Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> * Vector<P_numtype2> // Vector<P_numtype1> * Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2 > > > _bz_Multiply<P_numtype1, P_numtype2 > > >
operator*(const Vector<P_numtype1>& d1, operator*(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2> > T_expr; _bz_Multiply<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> * _bz_VecExpr<P_expr2> // Vector<P_numtype1> * _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<P_numtype1, typename P_expr2::T_numtype > > >
operator*(const Vector<P_numtype1>& d1, operator*(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> * VectorPick<P_numtype2> // Vector<P_numtype1> * VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2 > > > _bz_Multiply<P_numtype1, P_numtype2 > > >
operator*(const Vector<P_numtype1>& d1, operator*(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2> > T_expr; _bz_Multiply<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> * Range // Vector<P_numtype1> * Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Multiply<P_numtype1, int > > > _bz_Multiply<P_numtype1, int > > >
operator*(const Vector<P_numtype1>& d1, operator*(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Multiply<P_numtype1, int> > T_expr; _bz_Multiply<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> * TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> * TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<P_numtype1, P_numtype2 > > > _bz_Multiply<P_numtype1, P_numtype2 > > >
operator*(const Vector<P_numtype1>& d1, operator*(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<P_numtype1, P_numtype2> > T_expr; _bz_Multiply<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> * int // Vector<P_numtype1> * int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Multiply<P_numtype1, int > > > _bz_Multiply<P_numtype1, int > > >
operator*(const Vector<P_numtype1>& d1, operator*(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Multiply<P_numtype1, int> > T_expr; _bz_Multiply<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Vector<P_numtype1> * float // Vector<P_numtype1> * float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Multiply<P_numtype1, float > > > _bz_Multiply<P_numtype1, float > > >
operator*(const Vector<P_numtype1>& d1, operator*(const Vector<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Multiply<P_numtype1, float> > T_expr; _bz_Multiply<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// Vector<P_numtype1> * double // Vector<P_numtype1> * double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Multiply<P_numtype1, double > > > _bz_Multiply<P_numtype1, double > > >
operator*(const Vector<P_numtype1>& d1, operator*(const Vector<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Multiply<P_numtype1, double> > T_expr; _bz_Multiply<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// Vector<P_numtype1> * long double // Vector<P_numtype1> * long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Multiply<P_numtype1, long double > > > _bz_Multiply<P_numtype1, long double > > >
operator*(const Vector<P_numtype1>& d1, operator*(const Vector<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Multiply<P_numtype1, long double> > T_expr; _bz_Multiply<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> * complex<T2> // Vector<P_numtype1> * complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Multiply<P_numtype1, complex<T2> > > > _bz_Multiply<P_numtype1, complex<T2> > > >
operator*(const Vector<P_numtype1>& d1, operator*(const Vector<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Multiply<P_numtype1, complex<T2> > > T_expr; _bz_Multiply<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> * Vector<P_numtype2> // _bz_VecExpr<P_expr1> * Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Multiply<typename P_expr1::T_numtype, P_numtype2 > > >
operator*(_bz_VecExpr<P_expr1> d1, operator*(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> * _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> * _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype > > > _bz_Multiply<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator*(_bz_VecExpr<P_expr1> d1, operator*(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> * VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> * VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Multiply<typename P_expr1::T_numtype, P_numtype2 > > >
operator*(_bz_VecExpr<P_expr1> d1, operator*(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> * Range // _bz_VecExpr<P_expr1> * Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Multiply<_bz_typename P_expr1::T_numtype, int > > > _bz_Multiply<typename P_expr1::T_numtype, int > > >
operator*(_bz_VecExpr<P_expr1> d1, operator*(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Multiply<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> * TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> * TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Multiply<typename P_expr1::T_numtype, P_numtype2 > > >
operator*(_bz_VecExpr<P_expr1> d1, operator*(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> * int // _bz_VecExpr<P_expr1> * int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, int > > > _bz_Multiply<typename P_expr1::T_numtype, int > > >
operator*(_bz_VecExpr<P_expr1> d1, operator*(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> * float // _bz_VecExpr<P_expr1> * float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, float > > > _bz_Multiply<typename P_expr1::T_numtype, float > > >
operator*(_bz_VecExpr<P_expr1> d1, operator*(_bz_VecExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// _bz_VecExpr<P_expr1> * double // _bz_VecExpr<P_expr1> * double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, double > > > _bz_Multiply<typename P_expr1::T_numtype, double > > >
operator*(_bz_VecExpr<P_expr1> d1, operator*(_bz_VecExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// _bz_VecExpr<P_expr1> * long double // _bz_VecExpr<P_expr1> * long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, long double > > > _bz_Multiply<typename P_expr1::T_numtype, long double > > >
operator*(_bz_VecExpr<P_expr1> d1, operator*(_bz_VecExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Multiply<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Multiply<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> * complex<T2> // _bz_VecExpr<P_expr1> * complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Multiply<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Multiply<typename P_expr1::T_numtype, complex<T2> > > >
operator*(_bz_VecExpr<P_expr1> d1, operator*(_bz_VecExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Multiply<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Multiply<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> * Vector<P_numtype2> // VectorPick<P_numtype1> * Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2 > > > _bz_Multiply<P_numtype1, P_numtype2 > > >
operator*(const VectorPick<P_numtype1>& d1, operator*(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2> > T_expr; _bz_Multiply<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> * _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> * _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<P_numtype1, typename P_expr2::T_numtype > > >
operator*(const VectorPick<P_numtype1>& d1, operator*(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> * VectorPick<P_numtype2> // VectorPick<P_numtype1> * VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2 > > > _bz_Multiply<P_numtype1, P_numtype2 > > >
operator*(const VectorPick<P_numtype1>& d1, operator*(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2> > T_expr; _bz_Multiply<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> * Range // VectorPick<P_numtype1> * Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Multiply<P_numtype1, int > > > _bz_Multiply<P_numtype1, int > > >
operator*(const VectorPick<P_numtype1>& d1, operator*(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Multiply<P_numtype1, int> > T_expr; _bz_Multiply<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> * TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> * TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<P_numtype1, P_numtype2 > > > _bz_Multiply<P_numtype1, P_numtype2 > > >
operator*(const VectorPick<P_numtype1>& d1, operator*(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<P_numtype1, P_numtype2> > T_expr; _bz_Multiply<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> * int // VectorPick<P_numtype1> * int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Multiply<P_numtype1, int > > > _bz_Multiply<P_numtype1, int > > >
operator*(const VectorPick<P_numtype1>& d1, operator*(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Multiply<P_numtype1, int> > T_expr; _bz_Multiply<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> * float // VectorPick<P_numtype1> * float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Multiply<P_numtype1, float > > > _bz_Multiply<P_numtype1, float > > >
operator*(const VectorPick<P_numtype1>& d1, operator*(const VectorPick<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Multiply<P_numtype1, float> > T_expr; _bz_Multiply<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// VectorPick<P_numtype1> * double // VectorPick<P_numtype1> * double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Multiply<P_numtype1, double > > > _bz_Multiply<P_numtype1, double > > >
operator*(const VectorPick<P_numtype1>& d1, operator*(const VectorPick<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Multiply<P_numtype1, double> > T_expr; _bz_Multiply<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// VectorPick<P_numtype1> * long double // VectorPick<P_numtype1> * long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Multiply<P_numtype1, long double > > > _bz_Multiply<P_numtype1, long double > > >
operator*(const VectorPick<P_numtype1>& d1, operator*(const VectorPick<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Multiply<P_numtype1, long double> > T_expr; _bz_Multiply<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> * complex<T2> // VectorPick<P_numtype1> * complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Multiply<P_numtype1, complex<T2> > > > _bz_Multiply<P_numtype1, complex<T2> > > >
operator*(const VectorPick<P_numtype1>& d1, operator*(const VectorPick<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Multiply<P_numtype1, complex<T2> > > T_expr; _bz_Multiply<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// Range * Vector<P_numtype2> // Range * Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<int, P_numtype2 > > > _bz_Multiply<int, P_numtype2 > > >
operator*(Range d1, operator*(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<int, P_numtype2> > T_expr; _bz_Multiply<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range * _bz_VecExpr<P_expr2> // Range * _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<int, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<int, typename P_expr2::T_numtype > > >
operator*(Range d1, operator*(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range * VectorPick<P_numtype2> // Range * VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<int, P_numtype2 > > > _bz_Multiply<int, P_numtype2 > > >
operator*(Range d1, operator*(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<int, P_numtype2> > T_expr; _bz_Multiply<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range * Range // Range * Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_Multiply<int, int > > > _bz_Multiply<int, int > > >
operator*(Range d1, operator*(Range d1,
Range d2) Range d2)
skipping to change at line 3179 skipping to change at line 3176
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<int, P_numtype2 > > > _bz_Multiply<int, P_numtype2 > > >
operator*(Range d1, operator*(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<int, P_numtype2> > T_expr; _bz_Multiply<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range * float // Range * float
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Multiply<int, float > > > _bz_Multiply<int, float > > >
operator*(Range d1, operator*(Range d1,
float d2) float d2)
skipping to change at line 3265 skipping to change at line 3262
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2 > > > _bz_Multiply<P_numtype1, P_numtype2 > > >
operator*(const TinyVector<P_numtype1, N_length1>& d1, operator*(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2> > T_expr; _bz_Multiply<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> * _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> * _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<P_numtype1, typename P_expr2::T_numtype > > >
operator*(const TinyVector<P_numtype1, N_length1>& d1, operator*(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> * VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> * VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2 > > > _bz_Multiply<P_numtype1, P_numtype2 > > >
operator*(const TinyVector<P_numtype1, N_length1>& d1, operator*(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<P_numtype1, P_numtype2> > T_expr; _bz_Multiply<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> * Range // TinyVector<P_numtype1, N_length1> * Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Multiply<P_numtype1, int > > > _bz_Multiply<P_numtype1, int > > >
operator*(const TinyVector<P_numtype1, N_length1>& d1, operator*(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Multiply<P_numtype1, int> > T_expr; _bz_Multiply<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> * TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> * TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<P_numtype1, P_numtype2 > > > _bz_Multiply<P_numtype1, P_numtype2 > > >
operator*(const TinyVector<P_numtype1, N_length1>& d1, operator*(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<P_numtype1, P_numtype2> > T_expr; _bz_Multiply<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> * int // TinyVector<P_numtype1, N_length1> * int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Multiply<P_numtype1, int > > > _bz_Multiply<P_numtype1, int > > >
operator*(const TinyVector<P_numtype1, N_length1>& d1, operator*(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Multiply<P_numtype1, int> > T_expr; _bz_Multiply<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// TinyVector<P_numtype1, N_length1> * float // TinyVector<P_numtype1, N_length1> * float
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Multiply<P_numtype1, float > > > _bz_Multiply<P_numtype1, float > > >
operator*(const TinyVector<P_numtype1, N_length1>& d1, operator*(const TinyVector<P_numtype1, N_length1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Multiply<P_numtype1, float> > T_expr; _bz_Multiply<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// TinyVector<P_numtype1, N_length1> * double // TinyVector<P_numtype1, N_length1> * double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Multiply<P_numtype1, double > > > _bz_Multiply<P_numtype1, double > > >
operator*(const TinyVector<P_numtype1, N_length1>& d1, operator*(const TinyVector<P_numtype1, N_length1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Multiply<P_numtype1, double> > T_expr; _bz_Multiply<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// TinyVector<P_numtype1, N_length1> * long double // TinyVector<P_numtype1, N_length1> * long double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Multiply<P_numtype1, long double > > > _bz_Multiply<P_numtype1, long double > > >
operator*(const TinyVector<P_numtype1, N_length1>& d1, operator*(const TinyVector<P_numtype1, N_length1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Multiply<P_numtype1, long double> > T_expr; _bz_Multiply<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> * complex<T2> // TinyVector<P_numtype1, N_length1> * complex<T2>
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Multiply<P_numtype1, complex<T2> > > > _bz_Multiply<P_numtype1, complex<T2> > > >
operator*(const TinyVector<P_numtype1, N_length1>& d1, operator*(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Multiply<P_numtype1, complex<T2> > > T_expr; _bz_Multiply<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int * Vector<P_numtype2> // int * Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<int, P_numtype2 > > > _bz_Multiply<int, P_numtype2 > > >
operator*(int d1, operator*(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<int, P_numtype2> > T_expr; _bz_Multiply<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int * _bz_VecExpr<P_expr2> // int * _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<int, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<int, typename P_expr2::T_numtype > > >
operator*(int d1, operator*(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int * VectorPick<P_numtype2> // int * VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<int, P_numtype2 > > > _bz_Multiply<int, P_numtype2 > > >
operator*(int d1, operator*(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<int, P_numtype2> > T_expr; _bz_Multiply<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int * TinyVector<P_numtype2, N_length2> // int * TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<int, P_numtype2 > > > _bz_Multiply<int, P_numtype2 > > >
operator*(int d1, operator*(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<int, P_numtype2> > T_expr; _bz_Multiply<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// float * Vector<P_numtype2> // float * Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<float, P_numtype2 > > > _bz_Multiply<float, P_numtype2 > > >
operator*(float d1, operator*(float d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<float, P_numtype2> > T_expr; _bz_Multiply<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float * _bz_VecExpr<P_expr2> // float * _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<float, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<float, typename P_expr2::T_numtype > > >
operator*(float d1, operator*(float d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2)); d2));
} }
// float * VectorPick<P_numtype2> // float * VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<float, P_numtype2 > > > _bz_Multiply<float, P_numtype2 > > >
operator*(float d1, operator*(float d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<float, P_numtype2> > T_expr; _bz_Multiply<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float * Range // float * Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range, Range,
_bz_Multiply<float, int > > > _bz_Multiply<float, int > > >
operator*(float d1, operator*(float d1,
Range d2) Range d2)
skipping to change at line 3574 skipping to change at line 3571
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<float, P_numtype2 > > > _bz_Multiply<float, P_numtype2 > > >
operator*(float d1, operator*(float d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<float, P_numtype2> > T_expr; _bz_Multiply<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// double * Vector<P_numtype2> // double * Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<double, P_numtype2 > > > _bz_Multiply<double, P_numtype2 > > >
operator*(double d1, operator*(double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<double, P_numtype2> > T_expr; _bz_Multiply<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double * _bz_VecExpr<P_expr2> // double * _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<double, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<double, typename P_expr2::T_numtype > > >
operator*(double d1, operator*(double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2)); d2));
} }
// double * VectorPick<P_numtype2> // double * VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<double, P_numtype2 > > > _bz_Multiply<double, P_numtype2 > > >
operator*(double d1, operator*(double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<double, P_numtype2> > T_expr; _bz_Multiply<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double * Range // double * Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range, Range,
_bz_Multiply<double, int > > > _bz_Multiply<double, int > > >
operator*(double d1, operator*(double d1,
Range d2) Range d2)
skipping to change at line 3659 skipping to change at line 3656
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<double, P_numtype2 > > > _bz_Multiply<double, P_numtype2 > > >
operator*(double d1, operator*(double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<double, P_numtype2> > T_expr; _bz_Multiply<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double * Vector<P_numtype2> // long double * Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<long double, P_numtype2 > > > _bz_Multiply<long double, P_numtype2 > > >
operator*(long double d1, operator*(long double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<long double, P_numtype2> > T_expr; _bz_Multiply<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double * _bz_VecExpr<P_expr2> // long double * _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<long double, _bz_typename P_expr2::T_numtype > > > _bz_Multiply<long double, typename P_expr2::T_numtype > > >
operator*(long double d1, operator*(long double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2)); d2));
} }
// long double * VectorPick<P_numtype2> // long double * VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<long double, P_numtype2 > > > _bz_Multiply<long double, P_numtype2 > > >
operator*(long double d1, operator*(long double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<long double, P_numtype2> > T_expr; _bz_Multiply<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double * Range // long double * Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range, Range,
_bz_Multiply<long double, int > > > _bz_Multiply<long double, int > > >
operator*(long double d1, operator*(long double d1,
Range d2) Range d2)
skipping to change at line 3744 skipping to change at line 3741
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<long double, P_numtype2 > > > _bz_Multiply<long double, P_numtype2 > > >
operator*(long double d1, operator*(long double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<long double, P_numtype2> > T_expr; _bz_Multiply<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> * Vector<P_numtype2> // complex<T1> * Vector<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<complex<T1> , P_numtype2 > > > _bz_Multiply<complex<T1> , P_numtype2 > > >
operator*(complex<T1> d1, operator*(complex<T1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Multiply<complex<T1> , P_numtype2> > T_expr; _bz_Multiply<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> * _bz_VecExpr<P_expr2> // complex<T1> * _bz_VecExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Multiply<complex<T1> , typename P_expr2::T_numtype > > >
operator*(complex<T1> d1, operator*(complex<T1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Multiply<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Multiply<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> * VectorPick<P_numtype2> // complex<T1> * VectorPick<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
skipping to change at line 3802 skipping to change at line 3799
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<complex<T1> , P_numtype2 > > > _bz_Multiply<complex<T1> , P_numtype2 > > >
operator*(complex<T1> d1, operator*(complex<T1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Multiply<complex<T1> , P_numtype2> > T_expr; _bz_Multiply<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> * Range // complex<T1> * Range
template<class T1> template<class T1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range, Range,
skipping to change at line 3842 skipping to change at line 3839
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<complex<T1> , P_numtype2 > > > _bz_Multiply<complex<T1> , P_numtype2 > > >
operator*(complex<T1> d1, operator*(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Multiply<complex<T1> , P_numtype2> > T_expr; _bz_Multiply<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Division Operators * Division Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> / Vector<P_numtype2> // Vector<P_numtype1> / Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2 > > > _bz_Divide<P_numtype1, P_numtype2 > > >
operator/(const Vector<P_numtype1>& d1, operator/(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2> > T_expr; _bz_Divide<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> / _bz_VecExpr<P_expr2> // Vector<P_numtype1> / _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Divide<P_numtype1, typename P_expr2::T_numtype > > >
operator/(const Vector<P_numtype1>& d1, operator/(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> / VectorPick<P_numtype2> // Vector<P_numtype1> / VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2 > > > _bz_Divide<P_numtype1, P_numtype2 > > >
operator/(const Vector<P_numtype1>& d1, operator/(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2> > T_expr; _bz_Divide<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> / Range // Vector<P_numtype1> / Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Divide<P_numtype1, int > > > _bz_Divide<P_numtype1, int > > >
operator/(const Vector<P_numtype1>& d1, operator/(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Divide<P_numtype1, int> > T_expr; _bz_Divide<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> / TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> / TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<P_numtype1, P_numtype2 > > > _bz_Divide<P_numtype1, P_numtype2 > > >
operator/(const Vector<P_numtype1>& d1, operator/(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<P_numtype1, P_numtype2> > T_expr; _bz_Divide<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> / int // Vector<P_numtype1> / int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Divide<P_numtype1, int > > > _bz_Divide<P_numtype1, int > > >
operator/(const Vector<P_numtype1>& d1, operator/(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Divide<P_numtype1, int> > T_expr; _bz_Divide<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Vector<P_numtype1> / float // Vector<P_numtype1> / float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Divide<P_numtype1, float > > > _bz_Divide<P_numtype1, float > > >
operator/(const Vector<P_numtype1>& d1, operator/(const Vector<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Divide<P_numtype1, float> > T_expr; _bz_Divide<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// Vector<P_numtype1> / double // Vector<P_numtype1> / double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Divide<P_numtype1, double > > > _bz_Divide<P_numtype1, double > > >
operator/(const Vector<P_numtype1>& d1, operator/(const Vector<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Divide<P_numtype1, double> > T_expr; _bz_Divide<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// Vector<P_numtype1> / long double // Vector<P_numtype1> / long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Divide<P_numtype1, long double > > > _bz_Divide<P_numtype1, long double > > >
operator/(const Vector<P_numtype1>& d1, operator/(const Vector<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Divide<P_numtype1, long double> > T_expr; _bz_Divide<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> / complex<T2> // Vector<P_numtype1> / complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Divide<P_numtype1, complex<T2> > > > _bz_Divide<P_numtype1, complex<T2> > > >
operator/(const Vector<P_numtype1>& d1, operator/(const Vector<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Divide<P_numtype1, complex<T2> > > T_expr; _bz_Divide<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> / Vector<P_numtype2> // _bz_VecExpr<P_expr1> / Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Divide<typename P_expr1::T_numtype, P_numtype2 > > >
operator/(_bz_VecExpr<P_expr1> d1, operator/(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Divide<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> / _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> / _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype > > > _bz_Divide<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator/(_bz_VecExpr<P_expr1> d1, operator/(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_n umtype> > T_expr; _bz_Divide<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> / VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> / VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Divide<typename P_expr1::T_numtype, P_numtype2 > > >
operator/(_bz_VecExpr<P_expr1> d1, operator/(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Divide<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> / Range // _bz_VecExpr<P_expr1> / Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Divide<_bz_typename P_expr1::T_numtype, int > > > _bz_Divide<typename P_expr1::T_numtype, int > > >
operator/(_bz_VecExpr<P_expr1> d1, operator/(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Divide<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Divide<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> / TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> / TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Divide<typename P_expr1::T_numtype, P_numtype2 > > >
operator/(_bz_VecExpr<P_expr1> d1, operator/(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Divide<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> / int // _bz_VecExpr<P_expr1> / int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Divide<_bz_typename P_expr1::T_numtype, int > > > _bz_Divide<typename P_expr1::T_numtype, int > > >
operator/(_bz_VecExpr<P_expr1> d1, operator/(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Divide<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Divide<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> / float // _bz_VecExpr<P_expr1> / float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Divide<_bz_typename P_expr1::T_numtype, float > > > _bz_Divide<typename P_expr1::T_numtype, float > > >
operator/(_bz_VecExpr<P_expr1> d1, operator/(_bz_VecExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Divide<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Divide<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// _bz_VecExpr<P_expr1> / double // _bz_VecExpr<P_expr1> / double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Divide<_bz_typename P_expr1::T_numtype, double > > > _bz_Divide<typename P_expr1::T_numtype, double > > >
operator/(_bz_VecExpr<P_expr1> d1, operator/(_bz_VecExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Divide<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Divide<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// _bz_VecExpr<P_expr1> / long double // _bz_VecExpr<P_expr1> / long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Divide<_bz_typename P_expr1::T_numtype, long double > > > _bz_Divide<typename P_expr1::T_numtype, long double > > >
operator/(_bz_VecExpr<P_expr1> d1, operator/(_bz_VecExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Divide<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Divide<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> / complex<T2> // _bz_VecExpr<P_expr1> / complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Divide<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Divide<typename P_expr1::T_numtype, complex<T2> > > >
operator/(_bz_VecExpr<P_expr1> d1, operator/(_bz_VecExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Divide<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Divide<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> / Vector<P_numtype2> // VectorPick<P_numtype1> / Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2 > > > _bz_Divide<P_numtype1, P_numtype2 > > >
operator/(const VectorPick<P_numtype1>& d1, operator/(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2> > T_expr; _bz_Divide<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> / _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> / _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Divide<P_numtype1, typename P_expr2::T_numtype > > >
operator/(const VectorPick<P_numtype1>& d1, operator/(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> / VectorPick<P_numtype2> // VectorPick<P_numtype1> / VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2 > > > _bz_Divide<P_numtype1, P_numtype2 > > >
operator/(const VectorPick<P_numtype1>& d1, operator/(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2> > T_expr; _bz_Divide<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> / Range // VectorPick<P_numtype1> / Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Divide<P_numtype1, int > > > _bz_Divide<P_numtype1, int > > >
operator/(const VectorPick<P_numtype1>& d1, operator/(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Divide<P_numtype1, int> > T_expr; _bz_Divide<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> / TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> / TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<P_numtype1, P_numtype2 > > > _bz_Divide<P_numtype1, P_numtype2 > > >
operator/(const VectorPick<P_numtype1>& d1, operator/(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<P_numtype1, P_numtype2> > T_expr; _bz_Divide<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> / int // VectorPick<P_numtype1> / int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Divide<P_numtype1, int > > > _bz_Divide<P_numtype1, int > > >
operator/(const VectorPick<P_numtype1>& d1, operator/(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Divide<P_numtype1, int> > T_expr; _bz_Divide<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> / float // VectorPick<P_numtype1> / float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Divide<P_numtype1, float > > > _bz_Divide<P_numtype1, float > > >
operator/(const VectorPick<P_numtype1>& d1, operator/(const VectorPick<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Divide<P_numtype1, float> > T_expr; _bz_Divide<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// VectorPick<P_numtype1> / double // VectorPick<P_numtype1> / double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Divide<P_numtype1, double > > > _bz_Divide<P_numtype1, double > > >
operator/(const VectorPick<P_numtype1>& d1, operator/(const VectorPick<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Divide<P_numtype1, double> > T_expr; _bz_Divide<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// VectorPick<P_numtype1> / long double // VectorPick<P_numtype1> / long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Divide<P_numtype1, long double > > > _bz_Divide<P_numtype1, long double > > >
operator/(const VectorPick<P_numtype1>& d1, operator/(const VectorPick<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Divide<P_numtype1, long double> > T_expr; _bz_Divide<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> / complex<T2> // VectorPick<P_numtype1> / complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Divide<P_numtype1, complex<T2> > > > _bz_Divide<P_numtype1, complex<T2> > > >
operator/(const VectorPick<P_numtype1>& d1, operator/(const VectorPick<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Divide<P_numtype1, complex<T2> > > T_expr; _bz_Divide<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// Range / Vector<P_numtype2> // Range / Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<int, P_numtype2 > > > _bz_Divide<int, P_numtype2 > > >
operator/(Range d1, operator/(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<int, P_numtype2> > T_expr; _bz_Divide<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range / _bz_VecExpr<P_expr2> // Range / _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<int, _bz_typename P_expr2::T_numtype > > > _bz_Divide<int, typename P_expr2::T_numtype > > >
operator/(Range d1, operator/(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range / VectorPick<P_numtype2> // Range / VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<int, P_numtype2 > > > _bz_Divide<int, P_numtype2 > > >
operator/(Range d1, operator/(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<int, P_numtype2> > T_expr; _bz_Divide<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range / Range // Range / Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_Divide<int, int > > > _bz_Divide<int, int > > >
operator/(Range d1, operator/(Range d1,
Range d2) Range d2)
skipping to change at line 4448 skipping to change at line 4445
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<int, P_numtype2 > > > _bz_Divide<int, P_numtype2 > > >
operator/(Range d1, operator/(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<int, P_numtype2> > T_expr; _bz_Divide<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range / float // Range / float
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Divide<int, float > > > _bz_Divide<int, float > > >
operator/(Range d1, operator/(Range d1,
float d2) float d2)
skipping to change at line 4534 skipping to change at line 4531
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2 > > > _bz_Divide<P_numtype1, P_numtype2 > > >
operator/(const TinyVector<P_numtype1, N_length1>& d1, operator/(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2> > T_expr; _bz_Divide<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> / _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> / _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Divide<P_numtype1, typename P_expr2::T_numtype > > >
operator/(const TinyVector<P_numtype1, N_length1>& d1, operator/(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> / VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> / VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2 > > > _bz_Divide<P_numtype1, P_numtype2 > > >
operator/(const TinyVector<P_numtype1, N_length1>& d1, operator/(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<P_numtype1, P_numtype2> > T_expr; _bz_Divide<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> / Range // TinyVector<P_numtype1, N_length1> / Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Divide<P_numtype1, int > > > _bz_Divide<P_numtype1, int > > >
operator/(const TinyVector<P_numtype1, N_length1>& d1, operator/(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Divide<P_numtype1, int> > T_expr; _bz_Divide<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> / TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> / TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<P_numtype1, P_numtype2 > > > _bz_Divide<P_numtype1, P_numtype2 > > >
operator/(const TinyVector<P_numtype1, N_length1>& d1, operator/(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<P_numtype1, P_numtype2> > T_expr; _bz_Divide<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> / int // TinyVector<P_numtype1, N_length1> / int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Divide<P_numtype1, int > > > _bz_Divide<P_numtype1, int > > >
operator/(const TinyVector<P_numtype1, N_length1>& d1, operator/(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Divide<P_numtype1, int> > T_expr; _bz_Divide<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// TinyVector<P_numtype1, N_length1> / float // TinyVector<P_numtype1, N_length1> / float
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Divide<P_numtype1, float > > > _bz_Divide<P_numtype1, float > > >
operator/(const TinyVector<P_numtype1, N_length1>& d1, operator/(const TinyVector<P_numtype1, N_length1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Divide<P_numtype1, float> > T_expr; _bz_Divide<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// TinyVector<P_numtype1, N_length1> / double // TinyVector<P_numtype1, N_length1> / double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Divide<P_numtype1, double > > > _bz_Divide<P_numtype1, double > > >
operator/(const TinyVector<P_numtype1, N_length1>& d1, operator/(const TinyVector<P_numtype1, N_length1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Divide<P_numtype1, double> > T_expr; _bz_Divide<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// TinyVector<P_numtype1, N_length1> / long double // TinyVector<P_numtype1, N_length1> / long double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Divide<P_numtype1, long double > > > _bz_Divide<P_numtype1, long double > > >
operator/(const TinyVector<P_numtype1, N_length1>& d1, operator/(const TinyVector<P_numtype1, N_length1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Divide<P_numtype1, long double> > T_expr; _bz_Divide<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> / complex<T2> // TinyVector<P_numtype1, N_length1> / complex<T2>
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Divide<P_numtype1, complex<T2> > > > _bz_Divide<P_numtype1, complex<T2> > > >
operator/(const TinyVector<P_numtype1, N_length1>& d1, operator/(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Divide<P_numtype1, complex<T2> > > T_expr; _bz_Divide<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int / Vector<P_numtype2> // int / Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<int, P_numtype2 > > > _bz_Divide<int, P_numtype2 > > >
operator/(int d1, operator/(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<int, P_numtype2> > T_expr; _bz_Divide<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int / _bz_VecExpr<P_expr2> // int / _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<int, _bz_typename P_expr2::T_numtype > > > _bz_Divide<int, typename P_expr2::T_numtype > > >
operator/(int d1, operator/(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int / VectorPick<P_numtype2> // int / VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<int, P_numtype2 > > > _bz_Divide<int, P_numtype2 > > >
operator/(int d1, operator/(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<int, P_numtype2> > T_expr; _bz_Divide<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int / TinyVector<P_numtype2, N_length2> // int / TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<int, P_numtype2 > > > _bz_Divide<int, P_numtype2 > > >
operator/(int d1, operator/(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<int, P_numtype2> > T_expr; _bz_Divide<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// float / Vector<P_numtype2> // float / Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<float, P_numtype2 > > > _bz_Divide<float, P_numtype2 > > >
operator/(float d1, operator/(float d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<float, P_numtype2> > T_expr; _bz_Divide<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float / _bz_VecExpr<P_expr2> // float / _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<float, _bz_typename P_expr2::T_numtype > > > _bz_Divide<float, typename P_expr2::T_numtype > > >
operator/(float d1, operator/(float d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2)); d2));
} }
// float / VectorPick<P_numtype2> // float / VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<float, P_numtype2 > > > _bz_Divide<float, P_numtype2 > > >
operator/(float d1, operator/(float d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<float, P_numtype2> > T_expr; _bz_Divide<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float / Range // float / Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range, Range,
_bz_Divide<float, int > > > _bz_Divide<float, int > > >
operator/(float d1, operator/(float d1,
Range d2) Range d2)
skipping to change at line 4843 skipping to change at line 4840
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<float, P_numtype2 > > > _bz_Divide<float, P_numtype2 > > >
operator/(float d1, operator/(float d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<float, P_numtype2> > T_expr; _bz_Divide<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// double / Vector<P_numtype2> // double / Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<double, P_numtype2 > > > _bz_Divide<double, P_numtype2 > > >
operator/(double d1, operator/(double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<double, P_numtype2> > T_expr; _bz_Divide<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double / _bz_VecExpr<P_expr2> // double / _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<double, _bz_typename P_expr2::T_numtype > > > _bz_Divide<double, typename P_expr2::T_numtype > > >
operator/(double d1, operator/(double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2)); d2));
} }
// double / VectorPick<P_numtype2> // double / VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<double, P_numtype2 > > > _bz_Divide<double, P_numtype2 > > >
operator/(double d1, operator/(double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<double, P_numtype2> > T_expr; _bz_Divide<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double / Range // double / Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range, Range,
_bz_Divide<double, int > > > _bz_Divide<double, int > > >
operator/(double d1, operator/(double d1,
Range d2) Range d2)
skipping to change at line 4928 skipping to change at line 4925
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<double, P_numtype2 > > > _bz_Divide<double, P_numtype2 > > >
operator/(double d1, operator/(double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<double, P_numtype2> > T_expr; _bz_Divide<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double / Vector<P_numtype2> // long double / Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<long double, P_numtype2 > > > _bz_Divide<long double, P_numtype2 > > >
operator/(long double d1, operator/(long double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<long double, P_numtype2> > T_expr; _bz_Divide<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double / _bz_VecExpr<P_expr2> // long double / _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<long double, _bz_typename P_expr2::T_numtype > > > _bz_Divide<long double, typename P_expr2::T_numtype > > >
operator/(long double d1, operator/(long double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2)); d2));
} }
// long double / VectorPick<P_numtype2> // long double / VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<long double, P_numtype2 > > > _bz_Divide<long double, P_numtype2 > > >
operator/(long double d1, operator/(long double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<long double, P_numtype2> > T_expr; _bz_Divide<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double / Range // long double / Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range, Range,
_bz_Divide<long double, int > > > _bz_Divide<long double, int > > >
operator/(long double d1, operator/(long double d1,
Range d2) Range d2)
skipping to change at line 5013 skipping to change at line 5010
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<long double, P_numtype2 > > > _bz_Divide<long double, P_numtype2 > > >
operator/(long double d1, operator/(long double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<long double, P_numtype2> > T_expr; _bz_Divide<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> / Vector<P_numtype2> // complex<T1> / Vector<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<complex<T1> , P_numtype2 > > > _bz_Divide<complex<T1> , P_numtype2 > > >
operator/(complex<T1> d1, operator/(complex<T1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Divide<complex<T1> , P_numtype2> > T_expr; _bz_Divide<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> / _bz_VecExpr<P_expr2> // complex<T1> / _bz_VecExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Divide<complex<T1> , typename P_expr2::T_numtype > > >
operator/(complex<T1> d1, operator/(complex<T1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Divide<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Divide<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> / VectorPick<P_numtype2> // complex<T1> / VectorPick<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
skipping to change at line 5071 skipping to change at line 5068
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<complex<T1> , P_numtype2 > > > _bz_Divide<complex<T1> , P_numtype2 > > >
operator/(complex<T1> d1, operator/(complex<T1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Divide<complex<T1> , P_numtype2> > T_expr; _bz_Divide<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> / Range // complex<T1> / Range
template<class T1> template<class T1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range, Range,
skipping to change at line 5111 skipping to change at line 5108
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<complex<T1> , P_numtype2 > > > _bz_Divide<complex<T1> , P_numtype2 > > >
operator/(complex<T1> d1, operator/(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Divide<complex<T1> , P_numtype2> > T_expr; _bz_Divide<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Modulus Operators * Modulus Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> % Vector<P_numtype2> // Vector<P_numtype1> % Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2 > > > _bz_Mod<P_numtype1, P_numtype2 > > >
operator%(const Vector<P_numtype1>& d1, operator%(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2> > T_expr; _bz_Mod<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> % _bz_VecExpr<P_expr2> // Vector<P_numtype1> % _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Mod<P_numtype1, typename P_expr2::T_numtype > > >
operator%(const Vector<P_numtype1>& d1, operator%(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Mod<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> % VectorPick<P_numtype2> // Vector<P_numtype1> % VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2 > > > _bz_Mod<P_numtype1, P_numtype2 > > >
operator%(const Vector<P_numtype1>& d1, operator%(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2> > T_expr; _bz_Mod<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> % Range // Vector<P_numtype1> % Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Mod<P_numtype1, int > > > _bz_Mod<P_numtype1, int > > >
operator%(const Vector<P_numtype1>& d1, operator%(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Mod<P_numtype1, int> > T_expr; _bz_Mod<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> % TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> % TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<P_numtype1, P_numtype2 > > > _bz_Mod<P_numtype1, P_numtype2 > > >
operator%(const Vector<P_numtype1>& d1, operator%(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<P_numtype1, P_numtype2> > T_expr; _bz_Mod<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> % int // Vector<P_numtype1> % int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Mod<P_numtype1, int > > > _bz_Mod<P_numtype1, int > > >
operator%(const Vector<P_numtype1>& d1, operator%(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Mod<P_numtype1, int> > T_expr; _bz_Mod<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> % Vector<P_numtype2> // _bz_VecExpr<P_expr1> % Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Mod<typename P_expr1::T_numtype, P_numtype2 > > >
operator%(_bz_VecExpr<P_expr1> d1, operator%(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Mod<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> % _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> % _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numt ype > > > _bz_Mod<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator%(_bz_VecExpr<P_expr1> d1, operator%(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numt ype> > T_expr; _bz_Mod<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T _expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> % VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> % VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Mod<typename P_expr1::T_numtype, P_numtype2 > > >
operator%(_bz_VecExpr<P_expr1> d1, operator%(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Mod<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> % Range // _bz_VecExpr<P_expr1> % Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Mod<_bz_typename P_expr1::T_numtype, int > > > _bz_Mod<typename P_expr1::T_numtype, int > > >
operator%(_bz_VecExpr<P_expr1> d1, operator%(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Mod<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Mod<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> % TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> % TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Mod<typename P_expr1::T_numtype, P_numtype2 > > >
operator%(_bz_VecExpr<P_expr1> d1, operator%(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Mod<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> % int // _bz_VecExpr<P_expr1> % int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Mod<_bz_typename P_expr1::T_numtype, int > > > _bz_Mod<typename P_expr1::T_numtype, int > > >
operator%(_bz_VecExpr<P_expr1> d1, operator%(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Mod<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Mod<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> % Vector<P_numtype2> // VectorPick<P_numtype1> % Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2 > > > _bz_Mod<P_numtype1, P_numtype2 > > >
operator%(const VectorPick<P_numtype1>& d1, operator%(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2> > T_expr; _bz_Mod<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> % _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> % _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Mod<P_numtype1, typename P_expr2::T_numtype > > >
operator%(const VectorPick<P_numtype1>& d1, operator%(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Mod<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> % VectorPick<P_numtype2> // VectorPick<P_numtype1> % VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2 > > > _bz_Mod<P_numtype1, P_numtype2 > > >
operator%(const VectorPick<P_numtype1>& d1, operator%(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2> > T_expr; _bz_Mod<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> % Range // VectorPick<P_numtype1> % Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Mod<P_numtype1, int > > > _bz_Mod<P_numtype1, int > > >
operator%(const VectorPick<P_numtype1>& d1, operator%(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Mod<P_numtype1, int> > T_expr; _bz_Mod<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> % TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> % TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<P_numtype1, P_numtype2 > > > _bz_Mod<P_numtype1, P_numtype2 > > >
operator%(const VectorPick<P_numtype1>& d1, operator%(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<P_numtype1, P_numtype2> > T_expr; _bz_Mod<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> % int // VectorPick<P_numtype1> % int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Mod<P_numtype1, int > > > _bz_Mod<P_numtype1, int > > >
operator%(const VectorPick<P_numtype1>& d1, operator%(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Mod<P_numtype1, int> > T_expr; _bz_Mod<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Range % Vector<P_numtype2> // Range % Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<int, P_numtype2 > > > _bz_Mod<int, P_numtype2 > > >
operator%(Range d1, operator%(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<int, P_numtype2> > T_expr; _bz_Mod<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range % _bz_VecExpr<P_expr2> // Range % _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<int, _bz_typename P_expr2::T_numtype > > > _bz_Mod<int, typename P_expr2::T_numtype > > >
operator%(Range d1, operator%(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Mod<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range % VectorPick<P_numtype2> // Range % VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<int, P_numtype2 > > > _bz_Mod<int, P_numtype2 > > >
operator%(Range d1, operator%(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<int, P_numtype2> > T_expr; _bz_Mod<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range % Range // Range % Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_Mod<int, int > > > _bz_Mod<int, int > > >
operator%(Range d1, operator%(Range d1,
Range d2) Range d2)
skipping to change at line 5507 skipping to change at line 5504
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<int, P_numtype2 > > > _bz_Mod<int, P_numtype2 > > >
operator%(Range d1, operator%(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<int, P_numtype2> > T_expr; _bz_Mod<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> % Vector<P_numtype2> // TinyVector<P_numtype1, N_length1> % Vector<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2 > > > _bz_Mod<P_numtype1, P_numtype2 > > >
operator%(const TinyVector<P_numtype1, N_length1>& d1, operator%(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2> > T_expr; _bz_Mod<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> % _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> % _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Mod<P_numtype1, typename P_expr2::T_numtype > > >
operator%(const TinyVector<P_numtype1, N_length1>& d1, operator%(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Mod<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> % VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> % VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2 > > > _bz_Mod<P_numtype1, P_numtype2 > > >
operator%(const TinyVector<P_numtype1, N_length1>& d1, operator%(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<P_numtype1, P_numtype2> > T_expr; _bz_Mod<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> % Range // TinyVector<P_numtype1, N_length1> % Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Mod<P_numtype1, int > > > _bz_Mod<P_numtype1, int > > >
operator%(const TinyVector<P_numtype1, N_length1>& d1, operator%(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Mod<P_numtype1, int> > T_expr; _bz_Mod<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> % TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> % TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<P_numtype1, P_numtype2 > > > _bz_Mod<P_numtype1, P_numtype2 > > >
operator%(const TinyVector<P_numtype1, N_length1>& d1, operator%(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<P_numtype1, P_numtype2> > T_expr; _bz_Mod<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> % int // TinyVector<P_numtype1, N_length1> % int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Mod<P_numtype1, int > > > _bz_Mod<P_numtype1, int > > >
operator%(const TinyVector<P_numtype1, N_length1>& d1, operator%(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Mod<P_numtype1, int> > T_expr; _bz_Mod<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// int % Vector<P_numtype2> // int % Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<int, P_numtype2 > > > _bz_Mod<int, P_numtype2 > > >
operator%(int d1, operator%(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Mod<int, P_numtype2> > T_expr; _bz_Mod<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int % _bz_VecExpr<P_expr2> // int % _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<int, _bz_typename P_expr2::T_numtype > > > _bz_Mod<int, typename P_expr2::T_numtype > > >
operator%(int d1, operator%(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Mod<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Mod<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int % VectorPick<P_numtype2> // int % VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<int, P_numtype2 > > > _bz_Mod<int, P_numtype2 > > >
operator%(int d1, operator%(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Mod<int, P_numtype2> > T_expr; _bz_Mod<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int % TinyVector<P_numtype2, N_length2> // int % TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<int, P_numtype2 > > > _bz_Mod<int, P_numtype2 > > >
operator%(int d1, operator%(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Mod<int, P_numtype2> > T_expr; _bz_Mod<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* Bitwise XOR Operators * Bitwise XOR Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> ^ Vector<P_numtype2> // Vector<P_numtype1> ^ Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2 > > > _bz_BitwiseXOR<P_numtype1, P_numtype2 > > >
operator^(const Vector<P_numtype1>& d1, operator^(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> ^ _bz_VecExpr<P_expr2> // Vector<P_numtype1> ^ _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseXOR<P_numtype1, typename P_expr2::T_numtype > > >
operator^(const Vector<P_numtype1>& d1, operator^(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseXOR<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> ^ VectorPick<P_numtype2> // Vector<P_numtype1> ^ VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2 > > > _bz_BitwiseXOR<P_numtype1, P_numtype2 > > >
operator^(const Vector<P_numtype1>& d1, operator^(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> ^ Range // Vector<P_numtype1> ^ Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseXOR<P_numtype1, int > > > _bz_BitwiseXOR<P_numtype1, int > > >
operator^(const Vector<P_numtype1>& d1, operator^(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseXOR<P_numtype1, int> > T_expr; _bz_BitwiseXOR<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> ^ TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> ^ TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2 > > > _bz_BitwiseXOR<P_numtype1, P_numtype2 > > >
operator^(const Vector<P_numtype1>& d1, operator^(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> ^ int // Vector<P_numtype1> ^ int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseXOR<P_numtype1, int > > > _bz_BitwiseXOR<P_numtype1, int > > >
operator^(const Vector<P_numtype1>& d1, operator^(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseXOR<P_numtype1, int> > T_expr; _bz_BitwiseXOR<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> ^ Vector<P_numtype2> // _bz_VecExpr<P_expr1> ^ Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseXOR<typename P_expr1::T_numtype, P_numtype2 > > >
operator^(_bz_VecExpr<P_expr1> d1, operator^(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseXOR<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> ^ _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> ^ _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype > > > _bz_BitwiseXOR<typename P_expr1::T_numtype, typename P_expr2::T_numty pe > > >
operator^(_bz_VecExpr<P_expr1> d1, operator^(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype> > T_expr; _bz_BitwiseXOR<typename P_expr1::T_numtype, typename P_expr2::T_numty pe> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> ^ VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> ^ VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseXOR<typename P_expr1::T_numtype, P_numtype2 > > >
operator^(_bz_VecExpr<P_expr1> d1, operator^(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseXOR<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> ^ Range // _bz_VecExpr<P_expr1> ^ Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, int > > > _bz_BitwiseXOR<typename P_expr1::T_numtype, int > > >
operator^(_bz_VecExpr<P_expr1> d1, operator^(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_BitwiseXOR<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> ^ TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> ^ TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseXOR<typename P_expr1::T_numtype, P_numtype2 > > >
operator^(_bz_VecExpr<P_expr1> d1, operator^(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseXOR<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> ^ int // _bz_VecExpr<P_expr1> ^ int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, int > > > _bz_BitwiseXOR<typename P_expr1::T_numtype, int > > >
operator^(_bz_VecExpr<P_expr1> d1, operator^(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseXOR<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_BitwiseXOR<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> ^ Vector<P_numtype2> // VectorPick<P_numtype1> ^ Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2 > > > _bz_BitwiseXOR<P_numtype1, P_numtype2 > > >
operator^(const VectorPick<P_numtype1>& d1, operator^(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> ^ _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> ^ _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseXOR<P_numtype1, typename P_expr2::T_numtype > > >
operator^(const VectorPick<P_numtype1>& d1, operator^(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseXOR<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> ^ VectorPick<P_numtype2> // VectorPick<P_numtype1> ^ VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2 > > > _bz_BitwiseXOR<P_numtype1, P_numtype2 > > >
operator^(const VectorPick<P_numtype1>& d1, operator^(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> ^ Range // VectorPick<P_numtype1> ^ Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseXOR<P_numtype1, int > > > _bz_BitwiseXOR<P_numtype1, int > > >
operator^(const VectorPick<P_numtype1>& d1, operator^(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseXOR<P_numtype1, int> > T_expr; _bz_BitwiseXOR<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> ^ TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> ^ TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2 > > > _bz_BitwiseXOR<P_numtype1, P_numtype2 > > >
operator^(const VectorPick<P_numtype1>& d1, operator^(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> ^ int // VectorPick<P_numtype1> ^ int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseXOR<P_numtype1, int > > > _bz_BitwiseXOR<P_numtype1, int > > >
operator^(const VectorPick<P_numtype1>& d1, operator^(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseXOR<P_numtype1, int> > T_expr; _bz_BitwiseXOR<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Range ^ Vector<P_numtype2> // Range ^ Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<int, P_numtype2 > > > _bz_BitwiseXOR<int, P_numtype2 > > >
operator^(Range d1, operator^(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<int, P_numtype2> > T_expr; _bz_BitwiseXOR<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range ^ _bz_VecExpr<P_expr2> // Range ^ _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<int, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseXOR<int, typename P_expr2::T_numtype > > >
operator^(Range d1, operator^(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseXOR<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range ^ VectorPick<P_numtype2> // Range ^ VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<int, P_numtype2 > > > _bz_BitwiseXOR<int, P_numtype2 > > >
operator^(Range d1, operator^(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<int, P_numtype2> > T_expr; _bz_BitwiseXOR<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range ^ Range // Range ^ Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_BitwiseXOR<int, int > > > _bz_BitwiseXOR<int, int > > >
operator^(Range d1, operator^(Range d1,
Range d2) Range d2)
skipping to change at line 6071 skipping to change at line 6068
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<int, P_numtype2 > > > _bz_BitwiseXOR<int, P_numtype2 > > >
operator^(Range d1, operator^(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<int, P_numtype2> > T_expr; _bz_BitwiseXOR<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> ^ Vector<P_numtype2> // TinyVector<P_numtype1, N_length1> ^ Vector<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2 > > > _bz_BitwiseXOR<P_numtype1, P_numtype2 > > >
operator^(const TinyVector<P_numtype1, N_length1>& d1, operator^(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> ^ _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> ^ _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseXOR<P_numtype1, typename P_expr2::T_numtype > > >
operator^(const TinyVector<P_numtype1, N_length1>& d1, operator^(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseXOR<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> ^ VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> ^ VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2 > > > _bz_BitwiseXOR<P_numtype1, P_numtype2 > > >
operator^(const TinyVector<P_numtype1, N_length1>& d1, operator^(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> ^ Range // TinyVector<P_numtype1, N_length1> ^ Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_BitwiseXOR<P_numtype1, int > > > _bz_BitwiseXOR<P_numtype1, int > > >
operator^(const TinyVector<P_numtype1, N_length1>& d1, operator^(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_BitwiseXOR<P_numtype1, int> > T_expr; _bz_BitwiseXOR<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> ^ TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> ^ TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2 > > > _bz_BitwiseXOR<P_numtype1, P_numtype2 > > >
operator^(const TinyVector<P_numtype1, N_length1>& d1, operator^(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseXOR<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> ^ int // TinyVector<P_numtype1, N_length1> ^ int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseXOR<P_numtype1, int > > > _bz_BitwiseXOR<P_numtype1, int > > >
operator^(const TinyVector<P_numtype1, N_length1>& d1, operator^(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseXOR<P_numtype1, int> > T_expr; _bz_BitwiseXOR<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// int ^ Vector<P_numtype2> // int ^ Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<int, P_numtype2 > > > _bz_BitwiseXOR<int, P_numtype2 > > >
operator^(int d1, operator^(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseXOR<int, P_numtype2> > T_expr; _bz_BitwiseXOR<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int ^ _bz_VecExpr<P_expr2> // int ^ _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<int, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseXOR<int, typename P_expr2::T_numtype > > >
operator^(int d1, operator^(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseXOR<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseXOR<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int ^ VectorPick<P_numtype2> // int ^ VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<int, P_numtype2 > > > _bz_BitwiseXOR<int, P_numtype2 > > >
operator^(int d1, operator^(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseXOR<int, P_numtype2> > T_expr; _bz_BitwiseXOR<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int ^ TinyVector<P_numtype2, N_length2> // int ^ TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<int, P_numtype2 > > > _bz_BitwiseXOR<int, P_numtype2 > > >
operator^(int d1, operator^(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseXOR<int, P_numtype2> > T_expr; _bz_BitwiseXOR<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* Bitwise And Operators * Bitwise And Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> & Vector<P_numtype2> // Vector<P_numtype1> & Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2 > > > _bz_BitwiseAnd<P_numtype1, P_numtype2 > > >
operator&(const Vector<P_numtype1>& d1, operator&(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> & _bz_VecExpr<P_expr2> // Vector<P_numtype1> & _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseAnd<P_numtype1, typename P_expr2::T_numtype > > >
operator&(const Vector<P_numtype1>& d1, operator&(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseAnd<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> & VectorPick<P_numtype2> // Vector<P_numtype1> & VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2 > > > _bz_BitwiseAnd<P_numtype1, P_numtype2 > > >
operator&(const Vector<P_numtype1>& d1, operator&(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> & Range // Vector<P_numtype1> & Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseAnd<P_numtype1, int > > > _bz_BitwiseAnd<P_numtype1, int > > >
operator&(const Vector<P_numtype1>& d1, operator&(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseAnd<P_numtype1, int> > T_expr; _bz_BitwiseAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> & TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> & TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2 > > > _bz_BitwiseAnd<P_numtype1, P_numtype2 > > >
operator&(const Vector<P_numtype1>& d1, operator&(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> & int // Vector<P_numtype1> & int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseAnd<P_numtype1, int > > > _bz_BitwiseAnd<P_numtype1, int > > >
operator&(const Vector<P_numtype1>& d1, operator&(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseAnd<P_numtype1, int> > T_expr; _bz_BitwiseAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> & Vector<P_numtype2> // _bz_VecExpr<P_expr1> & Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseAnd<typename P_expr1::T_numtype, P_numtype2 > > >
operator&(_bz_VecExpr<P_expr1> d1, operator&(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseAnd<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> & _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> & _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype > > > _bz_BitwiseAnd<typename P_expr1::T_numtype, typename P_expr2::T_numty pe > > >
operator&(_bz_VecExpr<P_expr1> d1, operator&(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype> > T_expr; _bz_BitwiseAnd<typename P_expr1::T_numtype, typename P_expr2::T_numty pe> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> & VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> & VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseAnd<typename P_expr1::T_numtype, P_numtype2 > > >
operator&(_bz_VecExpr<P_expr1> d1, operator&(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseAnd<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> & Range // _bz_VecExpr<P_expr1> & Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, int > > > _bz_BitwiseAnd<typename P_expr1::T_numtype, int > > >
operator&(_bz_VecExpr<P_expr1> d1, operator&(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_BitwiseAnd<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> & TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> & TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseAnd<typename P_expr1::T_numtype, P_numtype2 > > >
operator&(_bz_VecExpr<P_expr1> d1, operator&(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseAnd<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> & int // _bz_VecExpr<P_expr1> & int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, int > > > _bz_BitwiseAnd<typename P_expr1::T_numtype, int > > >
operator&(_bz_VecExpr<P_expr1> d1, operator&(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseAnd<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_BitwiseAnd<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> & Vector<P_numtype2> // VectorPick<P_numtype1> & Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2 > > > _bz_BitwiseAnd<P_numtype1, P_numtype2 > > >
operator&(const VectorPick<P_numtype1>& d1, operator&(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> & _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> & _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseAnd<P_numtype1, typename P_expr2::T_numtype > > >
operator&(const VectorPick<P_numtype1>& d1, operator&(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseAnd<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> & VectorPick<P_numtype2> // VectorPick<P_numtype1> & VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2 > > > _bz_BitwiseAnd<P_numtype1, P_numtype2 > > >
operator&(const VectorPick<P_numtype1>& d1, operator&(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> & Range // VectorPick<P_numtype1> & Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseAnd<P_numtype1, int > > > _bz_BitwiseAnd<P_numtype1, int > > >
operator&(const VectorPick<P_numtype1>& d1, operator&(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseAnd<P_numtype1, int> > T_expr; _bz_BitwiseAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> & TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> & TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2 > > > _bz_BitwiseAnd<P_numtype1, P_numtype2 > > >
operator&(const VectorPick<P_numtype1>& d1, operator&(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> & int // VectorPick<P_numtype1> & int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseAnd<P_numtype1, int > > > _bz_BitwiseAnd<P_numtype1, int > > >
operator&(const VectorPick<P_numtype1>& d1, operator&(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseAnd<P_numtype1, int> > T_expr; _bz_BitwiseAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Range & Vector<P_numtype2> // Range & Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<int, P_numtype2 > > > _bz_BitwiseAnd<int, P_numtype2 > > >
operator&(Range d1, operator&(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<int, P_numtype2> > T_expr; _bz_BitwiseAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range & _bz_VecExpr<P_expr2> // Range & _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<int, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseAnd<int, typename P_expr2::T_numtype > > >
operator&(Range d1, operator&(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseAnd<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range & VectorPick<P_numtype2> // Range & VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<int, P_numtype2 > > > _bz_BitwiseAnd<int, P_numtype2 > > >
operator&(Range d1, operator&(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<int, P_numtype2> > T_expr; _bz_BitwiseAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range & Range // Range & Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_BitwiseAnd<int, int > > > _bz_BitwiseAnd<int, int > > >
operator&(Range d1, operator&(Range d1,
Range d2) Range d2)
skipping to change at line 6635 skipping to change at line 6632
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<int, P_numtype2 > > > _bz_BitwiseAnd<int, P_numtype2 > > >
operator&(Range d1, operator&(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<int, P_numtype2> > T_expr; _bz_BitwiseAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> & Vector<P_numtype2> // TinyVector<P_numtype1, N_length1> & Vector<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2 > > > _bz_BitwiseAnd<P_numtype1, P_numtype2 > > >
operator&(const TinyVector<P_numtype1, N_length1>& d1, operator&(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> & _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> & _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseAnd<P_numtype1, typename P_expr2::T_numtype > > >
operator&(const TinyVector<P_numtype1, N_length1>& d1, operator&(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseAnd<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> & VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> & VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2 > > > _bz_BitwiseAnd<P_numtype1, P_numtype2 > > >
operator&(const TinyVector<P_numtype1, N_length1>& d1, operator&(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> & Range // TinyVector<P_numtype1, N_length1> & Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_BitwiseAnd<P_numtype1, int > > > _bz_BitwiseAnd<P_numtype1, int > > >
operator&(const TinyVector<P_numtype1, N_length1>& d1, operator&(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_BitwiseAnd<P_numtype1, int> > T_expr; _bz_BitwiseAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> & TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> & TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2 > > > _bz_BitwiseAnd<P_numtype1, P_numtype2 > > >
operator&(const TinyVector<P_numtype1, N_length1>& d1, operator&(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> & int // TinyVector<P_numtype1, N_length1> & int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseAnd<P_numtype1, int > > > _bz_BitwiseAnd<P_numtype1, int > > >
operator&(const TinyVector<P_numtype1, N_length1>& d1, operator&(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseAnd<P_numtype1, int> > T_expr; _bz_BitwiseAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// int & Vector<P_numtype2> // int & Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<int, P_numtype2 > > > _bz_BitwiseAnd<int, P_numtype2 > > >
operator&(int d1, operator&(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseAnd<int, P_numtype2> > T_expr; _bz_BitwiseAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int & _bz_VecExpr<P_expr2> // int & _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<int, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseAnd<int, typename P_expr2::T_numtype > > >
operator&(int d1, operator&(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseAnd<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseAnd<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int & VectorPick<P_numtype2> // int & VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<int, P_numtype2 > > > _bz_BitwiseAnd<int, P_numtype2 > > >
operator&(int d1, operator&(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseAnd<int, P_numtype2> > T_expr; _bz_BitwiseAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int & TinyVector<P_numtype2, N_length2> // int & TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<int, P_numtype2 > > > _bz_BitwiseAnd<int, P_numtype2 > > >
operator&(int d1, operator&(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseAnd<int, P_numtype2> > T_expr; _bz_BitwiseAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* Bitwise Or Operators * Bitwise Or Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> | Vector<P_numtype2> // Vector<P_numtype1> | Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2 > > > _bz_BitwiseOr<P_numtype1, P_numtype2 > > >
operator|(const Vector<P_numtype1>& d1, operator|(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> | _bz_VecExpr<P_expr2> // Vector<P_numtype1> | _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseOr<P_numtype1, typename P_expr2::T_numtype > > >
operator|(const Vector<P_numtype1>& d1, operator|(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseOr<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> | VectorPick<P_numtype2> // Vector<P_numtype1> | VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2 > > > _bz_BitwiseOr<P_numtype1, P_numtype2 > > >
operator|(const Vector<P_numtype1>& d1, operator|(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> | Range // Vector<P_numtype1> | Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseOr<P_numtype1, int > > > _bz_BitwiseOr<P_numtype1, int > > >
operator|(const Vector<P_numtype1>& d1, operator|(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseOr<P_numtype1, int> > T_expr; _bz_BitwiseOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> | TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> | TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<P_numtype1, P_numtype2 > > > _bz_BitwiseOr<P_numtype1, P_numtype2 > > >
operator|(const Vector<P_numtype1>& d1, operator|(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> | int // Vector<P_numtype1> | int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseOr<P_numtype1, int > > > _bz_BitwiseOr<P_numtype1, int > > >
operator|(const Vector<P_numtype1>& d1, operator|(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseOr<P_numtype1, int> > T_expr; _bz_BitwiseOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> | Vector<P_numtype2> // _bz_VecExpr<P_expr1> | Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseOr<typename P_expr1::T_numtype, P_numtype2 > > >
operator|(_bz_VecExpr<P_expr1> d1, operator|(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseOr<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> | _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> | _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype > > > _bz_BitwiseOr<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e > > >
operator|(_bz_VecExpr<P_expr1> d1, operator|(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype> > T_expr; _bz_BitwiseOr<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> | VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> | VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseOr<typename P_expr1::T_numtype, P_numtype2 > > >
operator|(_bz_VecExpr<P_expr1> d1, operator|(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseOr<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> | Range // _bz_VecExpr<P_expr1> | Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, int > > > _bz_BitwiseOr<typename P_expr1::T_numtype, int > > >
operator|(_bz_VecExpr<P_expr1> d1, operator|(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_BitwiseOr<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> | TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> | TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_BitwiseOr<typename P_expr1::T_numtype, P_numtype2 > > >
operator|(_bz_VecExpr<P_expr1> d1, operator|(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_BitwiseOr<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> | int // _bz_VecExpr<P_expr1> | int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, int > > > _bz_BitwiseOr<typename P_expr1::T_numtype, int > > >
operator|(_bz_VecExpr<P_expr1> d1, operator|(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseOr<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_BitwiseOr<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> | Vector<P_numtype2> // VectorPick<P_numtype1> | Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2 > > > _bz_BitwiseOr<P_numtype1, P_numtype2 > > >
operator|(const VectorPick<P_numtype1>& d1, operator|(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> | _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> | _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseOr<P_numtype1, typename P_expr2::T_numtype > > >
operator|(const VectorPick<P_numtype1>& d1, operator|(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseOr<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> | VectorPick<P_numtype2> // VectorPick<P_numtype1> | VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2 > > > _bz_BitwiseOr<P_numtype1, P_numtype2 > > >
operator|(const VectorPick<P_numtype1>& d1, operator|(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> | Range // VectorPick<P_numtype1> | Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseOr<P_numtype1, int > > > _bz_BitwiseOr<P_numtype1, int > > >
operator|(const VectorPick<P_numtype1>& d1, operator|(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_BitwiseOr<P_numtype1, int> > T_expr; _bz_BitwiseOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> | TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> | TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<P_numtype1, P_numtype2 > > > _bz_BitwiseOr<P_numtype1, P_numtype2 > > >
operator|(const VectorPick<P_numtype1>& d1, operator|(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> | int // VectorPick<P_numtype1> | int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseOr<P_numtype1, int > > > _bz_BitwiseOr<P_numtype1, int > > >
operator|(const VectorPick<P_numtype1>& d1, operator|(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseOr<P_numtype1, int> > T_expr; _bz_BitwiseOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Range | Vector<P_numtype2> // Range | Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<int, P_numtype2 > > > _bz_BitwiseOr<int, P_numtype2 > > >
operator|(Range d1, operator|(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<int, P_numtype2> > T_expr; _bz_BitwiseOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range | _bz_VecExpr<P_expr2> // Range | _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<int, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseOr<int, typename P_expr2::T_numtype > > >
operator|(Range d1, operator|(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseOr<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range | VectorPick<P_numtype2> // Range | VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<int, P_numtype2 > > > _bz_BitwiseOr<int, P_numtype2 > > >
operator|(Range d1, operator|(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<int, P_numtype2> > T_expr; _bz_BitwiseOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range | Range // Range | Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_BitwiseOr<int, int > > > _bz_BitwiseOr<int, int > > >
operator|(Range d1, operator|(Range d1,
Range d2) Range d2)
skipping to change at line 7199 skipping to change at line 7196
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<int, P_numtype2 > > > _bz_BitwiseOr<int, P_numtype2 > > >
operator|(Range d1, operator|(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<int, P_numtype2> > T_expr; _bz_BitwiseOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> | Vector<P_numtype2> // TinyVector<P_numtype1, N_length1> | Vector<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2 > > > _bz_BitwiseOr<P_numtype1, P_numtype2 > > >
operator|(const TinyVector<P_numtype1, N_length1>& d1, operator|(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> | _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> | _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseOr<P_numtype1, typename P_expr2::T_numtype > > >
operator|(const TinyVector<P_numtype1, N_length1>& d1, operator|(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseOr<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> | VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> | VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2 > > > _bz_BitwiseOr<P_numtype1, P_numtype2 > > >
operator|(const TinyVector<P_numtype1, N_length1>& d1, operator|(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> | Range // TinyVector<P_numtype1, N_length1> | Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_BitwiseOr<P_numtype1, int > > > _bz_BitwiseOr<P_numtype1, int > > >
operator|(const TinyVector<P_numtype1, N_length1>& d1, operator|(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_BitwiseOr<P_numtype1, int> > T_expr; _bz_BitwiseOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> | TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> | TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<P_numtype1, P_numtype2 > > > _bz_BitwiseOr<P_numtype1, P_numtype2 > > >
operator|(const TinyVector<P_numtype1, N_length1>& d1, operator|(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr; _bz_BitwiseOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> | int // TinyVector<P_numtype1, N_length1> | int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseOr<P_numtype1, int > > > _bz_BitwiseOr<P_numtype1, int > > >
operator|(const TinyVector<P_numtype1, N_length1>& d1, operator|(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_BitwiseOr<P_numtype1, int> > T_expr; _bz_BitwiseOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// int | Vector<P_numtype2> // int | Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<int, P_numtype2 > > > _bz_BitwiseOr<int, P_numtype2 > > >
operator|(int d1, operator|(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_BitwiseOr<int, P_numtype2> > T_expr; _bz_BitwiseOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int | _bz_VecExpr<P_expr2> // int | _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<int, _bz_typename P_expr2::T_numtype > > > _bz_BitwiseOr<int, typename P_expr2::T_numtype > > >
operator|(int d1, operator|(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_BitwiseOr<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_BitwiseOr<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int | VectorPick<P_numtype2> // int | VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<int, P_numtype2 > > > _bz_BitwiseOr<int, P_numtype2 > > >
operator|(int d1, operator|(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_BitwiseOr<int, P_numtype2> > T_expr; _bz_BitwiseOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int | TinyVector<P_numtype2, N_length2> // int | TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<int, P_numtype2 > > > _bz_BitwiseOr<int, P_numtype2 > > >
operator|(int d1, operator|(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_BitwiseOr<int, P_numtype2> > T_expr; _bz_BitwiseOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* Shift right Operators * Shift right Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> >> Vector<P_numtype2> // Vector<P_numtype1> >> Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2 > > > _bz_ShiftRight<P_numtype1, P_numtype2 > > >
operator>>(const Vector<P_numtype1>& d1, operator>>(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2> > T_expr; _bz_ShiftRight<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> >> _bz_VecExpr<P_expr2> // Vector<P_numtype1> >> _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_ShiftRight<P_numtype1, typename P_expr2::T_numtype > > >
operator>>(const Vector<P_numtype1>& d1, operator>>(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftRight<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> >> VectorPick<P_numtype2> // Vector<P_numtype1> >> VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2 > > > _bz_ShiftRight<P_numtype1, P_numtype2 > > >
operator>>(const Vector<P_numtype1>& d1, operator>>(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2> > T_expr; _bz_ShiftRight<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> >> Range // Vector<P_numtype1> >> Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_ShiftRight<P_numtype1, int > > > _bz_ShiftRight<P_numtype1, int > > >
operator>>(const Vector<P_numtype1>& d1, operator>>(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_ShiftRight<P_numtype1, int> > T_expr; _bz_ShiftRight<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> >> TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> >> TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<P_numtype1, P_numtype2 > > > _bz_ShiftRight<P_numtype1, P_numtype2 > > >
operator>>(const Vector<P_numtype1>& d1, operator>>(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<P_numtype1, P_numtype2> > T_expr; _bz_ShiftRight<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> >> int // Vector<P_numtype1> >> int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftRight<P_numtype1, int > > > _bz_ShiftRight<P_numtype1, int > > >
operator>>(const Vector<P_numtype1>& d1, operator>>(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftRight<P_numtype1, int> > T_expr; _bz_ShiftRight<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> >> Vector<P_numtype2> // _bz_VecExpr<P_expr1> >> Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_ShiftRight<typename P_expr1::T_numtype, P_numtype2 > > >
operator>>(_bz_VecExpr<P_expr1> d1, operator>>(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_ShiftRight<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> >> _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> >> _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype > > > _bz_ShiftRight<typename P_expr1::T_numtype, typename P_expr2::T_numty pe > > >
operator>>(_bz_VecExpr<P_expr1> d1, operator>>(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype> > T_expr; _bz_ShiftRight<typename P_expr1::T_numtype, typename P_expr2::T_numty pe> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> >> VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> >> VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_ShiftRight<typename P_expr1::T_numtype, P_numtype2 > > >
operator>>(_bz_VecExpr<P_expr1> d1, operator>>(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_ShiftRight<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> >> Range // _bz_VecExpr<P_expr1> >> Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, int > > > _bz_ShiftRight<typename P_expr1::T_numtype, int > > >
operator>>(_bz_VecExpr<P_expr1> d1, operator>>(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_ShiftRight<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> >> TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> >> TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_ShiftRight<typename P_expr1::T_numtype, P_numtype2 > > >
operator>>(_bz_VecExpr<P_expr1> d1, operator>>(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_ShiftRight<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> >> int // _bz_VecExpr<P_expr1> >> int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, int > > > _bz_ShiftRight<typename P_expr1::T_numtype, int > > >
operator>>(_bz_VecExpr<P_expr1> d1, operator>>(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftRight<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_ShiftRight<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> >> Vector<P_numtype2> // VectorPick<P_numtype1> >> Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2 > > > _bz_ShiftRight<P_numtype1, P_numtype2 > > >
operator>>(const VectorPick<P_numtype1>& d1, operator>>(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2> > T_expr; _bz_ShiftRight<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> >> _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> >> _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_ShiftRight<P_numtype1, typename P_expr2::T_numtype > > >
operator>>(const VectorPick<P_numtype1>& d1, operator>>(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftRight<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> >> VectorPick<P_numtype2> // VectorPick<P_numtype1> >> VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2 > > > _bz_ShiftRight<P_numtype1, P_numtype2 > > >
operator>>(const VectorPick<P_numtype1>& d1, operator>>(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2> > T_expr; _bz_ShiftRight<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> >> Range // VectorPick<P_numtype1> >> Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_ShiftRight<P_numtype1, int > > > _bz_ShiftRight<P_numtype1, int > > >
operator>>(const VectorPick<P_numtype1>& d1, operator>>(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_ShiftRight<P_numtype1, int> > T_expr; _bz_ShiftRight<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> >> TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> >> TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<P_numtype1, P_numtype2 > > > _bz_ShiftRight<P_numtype1, P_numtype2 > > >
operator>>(const VectorPick<P_numtype1>& d1, operator>>(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<P_numtype1, P_numtype2> > T_expr; _bz_ShiftRight<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> >> int // VectorPick<P_numtype1> >> int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftRight<P_numtype1, int > > > _bz_ShiftRight<P_numtype1, int > > >
operator>>(const VectorPick<P_numtype1>& d1, operator>>(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftRight<P_numtype1, int> > T_expr; _bz_ShiftRight<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Range >> Vector<P_numtype2> // Range >> Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<int, P_numtype2 > > > _bz_ShiftRight<int, P_numtype2 > > >
operator>>(Range d1, operator>>(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<int, P_numtype2> > T_expr; _bz_ShiftRight<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range >> _bz_VecExpr<P_expr2> // Range >> _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<int, _bz_typename P_expr2::T_numtype > > > _bz_ShiftRight<int, typename P_expr2::T_numtype > > >
operator>>(Range d1, operator>>(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftRight<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range >> VectorPick<P_numtype2> // Range >> VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<int, P_numtype2 > > > _bz_ShiftRight<int, P_numtype2 > > >
operator>>(Range d1, operator>>(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<int, P_numtype2> > T_expr; _bz_ShiftRight<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range >> Range // Range >> Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_ShiftRight<int, int > > > _bz_ShiftRight<int, int > > >
operator>>(Range d1, operator>>(Range d1,
Range d2) Range d2)
skipping to change at line 7763 skipping to change at line 7760
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<int, P_numtype2 > > > _bz_ShiftRight<int, P_numtype2 > > >
operator>>(Range d1, operator>>(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<int, P_numtype2> > T_expr; _bz_ShiftRight<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> >> Vector<P_numtype2> // TinyVector<P_numtype1, N_length1> >> Vector<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2 > > > _bz_ShiftRight<P_numtype1, P_numtype2 > > >
operator>>(const TinyVector<P_numtype1, N_length1>& d1, operator>>(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2> > T_expr; _bz_ShiftRight<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> >> _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> >> _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_ShiftRight<P_numtype1, typename P_expr2::T_numtype > > >
operator>>(const TinyVector<P_numtype1, N_length1>& d1, operator>>(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftRight<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> >> VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> >> VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2 > > > _bz_ShiftRight<P_numtype1, P_numtype2 > > >
operator>>(const TinyVector<P_numtype1, N_length1>& d1, operator>>(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<P_numtype1, P_numtype2> > T_expr; _bz_ShiftRight<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> >> Range // TinyVector<P_numtype1, N_length1> >> Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_ShiftRight<P_numtype1, int > > > _bz_ShiftRight<P_numtype1, int > > >
operator>>(const TinyVector<P_numtype1, N_length1>& d1, operator>>(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_ShiftRight<P_numtype1, int> > T_expr; _bz_ShiftRight<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> >> TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> >> TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<P_numtype1, P_numtype2 > > > _bz_ShiftRight<P_numtype1, P_numtype2 > > >
operator>>(const TinyVector<P_numtype1, N_length1>& d1, operator>>(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<P_numtype1, P_numtype2> > T_expr; _bz_ShiftRight<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> >> int // TinyVector<P_numtype1, N_length1> >> int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftRight<P_numtype1, int > > > _bz_ShiftRight<P_numtype1, int > > >
operator>>(const TinyVector<P_numtype1, N_length1>& d1, operator>>(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftRight<P_numtype1, int> > T_expr; _bz_ShiftRight<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// int >> Vector<P_numtype2> // int >> Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<int, P_numtype2 > > > _bz_ShiftRight<int, P_numtype2 > > >
operator>>(int d1, operator>>(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftRight<int, P_numtype2> > T_expr; _bz_ShiftRight<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int >> _bz_VecExpr<P_expr2> // int >> _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<int, _bz_typename P_expr2::T_numtype > > > _bz_ShiftRight<int, typename P_expr2::T_numtype > > >
operator>>(int d1, operator>>(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftRight<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftRight<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int >> VectorPick<P_numtype2> // int >> VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<int, P_numtype2 > > > _bz_ShiftRight<int, P_numtype2 > > >
operator>>(int d1, operator>>(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftRight<int, P_numtype2> > T_expr; _bz_ShiftRight<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int >> TinyVector<P_numtype2, N_length2> // int >> TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<int, P_numtype2 > > > _bz_ShiftRight<int, P_numtype2 > > >
operator>>(int d1, operator>>(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftRight<int, P_numtype2> > T_expr; _bz_ShiftRight<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* Shift left Operators * Shift left Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> << Vector<P_numtype2> // Vector<P_numtype1> << Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2 > > > _bz_ShiftLeft<P_numtype1, P_numtype2 > > >
operator<<(const Vector<P_numtype1>& d1, operator<<(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr; _bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> << _bz_VecExpr<P_expr2> // Vector<P_numtype1> << _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_ShiftLeft<P_numtype1, typename P_expr2::T_numtype > > >
operator<<(const Vector<P_numtype1>& d1, operator<<(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftLeft<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> << VectorPick<P_numtype2> // Vector<P_numtype1> << VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2 > > > _bz_ShiftLeft<P_numtype1, P_numtype2 > > >
operator<<(const Vector<P_numtype1>& d1, operator<<(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr; _bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> << Range // Vector<P_numtype1> << Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_ShiftLeft<P_numtype1, int > > > _bz_ShiftLeft<P_numtype1, int > > >
operator<<(const Vector<P_numtype1>& d1, operator<<(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_ShiftLeft<P_numtype1, int> > T_expr; _bz_ShiftLeft<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> << TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> << TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<P_numtype1, P_numtype2 > > > _bz_ShiftLeft<P_numtype1, P_numtype2 > > >
operator<<(const Vector<P_numtype1>& d1, operator<<(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr; _bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> << int // Vector<P_numtype1> << int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftLeft<P_numtype1, int > > > _bz_ShiftLeft<P_numtype1, int > > >
operator<<(const Vector<P_numtype1>& d1, operator<<(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftLeft<P_numtype1, int> > T_expr; _bz_ShiftLeft<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> << Vector<P_numtype2> // _bz_VecExpr<P_expr1> << Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_ShiftLeft<typename P_expr1::T_numtype, P_numtype2 > > >
operator<<(_bz_VecExpr<P_expr1> d1, operator<<(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_ShiftLeft<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> << _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> << _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype > > > _bz_ShiftLeft<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e > > >
operator<<(_bz_VecExpr<P_expr1> d1, operator<<(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype> > T_expr; _bz_ShiftLeft<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> << VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> << VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_ShiftLeft<typename P_expr1::T_numtype, P_numtype2 > > >
operator<<(_bz_VecExpr<P_expr1> d1, operator<<(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_ShiftLeft<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> << Range // _bz_VecExpr<P_expr1> << Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, int > > > _bz_ShiftLeft<typename P_expr1::T_numtype, int > > >
operator<<(_bz_VecExpr<P_expr1> d1, operator<<(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_ShiftLeft<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> << TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> << TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_ShiftLeft<typename P_expr1::T_numtype, P_numtype2 > > >
operator<<(_bz_VecExpr<P_expr1> d1, operator<<(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_ShiftLeft<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> << int // _bz_VecExpr<P_expr1> << int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, int > > > _bz_ShiftLeft<typename P_expr1::T_numtype, int > > >
operator<<(_bz_VecExpr<P_expr1> d1, operator<<(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftLeft<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_ShiftLeft<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> << Vector<P_numtype2> // VectorPick<P_numtype1> << Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2 > > > _bz_ShiftLeft<P_numtype1, P_numtype2 > > >
operator<<(const VectorPick<P_numtype1>& d1, operator<<(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr; _bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> << _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> << _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_ShiftLeft<P_numtype1, typename P_expr2::T_numtype > > >
operator<<(const VectorPick<P_numtype1>& d1, operator<<(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftLeft<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> << VectorPick<P_numtype2> // VectorPick<P_numtype1> << VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2 > > > _bz_ShiftLeft<P_numtype1, P_numtype2 > > >
operator<<(const VectorPick<P_numtype1>& d1, operator<<(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr; _bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> << Range // VectorPick<P_numtype1> << Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_ShiftLeft<P_numtype1, int > > > _bz_ShiftLeft<P_numtype1, int > > >
operator<<(const VectorPick<P_numtype1>& d1, operator<<(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_ShiftLeft<P_numtype1, int> > T_expr; _bz_ShiftLeft<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> << TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> << TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<P_numtype1, P_numtype2 > > > _bz_ShiftLeft<P_numtype1, P_numtype2 > > >
operator<<(const VectorPick<P_numtype1>& d1, operator<<(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr; _bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> << int // VectorPick<P_numtype1> << int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftLeft<P_numtype1, int > > > _bz_ShiftLeft<P_numtype1, int > > >
operator<<(const VectorPick<P_numtype1>& d1, operator<<(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftLeft<P_numtype1, int> > T_expr; _bz_ShiftLeft<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Range << Vector<P_numtype2> // Range << Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<int, P_numtype2 > > > _bz_ShiftLeft<int, P_numtype2 > > >
operator<<(Range d1, operator<<(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<int, P_numtype2> > T_expr; _bz_ShiftLeft<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range << _bz_VecExpr<P_expr2> // Range << _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<int, _bz_typename P_expr2::T_numtype > > > _bz_ShiftLeft<int, typename P_expr2::T_numtype > > >
operator<<(Range d1, operator<<(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftLeft<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range << VectorPick<P_numtype2> // Range << VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<int, P_numtype2 > > > _bz_ShiftLeft<int, P_numtype2 > > >
operator<<(Range d1, operator<<(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<int, P_numtype2> > T_expr; _bz_ShiftLeft<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range << Range // Range << Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_ShiftLeft<int, int > > > _bz_ShiftLeft<int, int > > >
operator<<(Range d1, operator<<(Range d1,
Range d2) Range d2)
skipping to change at line 8327 skipping to change at line 8324
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<int, P_numtype2 > > > _bz_ShiftLeft<int, P_numtype2 > > >
operator<<(Range d1, operator<<(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<int, P_numtype2> > T_expr; _bz_ShiftLeft<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> << Vector<P_numtype2> // TinyVector<P_numtype1, N_length1> << Vector<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2 > > > _bz_ShiftLeft<P_numtype1, P_numtype2 > > >
operator<<(const TinyVector<P_numtype1, N_length1>& d1, operator<<(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr; _bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> << _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> << _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_ShiftLeft<P_numtype1, typename P_expr2::T_numtype > > >
operator<<(const TinyVector<P_numtype1, N_length1>& d1, operator<<(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftLeft<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> << VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> << VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2 > > > _bz_ShiftLeft<P_numtype1, P_numtype2 > > >
operator<<(const TinyVector<P_numtype1, N_length1>& d1, operator<<(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr; _bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> << Range // TinyVector<P_numtype1, N_length1> << Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_ShiftLeft<P_numtype1, int > > > _bz_ShiftLeft<P_numtype1, int > > >
operator<<(const TinyVector<P_numtype1, N_length1>& d1, operator<<(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_ShiftLeft<P_numtype1, int> > T_expr; _bz_ShiftLeft<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> << TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> << TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<P_numtype1, P_numtype2 > > > _bz_ShiftLeft<P_numtype1, P_numtype2 > > >
operator<<(const TinyVector<P_numtype1, N_length1>& d1, operator<<(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr; _bz_ShiftLeft<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> << int // TinyVector<P_numtype1, N_length1> << int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftLeft<P_numtype1, int > > > _bz_ShiftLeft<P_numtype1, int > > >
operator<<(const TinyVector<P_numtype1, N_length1>& d1, operator<<(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_ShiftLeft<P_numtype1, int> > T_expr; _bz_ShiftLeft<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// int << Vector<P_numtype2> // int << Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<int, P_numtype2 > > > _bz_ShiftLeft<int, P_numtype2 > > >
operator<<(int d1, operator<<(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_ShiftLeft<int, P_numtype2> > T_expr; _bz_ShiftLeft<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int << _bz_VecExpr<P_expr2> // int << _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<int, _bz_typename P_expr2::T_numtype > > > _bz_ShiftLeft<int, typename P_expr2::T_numtype > > >
operator<<(int d1, operator<<(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_ShiftLeft<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_ShiftLeft<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int << VectorPick<P_numtype2> // int << VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<int, P_numtype2 > > > _bz_ShiftLeft<int, P_numtype2 > > >
operator<<(int d1, operator<<(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_ShiftLeft<int, P_numtype2> > T_expr; _bz_ShiftLeft<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int << TinyVector<P_numtype2, N_length2> // int << TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<int, P_numtype2 > > > _bz_ShiftLeft<int, P_numtype2 > > >
operator<<(int d1, operator<<(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_ShiftLeft<int, P_numtype2> > T_expr; _bz_ShiftLeft<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* Greater-than Operators * Greater-than Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> > Vector<P_numtype2> // Vector<P_numtype1> > Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2 > > > _bz_Greater<P_numtype1, P_numtype2 > > >
operator>(const Vector<P_numtype1>& d1, operator>(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2> > T_expr; _bz_Greater<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> > _bz_VecExpr<P_expr2> // Vector<P_numtype1> > _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Greater<P_numtype1, typename P_expr2::T_numtype > > >
operator>(const Vector<P_numtype1>& d1, operator>(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> > VectorPick<P_numtype2> // Vector<P_numtype1> > VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2 > > > _bz_Greater<P_numtype1, P_numtype2 > > >
operator>(const Vector<P_numtype1>& d1, operator>(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2> > T_expr; _bz_Greater<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> > Range // Vector<P_numtype1> > Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Greater<P_numtype1, int > > > _bz_Greater<P_numtype1, int > > >
operator>(const Vector<P_numtype1>& d1, operator>(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Greater<P_numtype1, int> > T_expr; _bz_Greater<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> > TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> > TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<P_numtype1, P_numtype2 > > > _bz_Greater<P_numtype1, P_numtype2 > > >
operator>(const Vector<P_numtype1>& d1, operator>(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<P_numtype1, P_numtype2> > T_expr; _bz_Greater<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> > int // Vector<P_numtype1> > int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Greater<P_numtype1, int > > > _bz_Greater<P_numtype1, int > > >
operator>(const Vector<P_numtype1>& d1, operator>(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Greater<P_numtype1, int> > T_expr; _bz_Greater<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Vector<P_numtype1> > float // Vector<P_numtype1> > float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Greater<P_numtype1, float > > > _bz_Greater<P_numtype1, float > > >
operator>(const Vector<P_numtype1>& d1, operator>(const Vector<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Greater<P_numtype1, float> > T_expr; _bz_Greater<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// Vector<P_numtype1> > double // Vector<P_numtype1> > double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Greater<P_numtype1, double > > > _bz_Greater<P_numtype1, double > > >
operator>(const Vector<P_numtype1>& d1, operator>(const Vector<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Greater<P_numtype1, double> > T_expr; _bz_Greater<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// Vector<P_numtype1> > long double // Vector<P_numtype1> > long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Greater<P_numtype1, long double > > > _bz_Greater<P_numtype1, long double > > >
operator>(const Vector<P_numtype1>& d1, operator>(const Vector<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Greater<P_numtype1, long double> > T_expr; _bz_Greater<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> > complex<T2> // Vector<P_numtype1> > complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Greater<P_numtype1, complex<T2> > > > _bz_Greater<P_numtype1, complex<T2> > > >
operator>(const Vector<P_numtype1>& d1, operator>(const Vector<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Greater<P_numtype1, complex<T2> > > T_expr; _bz_Greater<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> > Vector<P_numtype2> // _bz_VecExpr<P_expr1> > Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Greater<typename P_expr1::T_numtype, P_numtype2 > > >
operator>(_bz_VecExpr<P_expr1> d1, operator>(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Greater<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> > _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> > _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_ numtype > > > _bz_Greater<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator>(_bz_VecExpr<P_expr1> d1, operator>(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_ numtype> > T_expr; _bz_Greater<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> > VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> > VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Greater<typename P_expr1::T_numtype, P_numtype2 > > >
operator>(_bz_VecExpr<P_expr1> d1, operator>(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Greater<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> > Range // _bz_VecExpr<P_expr1> > Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Greater<_bz_typename P_expr1::T_numtype, int > > > _bz_Greater<typename P_expr1::T_numtype, int > > >
operator>(_bz_VecExpr<P_expr1> d1, operator>(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Greater<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Greater<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> > TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> > TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Greater<typename P_expr1::T_numtype, P_numtype2 > > >
operator>(_bz_VecExpr<P_expr1> d1, operator>(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Greater<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> > int // _bz_VecExpr<P_expr1> > int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Greater<_bz_typename P_expr1::T_numtype, int > > > _bz_Greater<typename P_expr1::T_numtype, int > > >
operator>(_bz_VecExpr<P_expr1> d1, operator>(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Greater<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Greater<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> > float // _bz_VecExpr<P_expr1> > float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Greater<_bz_typename P_expr1::T_numtype, float > > > _bz_Greater<typename P_expr1::T_numtype, float > > >
operator>(_bz_VecExpr<P_expr1> d1, operator>(_bz_VecExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Greater<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Greater<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// _bz_VecExpr<P_expr1> > double // _bz_VecExpr<P_expr1> > double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Greater<_bz_typename P_expr1::T_numtype, double > > > _bz_Greater<typename P_expr1::T_numtype, double > > >
operator>(_bz_VecExpr<P_expr1> d1, operator>(_bz_VecExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Greater<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Greater<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// _bz_VecExpr<P_expr1> > long double // _bz_VecExpr<P_expr1> > long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Greater<_bz_typename P_expr1::T_numtype, long double > > > _bz_Greater<typename P_expr1::T_numtype, long double > > >
operator>(_bz_VecExpr<P_expr1> d1, operator>(_bz_VecExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Greater<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Greater<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> > complex<T2> // _bz_VecExpr<P_expr1> > complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Greater<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Greater<typename P_expr1::T_numtype, complex<T2> > > >
operator>(_bz_VecExpr<P_expr1> d1, operator>(_bz_VecExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Greater<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Greater<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> > Vector<P_numtype2> // VectorPick<P_numtype1> > Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2 > > > _bz_Greater<P_numtype1, P_numtype2 > > >
operator>(const VectorPick<P_numtype1>& d1, operator>(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2> > T_expr; _bz_Greater<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> > _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> > _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Greater<P_numtype1, typename P_expr2::T_numtype > > >
operator>(const VectorPick<P_numtype1>& d1, operator>(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> > VectorPick<P_numtype2> // VectorPick<P_numtype1> > VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2 > > > _bz_Greater<P_numtype1, P_numtype2 > > >
operator>(const VectorPick<P_numtype1>& d1, operator>(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2> > T_expr; _bz_Greater<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> > Range // VectorPick<P_numtype1> > Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Greater<P_numtype1, int > > > _bz_Greater<P_numtype1, int > > >
operator>(const VectorPick<P_numtype1>& d1, operator>(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Greater<P_numtype1, int> > T_expr; _bz_Greater<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> > TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> > TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<P_numtype1, P_numtype2 > > > _bz_Greater<P_numtype1, P_numtype2 > > >
operator>(const VectorPick<P_numtype1>& d1, operator>(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<P_numtype1, P_numtype2> > T_expr; _bz_Greater<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> > int // VectorPick<P_numtype1> > int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Greater<P_numtype1, int > > > _bz_Greater<P_numtype1, int > > >
operator>(const VectorPick<P_numtype1>& d1, operator>(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Greater<P_numtype1, int> > T_expr; _bz_Greater<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> > float // VectorPick<P_numtype1> > float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Greater<P_numtype1, float > > > _bz_Greater<P_numtype1, float > > >
operator>(const VectorPick<P_numtype1>& d1, operator>(const VectorPick<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Greater<P_numtype1, float> > T_expr; _bz_Greater<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// VectorPick<P_numtype1> > double // VectorPick<P_numtype1> > double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Greater<P_numtype1, double > > > _bz_Greater<P_numtype1, double > > >
operator>(const VectorPick<P_numtype1>& d1, operator>(const VectorPick<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Greater<P_numtype1, double> > T_expr; _bz_Greater<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// VectorPick<P_numtype1> > long double // VectorPick<P_numtype1> > long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Greater<P_numtype1, long double > > > _bz_Greater<P_numtype1, long double > > >
operator>(const VectorPick<P_numtype1>& d1, operator>(const VectorPick<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Greater<P_numtype1, long double> > T_expr; _bz_Greater<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> > complex<T2> // VectorPick<P_numtype1> > complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Greater<P_numtype1, complex<T2> > > > _bz_Greater<P_numtype1, complex<T2> > > >
operator>(const VectorPick<P_numtype1>& d1, operator>(const VectorPick<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Greater<P_numtype1, complex<T2> > > T_expr; _bz_Greater<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// Range > Vector<P_numtype2> // Range > Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<int, P_numtype2 > > > _bz_Greater<int, P_numtype2 > > >
operator>(Range d1, operator>(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<int, P_numtype2> > T_expr; _bz_Greater<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range > _bz_VecExpr<P_expr2> // Range > _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<int, _bz_typename P_expr2::T_numtype > > > _bz_Greater<int, typename P_expr2::T_numtype > > >
operator>(Range d1, operator>(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range > VectorPick<P_numtype2> // Range > VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<int, P_numtype2 > > > _bz_Greater<int, P_numtype2 > > >
operator>(Range d1, operator>(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<int, P_numtype2> > T_expr; _bz_Greater<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range > Range // Range > Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_Greater<int, int > > > _bz_Greater<int, int > > >
operator>(Range d1, operator>(Range d1,
Range d2) Range d2)
skipping to change at line 9101 skipping to change at line 9098
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<int, P_numtype2 > > > _bz_Greater<int, P_numtype2 > > >
operator>(Range d1, operator>(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<int, P_numtype2> > T_expr; _bz_Greater<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range > float // Range > float
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Greater<int, float > > > _bz_Greater<int, float > > >
operator>(Range d1, operator>(Range d1,
float d2) float d2)
skipping to change at line 9187 skipping to change at line 9184
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2 > > > _bz_Greater<P_numtype1, P_numtype2 > > >
operator>(const TinyVector<P_numtype1, N_length1>& d1, operator>(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2> > T_expr; _bz_Greater<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> > _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> > _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Greater<P_numtype1, typename P_expr2::T_numtype > > >
operator>(const TinyVector<P_numtype1, N_length1>& d1, operator>(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> > VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> > VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2 > > > _bz_Greater<P_numtype1, P_numtype2 > > >
operator>(const TinyVector<P_numtype1, N_length1>& d1, operator>(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<P_numtype1, P_numtype2> > T_expr; _bz_Greater<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> > Range // TinyVector<P_numtype1, N_length1> > Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Greater<P_numtype1, int > > > _bz_Greater<P_numtype1, int > > >
operator>(const TinyVector<P_numtype1, N_length1>& d1, operator>(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Greater<P_numtype1, int> > T_expr; _bz_Greater<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> > TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> > TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<P_numtype1, P_numtype2 > > > _bz_Greater<P_numtype1, P_numtype2 > > >
operator>(const TinyVector<P_numtype1, N_length1>& d1, operator>(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<P_numtype1, P_numtype2> > T_expr; _bz_Greater<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> > int // TinyVector<P_numtype1, N_length1> > int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Greater<P_numtype1, int > > > _bz_Greater<P_numtype1, int > > >
operator>(const TinyVector<P_numtype1, N_length1>& d1, operator>(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Greater<P_numtype1, int> > T_expr; _bz_Greater<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// TinyVector<P_numtype1, N_length1> > float // TinyVector<P_numtype1, N_length1> > float
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Greater<P_numtype1, float > > > _bz_Greater<P_numtype1, float > > >
operator>(const TinyVector<P_numtype1, N_length1>& d1, operator>(const TinyVector<P_numtype1, N_length1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Greater<P_numtype1, float> > T_expr; _bz_Greater<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// TinyVector<P_numtype1, N_length1> > double // TinyVector<P_numtype1, N_length1> > double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Greater<P_numtype1, double > > > _bz_Greater<P_numtype1, double > > >
operator>(const TinyVector<P_numtype1, N_length1>& d1, operator>(const TinyVector<P_numtype1, N_length1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Greater<P_numtype1, double> > T_expr; _bz_Greater<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// TinyVector<P_numtype1, N_length1> > long double // TinyVector<P_numtype1, N_length1> > long double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Greater<P_numtype1, long double > > > _bz_Greater<P_numtype1, long double > > >
operator>(const TinyVector<P_numtype1, N_length1>& d1, operator>(const TinyVector<P_numtype1, N_length1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Greater<P_numtype1, long double> > T_expr; _bz_Greater<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> > complex<T2> // TinyVector<P_numtype1, N_length1> > complex<T2>
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Greater<P_numtype1, complex<T2> > > > _bz_Greater<P_numtype1, complex<T2> > > >
operator>(const TinyVector<P_numtype1, N_length1>& d1, operator>(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Greater<P_numtype1, complex<T2> > > T_expr; _bz_Greater<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int > Vector<P_numtype2> // int > Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<int, P_numtype2 > > > _bz_Greater<int, P_numtype2 > > >
operator>(int d1, operator>(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<int, P_numtype2> > T_expr; _bz_Greater<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int > _bz_VecExpr<P_expr2> // int > _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<int, _bz_typename P_expr2::T_numtype > > > _bz_Greater<int, typename P_expr2::T_numtype > > >
operator>(int d1, operator>(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int > VectorPick<P_numtype2> // int > VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<int, P_numtype2 > > > _bz_Greater<int, P_numtype2 > > >
operator>(int d1, operator>(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<int, P_numtype2> > T_expr; _bz_Greater<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int > TinyVector<P_numtype2, N_length2> // int > TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<int, P_numtype2 > > > _bz_Greater<int, P_numtype2 > > >
operator>(int d1, operator>(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<int, P_numtype2> > T_expr; _bz_Greater<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// float > Vector<P_numtype2> // float > Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<float, P_numtype2 > > > _bz_Greater<float, P_numtype2 > > >
operator>(float d1, operator>(float d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<float, P_numtype2> > T_expr; _bz_Greater<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float > _bz_VecExpr<P_expr2> // float > _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<float, _bz_typename P_expr2::T_numtype > > > _bz_Greater<float, typename P_expr2::T_numtype > > >
operator>(float d1, operator>(float d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2)); d2));
} }
// float > VectorPick<P_numtype2> // float > VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<float, P_numtype2 > > > _bz_Greater<float, P_numtype2 > > >
operator>(float d1, operator>(float d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<float, P_numtype2> > T_expr; _bz_Greater<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float > Range // float > Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range, Range,
_bz_Greater<float, int > > > _bz_Greater<float, int > > >
operator>(float d1, operator>(float d1,
Range d2) Range d2)
skipping to change at line 9496 skipping to change at line 9493
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<float, P_numtype2 > > > _bz_Greater<float, P_numtype2 > > >
operator>(float d1, operator>(float d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<float, P_numtype2> > T_expr; _bz_Greater<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// double > Vector<P_numtype2> // double > Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<double, P_numtype2 > > > _bz_Greater<double, P_numtype2 > > >
operator>(double d1, operator>(double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<double, P_numtype2> > T_expr; _bz_Greater<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double > _bz_VecExpr<P_expr2> // double > _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<double, _bz_typename P_expr2::T_numtype > > > _bz_Greater<double, typename P_expr2::T_numtype > > >
operator>(double d1, operator>(double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2)); d2));
} }
// double > VectorPick<P_numtype2> // double > VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<double, P_numtype2 > > > _bz_Greater<double, P_numtype2 > > >
operator>(double d1, operator>(double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<double, P_numtype2> > T_expr; _bz_Greater<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double > Range // double > Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range, Range,
_bz_Greater<double, int > > > _bz_Greater<double, int > > >
operator>(double d1, operator>(double d1,
Range d2) Range d2)
skipping to change at line 9581 skipping to change at line 9578
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<double, P_numtype2 > > > _bz_Greater<double, P_numtype2 > > >
operator>(double d1, operator>(double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<double, P_numtype2> > T_expr; _bz_Greater<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double > Vector<P_numtype2> // long double > Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<long double, P_numtype2 > > > _bz_Greater<long double, P_numtype2 > > >
operator>(long double d1, operator>(long double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<long double, P_numtype2> > T_expr; _bz_Greater<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double > _bz_VecExpr<P_expr2> // long double > _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<long double, _bz_typename P_expr2::T_numtype > > > _bz_Greater<long double, typename P_expr2::T_numtype > > >
operator>(long double d1, operator>(long double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2)); d2));
} }
// long double > VectorPick<P_numtype2> // long double > VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<long double, P_numtype2 > > > _bz_Greater<long double, P_numtype2 > > >
operator>(long double d1, operator>(long double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<long double, P_numtype2> > T_expr; _bz_Greater<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double > Range // long double > Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range, Range,
_bz_Greater<long double, int > > > _bz_Greater<long double, int > > >
operator>(long double d1, operator>(long double d1,
Range d2) Range d2)
skipping to change at line 9666 skipping to change at line 9663
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<long double, P_numtype2 > > > _bz_Greater<long double, P_numtype2 > > >
operator>(long double d1, operator>(long double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<long double, P_numtype2> > T_expr; _bz_Greater<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> > Vector<P_numtype2> // complex<T1> > Vector<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<complex<T1> , P_numtype2 > > > _bz_Greater<complex<T1> , P_numtype2 > > >
operator>(complex<T1> d1, operator>(complex<T1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Greater<complex<T1> , P_numtype2> > T_expr; _bz_Greater<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> > _bz_VecExpr<P_expr2> // complex<T1> > _bz_VecExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Greater<complex<T1> , typename P_expr2::T_numtype > > >
operator>(complex<T1> d1, operator>(complex<T1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Greater<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Greater<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> > VectorPick<P_numtype2> // complex<T1> > VectorPick<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
skipping to change at line 9724 skipping to change at line 9721
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<complex<T1> , P_numtype2 > > > _bz_Greater<complex<T1> , P_numtype2 > > >
operator>(complex<T1> d1, operator>(complex<T1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Greater<complex<T1> , P_numtype2> > T_expr; _bz_Greater<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> > Range // complex<T1> > Range
template<class T1> template<class T1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range, Range,
skipping to change at line 9764 skipping to change at line 9761
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<complex<T1> , P_numtype2 > > > _bz_Greater<complex<T1> , P_numtype2 > > >
operator>(complex<T1> d1, operator>(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Greater<complex<T1> , P_numtype2> > T_expr; _bz_Greater<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Less-than Operators * Less-than Operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> < Vector<P_numtype2> // Vector<P_numtype1> < Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2 > > > _bz_Less<P_numtype1, P_numtype2 > > >
operator<(const Vector<P_numtype1>& d1, operator<(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2> > T_expr; _bz_Less<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> < _bz_VecExpr<P_expr2> // Vector<P_numtype1> < _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Less<P_numtype1, typename P_expr2::T_numtype > > >
operator<(const Vector<P_numtype1>& d1, operator<(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> < VectorPick<P_numtype2> // Vector<P_numtype1> < VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2 > > > _bz_Less<P_numtype1, P_numtype2 > > >
operator<(const Vector<P_numtype1>& d1, operator<(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2> > T_expr; _bz_Less<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> < Range // Vector<P_numtype1> < Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Less<P_numtype1, int > > > _bz_Less<P_numtype1, int > > >
operator<(const Vector<P_numtype1>& d1, operator<(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Less<P_numtype1, int> > T_expr; _bz_Less<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> < TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> < TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<P_numtype1, P_numtype2 > > > _bz_Less<P_numtype1, P_numtype2 > > >
operator<(const Vector<P_numtype1>& d1, operator<(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<P_numtype1, P_numtype2> > T_expr; _bz_Less<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> < int // Vector<P_numtype1> < int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Less<P_numtype1, int > > > _bz_Less<P_numtype1, int > > >
operator<(const Vector<P_numtype1>& d1, operator<(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Less<P_numtype1, int> > T_expr; _bz_Less<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Vector<P_numtype1> < float // Vector<P_numtype1> < float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Less<P_numtype1, float > > > _bz_Less<P_numtype1, float > > >
operator<(const Vector<P_numtype1>& d1, operator<(const Vector<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Less<P_numtype1, float> > T_expr; _bz_Less<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// Vector<P_numtype1> < double // Vector<P_numtype1> < double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Less<P_numtype1, double > > > _bz_Less<P_numtype1, double > > >
operator<(const Vector<P_numtype1>& d1, operator<(const Vector<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Less<P_numtype1, double> > T_expr; _bz_Less<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// Vector<P_numtype1> < long double // Vector<P_numtype1> < long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Less<P_numtype1, long double > > > _bz_Less<P_numtype1, long double > > >
operator<(const Vector<P_numtype1>& d1, operator<(const Vector<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Less<P_numtype1, long double> > T_expr; _bz_Less<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> < complex<T2> // Vector<P_numtype1> < complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Less<P_numtype1, complex<T2> > > > _bz_Less<P_numtype1, complex<T2> > > >
operator<(const Vector<P_numtype1>& d1, operator<(const Vector<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Less<P_numtype1, complex<T2> > > T_expr; _bz_Less<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> < Vector<P_numtype2> // _bz_VecExpr<P_expr1> < Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Less<typename P_expr1::T_numtype, P_numtype2 > > >
operator<(_bz_VecExpr<P_expr1> d1, operator<(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Less<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> < _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> < _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_num type > > > _bz_Less<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator<(_bz_VecExpr<P_expr1> d1, operator<(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_num type> > T_expr; _bz_Less<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> < VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> < VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Less<typename P_expr1::T_numtype, P_numtype2 > > >
operator<(_bz_VecExpr<P_expr1> d1, operator<(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Less<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> < Range // _bz_VecExpr<P_expr1> < Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Less<_bz_typename P_expr1::T_numtype, int > > > _bz_Less<typename P_expr1::T_numtype, int > > >
operator<(_bz_VecExpr<P_expr1> d1, operator<(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Less<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Less<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> < TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> < TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Less<typename P_expr1::T_numtype, P_numtype2 > > >
operator<(_bz_VecExpr<P_expr1> d1, operator<(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Less<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> < int // _bz_VecExpr<P_expr1> < int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Less<_bz_typename P_expr1::T_numtype, int > > > _bz_Less<typename P_expr1::T_numtype, int > > >
operator<(_bz_VecExpr<P_expr1> d1, operator<(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Less<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Less<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> < float // _bz_VecExpr<P_expr1> < float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Less<_bz_typename P_expr1::T_numtype, float > > > _bz_Less<typename P_expr1::T_numtype, float > > >
operator<(_bz_VecExpr<P_expr1> d1, operator<(_bz_VecExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Less<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Less<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// _bz_VecExpr<P_expr1> < double // _bz_VecExpr<P_expr1> < double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Less<_bz_typename P_expr1::T_numtype, double > > > _bz_Less<typename P_expr1::T_numtype, double > > >
operator<(_bz_VecExpr<P_expr1> d1, operator<(_bz_VecExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Less<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Less<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// _bz_VecExpr<P_expr1> < long double // _bz_VecExpr<P_expr1> < long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Less<_bz_typename P_expr1::T_numtype, long double > > > _bz_Less<typename P_expr1::T_numtype, long double > > >
operator<(_bz_VecExpr<P_expr1> d1, operator<(_bz_VecExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Less<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Less<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> < complex<T2> // _bz_VecExpr<P_expr1> < complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Less<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Less<typename P_expr1::T_numtype, complex<T2> > > >
operator<(_bz_VecExpr<P_expr1> d1, operator<(_bz_VecExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Less<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Less<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> < Vector<P_numtype2> // VectorPick<P_numtype1> < Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2 > > > _bz_Less<P_numtype1, P_numtype2 > > >
operator<(const VectorPick<P_numtype1>& d1, operator<(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2> > T_expr; _bz_Less<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> < _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> < _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Less<P_numtype1, typename P_expr2::T_numtype > > >
operator<(const VectorPick<P_numtype1>& d1, operator<(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> < VectorPick<P_numtype2> // VectorPick<P_numtype1> < VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2 > > > _bz_Less<P_numtype1, P_numtype2 > > >
operator<(const VectorPick<P_numtype1>& d1, operator<(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2> > T_expr; _bz_Less<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> < Range // VectorPick<P_numtype1> < Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Less<P_numtype1, int > > > _bz_Less<P_numtype1, int > > >
operator<(const VectorPick<P_numtype1>& d1, operator<(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Less<P_numtype1, int> > T_expr; _bz_Less<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> < TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> < TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<P_numtype1, P_numtype2 > > > _bz_Less<P_numtype1, P_numtype2 > > >
operator<(const VectorPick<P_numtype1>& d1, operator<(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<P_numtype1, P_numtype2> > T_expr; _bz_Less<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> < int // VectorPick<P_numtype1> < int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Less<P_numtype1, int > > > _bz_Less<P_numtype1, int > > >
operator<(const VectorPick<P_numtype1>& d1, operator<(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Less<P_numtype1, int> > T_expr; _bz_Less<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> < float // VectorPick<P_numtype1> < float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Less<P_numtype1, float > > > _bz_Less<P_numtype1, float > > >
operator<(const VectorPick<P_numtype1>& d1, operator<(const VectorPick<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Less<P_numtype1, float> > T_expr; _bz_Less<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// VectorPick<P_numtype1> < double // VectorPick<P_numtype1> < double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Less<P_numtype1, double > > > _bz_Less<P_numtype1, double > > >
operator<(const VectorPick<P_numtype1>& d1, operator<(const VectorPick<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Less<P_numtype1, double> > T_expr; _bz_Less<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// VectorPick<P_numtype1> < long double // VectorPick<P_numtype1> < long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Less<P_numtype1, long double > > > _bz_Less<P_numtype1, long double > > >
operator<(const VectorPick<P_numtype1>& d1, operator<(const VectorPick<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Less<P_numtype1, long double> > T_expr; _bz_Less<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> < complex<T2> // VectorPick<P_numtype1> < complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Less<P_numtype1, complex<T2> > > > _bz_Less<P_numtype1, complex<T2> > > >
operator<(const VectorPick<P_numtype1>& d1, operator<(const VectorPick<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Less<P_numtype1, complex<T2> > > T_expr; _bz_Less<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// Range < Vector<P_numtype2> // Range < Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<int, P_numtype2 > > > _bz_Less<int, P_numtype2 > > >
operator<(Range d1, operator<(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<int, P_numtype2> > T_expr; _bz_Less<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range < _bz_VecExpr<P_expr2> // Range < _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<int, _bz_typename P_expr2::T_numtype > > > _bz_Less<int, typename P_expr2::T_numtype > > >
operator<(Range d1, operator<(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range < VectorPick<P_numtype2> // Range < VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<int, P_numtype2 > > > _bz_Less<int, P_numtype2 > > >
operator<(Range d1, operator<(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<int, P_numtype2> > T_expr; _bz_Less<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range < Range // Range < Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_Less<int, int > > > _bz_Less<int, int > > >
operator<(Range d1, operator<(Range d1,
Range d2) Range d2)
skipping to change at line 10370 skipping to change at line 10367
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<int, P_numtype2 > > > _bz_Less<int, P_numtype2 > > >
operator<(Range d1, operator<(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<int, P_numtype2> > T_expr; _bz_Less<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range < float // Range < float
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Less<int, float > > > _bz_Less<int, float > > >
operator<(Range d1, operator<(Range d1,
float d2) float d2)
skipping to change at line 10456 skipping to change at line 10453
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2 > > > _bz_Less<P_numtype1, P_numtype2 > > >
operator<(const TinyVector<P_numtype1, N_length1>& d1, operator<(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2> > T_expr; _bz_Less<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> < _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> < _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Less<P_numtype1, typename P_expr2::T_numtype > > >
operator<(const TinyVector<P_numtype1, N_length1>& d1, operator<(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> < VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> < VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2 > > > _bz_Less<P_numtype1, P_numtype2 > > >
operator<(const TinyVector<P_numtype1, N_length1>& d1, operator<(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<P_numtype1, P_numtype2> > T_expr; _bz_Less<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> < Range // TinyVector<P_numtype1, N_length1> < Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Less<P_numtype1, int > > > _bz_Less<P_numtype1, int > > >
operator<(const TinyVector<P_numtype1, N_length1>& d1, operator<(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Less<P_numtype1, int> > T_expr; _bz_Less<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> < TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> < TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<P_numtype1, P_numtype2 > > > _bz_Less<P_numtype1, P_numtype2 > > >
operator<(const TinyVector<P_numtype1, N_length1>& d1, operator<(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<P_numtype1, P_numtype2> > T_expr; _bz_Less<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> < int // TinyVector<P_numtype1, N_length1> < int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Less<P_numtype1, int > > > _bz_Less<P_numtype1, int > > >
operator<(const TinyVector<P_numtype1, N_length1>& d1, operator<(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Less<P_numtype1, int> > T_expr; _bz_Less<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// TinyVector<P_numtype1, N_length1> < float // TinyVector<P_numtype1, N_length1> < float
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Less<P_numtype1, float > > > _bz_Less<P_numtype1, float > > >
operator<(const TinyVector<P_numtype1, N_length1>& d1, operator<(const TinyVector<P_numtype1, N_length1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Less<P_numtype1, float> > T_expr; _bz_Less<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// TinyVector<P_numtype1, N_length1> < double // TinyVector<P_numtype1, N_length1> < double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Less<P_numtype1, double > > > _bz_Less<P_numtype1, double > > >
operator<(const TinyVector<P_numtype1, N_length1>& d1, operator<(const TinyVector<P_numtype1, N_length1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Less<P_numtype1, double> > T_expr; _bz_Less<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// TinyVector<P_numtype1, N_length1> < long double // TinyVector<P_numtype1, N_length1> < long double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Less<P_numtype1, long double > > > _bz_Less<P_numtype1, long double > > >
operator<(const TinyVector<P_numtype1, N_length1>& d1, operator<(const TinyVector<P_numtype1, N_length1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Less<P_numtype1, long double> > T_expr; _bz_Less<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> < complex<T2> // TinyVector<P_numtype1, N_length1> < complex<T2>
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Less<P_numtype1, complex<T2> > > > _bz_Less<P_numtype1, complex<T2> > > >
operator<(const TinyVector<P_numtype1, N_length1>& d1, operator<(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Less<P_numtype1, complex<T2> > > T_expr; _bz_Less<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int < Vector<P_numtype2> // int < Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<int, P_numtype2 > > > _bz_Less<int, P_numtype2 > > >
operator<(int d1, operator<(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<int, P_numtype2> > T_expr; _bz_Less<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int < _bz_VecExpr<P_expr2> // int < _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<int, _bz_typename P_expr2::T_numtype > > > _bz_Less<int, typename P_expr2::T_numtype > > >
operator<(int d1, operator<(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int < VectorPick<P_numtype2> // int < VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<int, P_numtype2 > > > _bz_Less<int, P_numtype2 > > >
operator<(int d1, operator<(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<int, P_numtype2> > T_expr; _bz_Less<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int < TinyVector<P_numtype2, N_length2> // int < TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<int, P_numtype2 > > > _bz_Less<int, P_numtype2 > > >
operator<(int d1, operator<(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<int, P_numtype2> > T_expr; _bz_Less<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// float < Vector<P_numtype2> // float < Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<float, P_numtype2 > > > _bz_Less<float, P_numtype2 > > >
operator<(float d1, operator<(float d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<float, P_numtype2> > T_expr; _bz_Less<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float < _bz_VecExpr<P_expr2> // float < _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<float, _bz_typename P_expr2::T_numtype > > > _bz_Less<float, typename P_expr2::T_numtype > > >
operator<(float d1, operator<(float d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2)); d2));
} }
// float < VectorPick<P_numtype2> // float < VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<float, P_numtype2 > > > _bz_Less<float, P_numtype2 > > >
operator<(float d1, operator<(float d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<float, P_numtype2> > T_expr; _bz_Less<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float < Range // float < Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range, Range,
_bz_Less<float, int > > > _bz_Less<float, int > > >
operator<(float d1, operator<(float d1,
Range d2) Range d2)
skipping to change at line 10765 skipping to change at line 10762
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<float, P_numtype2 > > > _bz_Less<float, P_numtype2 > > >
operator<(float d1, operator<(float d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<float, P_numtype2> > T_expr; _bz_Less<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// double < Vector<P_numtype2> // double < Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<double, P_numtype2 > > > _bz_Less<double, P_numtype2 > > >
operator<(double d1, operator<(double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<double, P_numtype2> > T_expr; _bz_Less<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double < _bz_VecExpr<P_expr2> // double < _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<double, _bz_typename P_expr2::T_numtype > > > _bz_Less<double, typename P_expr2::T_numtype > > >
operator<(double d1, operator<(double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2)); d2));
} }
// double < VectorPick<P_numtype2> // double < VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<double, P_numtype2 > > > _bz_Less<double, P_numtype2 > > >
operator<(double d1, operator<(double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<double, P_numtype2> > T_expr; _bz_Less<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double < Range // double < Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range, Range,
_bz_Less<double, int > > > _bz_Less<double, int > > >
operator<(double d1, operator<(double d1,
Range d2) Range d2)
skipping to change at line 10850 skipping to change at line 10847
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<double, P_numtype2 > > > _bz_Less<double, P_numtype2 > > >
operator<(double d1, operator<(double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<double, P_numtype2> > T_expr; _bz_Less<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double < Vector<P_numtype2> // long double < Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<long double, P_numtype2 > > > _bz_Less<long double, P_numtype2 > > >
operator<(long double d1, operator<(long double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<long double, P_numtype2> > T_expr; _bz_Less<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double < _bz_VecExpr<P_expr2> // long double < _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<long double, _bz_typename P_expr2::T_numtype > > > _bz_Less<long double, typename P_expr2::T_numtype > > >
operator<(long double d1, operator<(long double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2)); d2));
} }
// long double < VectorPick<P_numtype2> // long double < VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<long double, P_numtype2 > > > _bz_Less<long double, P_numtype2 > > >
operator<(long double d1, operator<(long double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<long double, P_numtype2> > T_expr; _bz_Less<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double < Range // long double < Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range, Range,
_bz_Less<long double, int > > > _bz_Less<long double, int > > >
operator<(long double d1, operator<(long double d1,
Range d2) Range d2)
skipping to change at line 10935 skipping to change at line 10932
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<long double, P_numtype2 > > > _bz_Less<long double, P_numtype2 > > >
operator<(long double d1, operator<(long double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<long double, P_numtype2> > T_expr; _bz_Less<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> < Vector<P_numtype2> // complex<T1> < Vector<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<complex<T1> , P_numtype2 > > > _bz_Less<complex<T1> , P_numtype2 > > >
operator<(complex<T1> d1, operator<(complex<T1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Less<complex<T1> , P_numtype2> > T_expr; _bz_Less<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> < _bz_VecExpr<P_expr2> // complex<T1> < _bz_VecExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Less<complex<T1> , typename P_expr2::T_numtype > > >
operator<(complex<T1> d1, operator<(complex<T1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Less<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Less<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> < VectorPick<P_numtype2> // complex<T1> < VectorPick<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
skipping to change at line 10993 skipping to change at line 10990
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<complex<T1> , P_numtype2 > > > _bz_Less<complex<T1> , P_numtype2 > > >
operator<(complex<T1> d1, operator<(complex<T1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Less<complex<T1> , P_numtype2> > T_expr; _bz_Less<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> < Range // complex<T1> < Range
template<class T1> template<class T1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range, Range,
skipping to change at line 11033 skipping to change at line 11030
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<complex<T1> , P_numtype2 > > > _bz_Less<complex<T1> , P_numtype2 > > >
operator<(complex<T1> d1, operator<(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Less<complex<T1> , P_numtype2> > T_expr; _bz_Less<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Greater or equal (>=) operators * Greater or equal (>=) operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> >= Vector<P_numtype2> // Vector<P_numtype1> >= Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2 > > > _bz_GreaterOrEqual<P_numtype1, P_numtype2 > > >
operator>=(const Vector<P_numtype1>& d1, operator>=(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> >= _bz_VecExpr<P_expr2> // Vector<P_numtype1> >= _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator>=(const Vector<P_numtype1>& d1, operator>=(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_e xpr; _bz_GreaterOrEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> >= VectorPick<P_numtype2> // Vector<P_numtype1> >= VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2 > > > _bz_GreaterOrEqual<P_numtype1, P_numtype2 > > >
operator>=(const Vector<P_numtype1>& d1, operator>=(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> >= Range // Vector<P_numtype1> >= Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_GreaterOrEqual<P_numtype1, int > > > _bz_GreaterOrEqual<P_numtype1, int > > >
operator>=(const Vector<P_numtype1>& d1, operator>=(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_GreaterOrEqual<P_numtype1, int> > T_expr; _bz_GreaterOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> >= TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> >= TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2 > > > _bz_GreaterOrEqual<P_numtype1, P_numtype2 > > >
operator>=(const Vector<P_numtype1>& d1, operator>=(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> >= int // Vector<P_numtype1> >= int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_GreaterOrEqual<P_numtype1, int > > > _bz_GreaterOrEqual<P_numtype1, int > > >
operator>=(const Vector<P_numtype1>& d1, operator>=(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_GreaterOrEqual<P_numtype1, int> > T_expr; _bz_GreaterOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Vector<P_numtype1> >= float // Vector<P_numtype1> >= float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_GreaterOrEqual<P_numtype1, float > > > _bz_GreaterOrEqual<P_numtype1, float > > >
operator>=(const Vector<P_numtype1>& d1, operator>=(const Vector<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_GreaterOrEqual<P_numtype1, float> > T_expr; _bz_GreaterOrEqual<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// Vector<P_numtype1> >= double // Vector<P_numtype1> >= double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_GreaterOrEqual<P_numtype1, double > > > _bz_GreaterOrEqual<P_numtype1, double > > >
operator>=(const Vector<P_numtype1>& d1, operator>=(const Vector<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_GreaterOrEqual<P_numtype1, double> > T_expr; _bz_GreaterOrEqual<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// Vector<P_numtype1> >= long double // Vector<P_numtype1> >= long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_GreaterOrEqual<P_numtype1, long double > > > _bz_GreaterOrEqual<P_numtype1, long double > > >
operator>=(const Vector<P_numtype1>& d1, operator>=(const Vector<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_GreaterOrEqual<P_numtype1, long double> > T_expr; _bz_GreaterOrEqual<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> >= complex<T2> // Vector<P_numtype1> >= complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_GreaterOrEqual<P_numtype1, complex<T2> > > > _bz_GreaterOrEqual<P_numtype1, complex<T2> > > >
operator>=(const Vector<P_numtype1>& d1, operator>=(const Vector<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_GreaterOrEqual<P_numtype1, complex<T2> > > T_expr; _bz_GreaterOrEqual<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> >= Vector<P_numtype2> // _bz_VecExpr<P_expr1> >= Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator>=(_bz_VecExpr<P_expr1> d1, operator>=(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_e xpr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> >= _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> >= _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_ex pr2::T_numtype > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_n umtype > > >
operator>=(_bz_VecExpr<P_expr1> d1, operator>=(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_ex pr2::T_numtype> > T_expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_n umtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> >= VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> >= VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator>=(_bz_VecExpr<P_expr1> d1, operator>=(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_e xpr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> >= Range // _bz_VecExpr<P_expr1> >= Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, int > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, int > > >
operator>=(_bz_VecExpr<P_expr1> d1, operator>=(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> >= TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> >= TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator>=(_bz_VecExpr<P_expr1> d1, operator>=(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_e xpr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> >= int // _bz_VecExpr<P_expr1> >= int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, int > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, int > > >
operator>=(_bz_VecExpr<P_expr1> d1, operator>=(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> >= float // _bz_VecExpr<P_expr1> >= float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, float > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, float > > >
operator>=(_bz_VecExpr<P_expr1> d1, operator>=(_bz_VecExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// _bz_VecExpr<P_expr1> >= double // _bz_VecExpr<P_expr1> >= double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, double > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, double > > >
operator>=(_bz_VecExpr<P_expr1> d1, operator>=(_bz_VecExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// _bz_VecExpr<P_expr1> >= long double // _bz_VecExpr<P_expr1> >= long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, long double > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, long double > > >
operator>=(_bz_VecExpr<P_expr1> d1, operator>=(_bz_VecExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, long double> > T_ expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, long double> > T_expr ;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> >= complex<T2> // _bz_VecExpr<P_expr1> >= complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_GreaterOrEqual<typename P_expr1::T_numtype, complex<T2> > > >
operator>=(_bz_VecExpr<P_expr1> d1, operator>=(_bz_VecExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_GreaterOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > T _expr; _bz_GreaterOrEqual<typename P_expr1::T_numtype, complex<T2> > > T_exp r;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> >= Vector<P_numtype2> // VectorPick<P_numtype1> >= Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2 > > > _bz_GreaterOrEqual<P_numtype1, P_numtype2 > > >
operator>=(const VectorPick<P_numtype1>& d1, operator>=(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> >= _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> >= _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator>=(const VectorPick<P_numtype1>& d1, operator>=(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_e xpr; _bz_GreaterOrEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> >= VectorPick<P_numtype2> // VectorPick<P_numtype1> >= VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2 > > > _bz_GreaterOrEqual<P_numtype1, P_numtype2 > > >
operator>=(const VectorPick<P_numtype1>& d1, operator>=(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> >= Range // VectorPick<P_numtype1> >= Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_GreaterOrEqual<P_numtype1, int > > > _bz_GreaterOrEqual<P_numtype1, int > > >
operator>=(const VectorPick<P_numtype1>& d1, operator>=(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_GreaterOrEqual<P_numtype1, int> > T_expr; _bz_GreaterOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> >= TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> >= TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2 > > > _bz_GreaterOrEqual<P_numtype1, P_numtype2 > > >
operator>=(const VectorPick<P_numtype1>& d1, operator>=(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> >= int // VectorPick<P_numtype1> >= int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_GreaterOrEqual<P_numtype1, int > > > _bz_GreaterOrEqual<P_numtype1, int > > >
operator>=(const VectorPick<P_numtype1>& d1, operator>=(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_GreaterOrEqual<P_numtype1, int> > T_expr; _bz_GreaterOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> >= float // VectorPick<P_numtype1> >= float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_GreaterOrEqual<P_numtype1, float > > > _bz_GreaterOrEqual<P_numtype1, float > > >
operator>=(const VectorPick<P_numtype1>& d1, operator>=(const VectorPick<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_GreaterOrEqual<P_numtype1, float> > T_expr; _bz_GreaterOrEqual<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// VectorPick<P_numtype1> >= double // VectorPick<P_numtype1> >= double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_GreaterOrEqual<P_numtype1, double > > > _bz_GreaterOrEqual<P_numtype1, double > > >
operator>=(const VectorPick<P_numtype1>& d1, operator>=(const VectorPick<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_GreaterOrEqual<P_numtype1, double> > T_expr; _bz_GreaterOrEqual<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// VectorPick<P_numtype1> >= long double // VectorPick<P_numtype1> >= long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_GreaterOrEqual<P_numtype1, long double > > > _bz_GreaterOrEqual<P_numtype1, long double > > >
operator>=(const VectorPick<P_numtype1>& d1, operator>=(const VectorPick<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_GreaterOrEqual<P_numtype1, long double> > T_expr; _bz_GreaterOrEqual<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> >= complex<T2> // VectorPick<P_numtype1> >= complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_GreaterOrEqual<P_numtype1, complex<T2> > > > _bz_GreaterOrEqual<P_numtype1, complex<T2> > > >
operator>=(const VectorPick<P_numtype1>& d1, operator>=(const VectorPick<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_GreaterOrEqual<P_numtype1, complex<T2> > > T_expr; _bz_GreaterOrEqual<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// Range >= Vector<P_numtype2> // Range >= Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<int, P_numtype2 > > > _bz_GreaterOrEqual<int, P_numtype2 > > >
operator>=(Range d1, operator>=(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<int, P_numtype2> > T_expr; _bz_GreaterOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range >= _bz_VecExpr<P_expr2> // Range >= _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<int, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<int, typename P_expr2::T_numtype > > >
operator>=(Range d1, operator>=(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_GreaterOrEqual<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range >= VectorPick<P_numtype2> // Range >= VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<int, P_numtype2 > > > _bz_GreaterOrEqual<int, P_numtype2 > > >
operator>=(Range d1, operator>=(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<int, P_numtype2> > T_expr; _bz_GreaterOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range >= Range // Range >= Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_GreaterOrEqual<int, int > > > _bz_GreaterOrEqual<int, int > > >
operator>=(Range d1, operator>=(Range d1,
Range d2) Range d2)
skipping to change at line 11639 skipping to change at line 11636
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<int, P_numtype2 > > > _bz_GreaterOrEqual<int, P_numtype2 > > >
operator>=(Range d1, operator>=(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<int, P_numtype2> > T_expr; _bz_GreaterOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range >= float // Range >= float
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_GreaterOrEqual<int, float > > > _bz_GreaterOrEqual<int, float > > >
operator>=(Range d1, operator>=(Range d1,
float d2) float d2)
skipping to change at line 11725 skipping to change at line 11722
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2 > > > _bz_GreaterOrEqual<P_numtype1, P_numtype2 > > >
operator>=(const TinyVector<P_numtype1, N_length1>& d1, operator>=(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> >= _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> >= _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator>=(const TinyVector<P_numtype1, N_length1>& d1, operator>=(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_e xpr; _bz_GreaterOrEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> >= VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> >= VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2 > > > _bz_GreaterOrEqual<P_numtype1, P_numtype2 > > >
operator>=(const TinyVector<P_numtype1, N_length1>& d1, operator>=(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> >= Range // TinyVector<P_numtype1, N_length1> >= Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_GreaterOrEqual<P_numtype1, int > > > _bz_GreaterOrEqual<P_numtype1, int > > >
operator>=(const TinyVector<P_numtype1, N_length1>& d1, operator>=(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_GreaterOrEqual<P_numtype1, int> > T_expr; _bz_GreaterOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> >= TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> >= TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2 > > > _bz_GreaterOrEqual<P_numtype1, P_numtype2 > > >
operator>=(const TinyVector<P_numtype1, N_length1>& d1, operator>=(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_GreaterOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> >= int // TinyVector<P_numtype1, N_length1> >= int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_GreaterOrEqual<P_numtype1, int > > > _bz_GreaterOrEqual<P_numtype1, int > > >
operator>=(const TinyVector<P_numtype1, N_length1>& d1, operator>=(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_GreaterOrEqual<P_numtype1, int> > T_expr; _bz_GreaterOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// TinyVector<P_numtype1, N_length1> >= float // TinyVector<P_numtype1, N_length1> >= float
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_GreaterOrEqual<P_numtype1, float > > > _bz_GreaterOrEqual<P_numtype1, float > > >
operator>=(const TinyVector<P_numtype1, N_length1>& d1, operator>=(const TinyVector<P_numtype1, N_length1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_GreaterOrEqual<P_numtype1, float> > T_expr; _bz_GreaterOrEqual<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// TinyVector<P_numtype1, N_length1> >= double // TinyVector<P_numtype1, N_length1> >= double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_GreaterOrEqual<P_numtype1, double > > > _bz_GreaterOrEqual<P_numtype1, double > > >
operator>=(const TinyVector<P_numtype1, N_length1>& d1, operator>=(const TinyVector<P_numtype1, N_length1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_GreaterOrEqual<P_numtype1, double> > T_expr; _bz_GreaterOrEqual<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// TinyVector<P_numtype1, N_length1> >= long double // TinyVector<P_numtype1, N_length1> >= long double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_GreaterOrEqual<P_numtype1, long double > > > _bz_GreaterOrEqual<P_numtype1, long double > > >
operator>=(const TinyVector<P_numtype1, N_length1>& d1, operator>=(const TinyVector<P_numtype1, N_length1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_GreaterOrEqual<P_numtype1, long double> > T_expr; _bz_GreaterOrEqual<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> >= complex<T2> // TinyVector<P_numtype1, N_length1> >= complex<T2>
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_GreaterOrEqual<P_numtype1, complex<T2> > > > _bz_GreaterOrEqual<P_numtype1, complex<T2> > > >
operator>=(const TinyVector<P_numtype1, N_length1>& d1, operator>=(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_GreaterOrEqual<P_numtype1, complex<T2> > > T_expr; _bz_GreaterOrEqual<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int >= Vector<P_numtype2> // int >= Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<int, P_numtype2 > > > _bz_GreaterOrEqual<int, P_numtype2 > > >
operator>=(int d1, operator>=(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<int, P_numtype2> > T_expr; _bz_GreaterOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int >= _bz_VecExpr<P_expr2> // int >= _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<int, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<int, typename P_expr2::T_numtype > > >
operator>=(int d1, operator>=(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_GreaterOrEqual<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int >= VectorPick<P_numtype2> // int >= VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<int, P_numtype2 > > > _bz_GreaterOrEqual<int, P_numtype2 > > >
operator>=(int d1, operator>=(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<int, P_numtype2> > T_expr; _bz_GreaterOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int >= TinyVector<P_numtype2, N_length2> // int >= TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<int, P_numtype2 > > > _bz_GreaterOrEqual<int, P_numtype2 > > >
operator>=(int d1, operator>=(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<int, P_numtype2> > T_expr; _bz_GreaterOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// float >= Vector<P_numtype2> // float >= Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<float, P_numtype2 > > > _bz_GreaterOrEqual<float, P_numtype2 > > >
operator>=(float d1, operator>=(float d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<float, P_numtype2> > T_expr; _bz_GreaterOrEqual<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float >= _bz_VecExpr<P_expr2> // float >= _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<float, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<float, typename P_expr2::T_numtype > > >
operator>=(float d1, operator>=(float d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_GreaterOrEqual<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2)); d2));
} }
// float >= VectorPick<P_numtype2> // float >= VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<float, P_numtype2 > > > _bz_GreaterOrEqual<float, P_numtype2 > > >
operator>=(float d1, operator>=(float d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<float, P_numtype2> > T_expr; _bz_GreaterOrEqual<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float >= Range // float >= Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range, Range,
_bz_GreaterOrEqual<float, int > > > _bz_GreaterOrEqual<float, int > > >
operator>=(float d1, operator>=(float d1,
Range d2) Range d2)
skipping to change at line 12034 skipping to change at line 12031
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<float, P_numtype2 > > > _bz_GreaterOrEqual<float, P_numtype2 > > >
operator>=(float d1, operator>=(float d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<float, P_numtype2> > T_expr; _bz_GreaterOrEqual<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// double >= Vector<P_numtype2> // double >= Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<double, P_numtype2 > > > _bz_GreaterOrEqual<double, P_numtype2 > > >
operator>=(double d1, operator>=(double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<double, P_numtype2> > T_expr; _bz_GreaterOrEqual<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double >= _bz_VecExpr<P_expr2> // double >= _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<double, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<double, typename P_expr2::T_numtype > > >
operator>=(double d1, operator>=(double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_GreaterOrEqual<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2)); d2));
} }
// double >= VectorPick<P_numtype2> // double >= VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<double, P_numtype2 > > > _bz_GreaterOrEqual<double, P_numtype2 > > >
operator>=(double d1, operator>=(double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<double, P_numtype2> > T_expr; _bz_GreaterOrEqual<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double >= Range // double >= Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range, Range,
_bz_GreaterOrEqual<double, int > > > _bz_GreaterOrEqual<double, int > > >
operator>=(double d1, operator>=(double d1,
Range d2) Range d2)
skipping to change at line 12119 skipping to change at line 12116
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<double, P_numtype2 > > > _bz_GreaterOrEqual<double, P_numtype2 > > >
operator>=(double d1, operator>=(double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<double, P_numtype2> > T_expr; _bz_GreaterOrEqual<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double >= Vector<P_numtype2> // long double >= Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<long double, P_numtype2 > > > _bz_GreaterOrEqual<long double, P_numtype2 > > >
operator>=(long double d1, operator>=(long double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<long double, P_numtype2> > T_expr; _bz_GreaterOrEqual<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double >= _bz_VecExpr<P_expr2> // long double >= _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<long double, _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<long double, typename P_expr2::T_numtype > > >
operator>=(long double d1, operator>=(long double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<long double, _bz_typename P_expr2::T_numtype> > T_ expr; _bz_GreaterOrEqual<long double, typename P_expr2::T_numtype> > T_expr ;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2)); d2));
} }
// long double >= VectorPick<P_numtype2> // long double >= VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<long double, P_numtype2 > > > _bz_GreaterOrEqual<long double, P_numtype2 > > >
operator>=(long double d1, operator>=(long double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<long double, P_numtype2> > T_expr; _bz_GreaterOrEqual<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double >= Range // long double >= Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range, Range,
_bz_GreaterOrEqual<long double, int > > > _bz_GreaterOrEqual<long double, int > > >
operator>=(long double d1, operator>=(long double d1,
Range d2) Range d2)
skipping to change at line 12204 skipping to change at line 12201
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<long double, P_numtype2 > > > _bz_GreaterOrEqual<long double, P_numtype2 > > >
operator>=(long double d1, operator>=(long double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<long double, P_numtype2> > T_expr; _bz_GreaterOrEqual<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> >= Vector<P_numtype2> // complex<T1> >= Vector<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<complex<T1> , P_numtype2 > > > _bz_GreaterOrEqual<complex<T1> , P_numtype2 > > >
operator>=(complex<T1> d1, operator>=(complex<T1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_GreaterOrEqual<complex<T1> , P_numtype2> > T_expr; _bz_GreaterOrEqual<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> >= _bz_VecExpr<P_expr2> // complex<T1> >= _bz_VecExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_GreaterOrEqual<complex<T1> , typename P_expr2::T_numtype > > >
operator>=(complex<T1> d1, operator>=(complex<T1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_GreaterOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype> > T _expr; _bz_GreaterOrEqual<complex<T1> , typename P_expr2::T_numtype> > T_exp r;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> >= VectorPick<P_numtype2> // complex<T1> >= VectorPick<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
skipping to change at line 12262 skipping to change at line 12259
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<complex<T1> , P_numtype2 > > > _bz_GreaterOrEqual<complex<T1> , P_numtype2 > > >
operator>=(complex<T1> d1, operator>=(complex<T1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_GreaterOrEqual<complex<T1> , P_numtype2> > T_expr; _bz_GreaterOrEqual<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> >= Range // complex<T1> >= Range
template<class T1> template<class T1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range, Range,
skipping to change at line 12302 skipping to change at line 12299
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<complex<T1> , P_numtype2 > > > _bz_GreaterOrEqual<complex<T1> , P_numtype2 > > >
operator>=(complex<T1> d1, operator>=(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_GreaterOrEqual<complex<T1> , P_numtype2> > T_expr; _bz_GreaterOrEqual<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Less or equal (<=) operators * Less or equal (<=) operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> <= Vector<P_numtype2> // Vector<P_numtype1> <= Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2 > > > _bz_LessOrEqual<P_numtype1, P_numtype2 > > >
operator<=(const Vector<P_numtype1>& d1, operator<=(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> <= _bz_VecExpr<P_expr2> // Vector<P_numtype1> <= _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator<=(const Vector<P_numtype1>& d1, operator<=(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr ; _bz_LessOrEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> <= VectorPick<P_numtype2> // Vector<P_numtype1> <= VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2 > > > _bz_LessOrEqual<P_numtype1, P_numtype2 > > >
operator<=(const Vector<P_numtype1>& d1, operator<=(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> <= Range // Vector<P_numtype1> <= Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_LessOrEqual<P_numtype1, int > > > _bz_LessOrEqual<P_numtype1, int > > >
operator<=(const Vector<P_numtype1>& d1, operator<=(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_LessOrEqual<P_numtype1, int> > T_expr; _bz_LessOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> <= TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> <= TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<P_numtype1, P_numtype2 > > > _bz_LessOrEqual<P_numtype1, P_numtype2 > > >
operator<=(const Vector<P_numtype1>& d1, operator<=(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> <= int // Vector<P_numtype1> <= int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LessOrEqual<P_numtype1, int > > > _bz_LessOrEqual<P_numtype1, int > > >
operator<=(const Vector<P_numtype1>& d1, operator<=(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LessOrEqual<P_numtype1, int> > T_expr; _bz_LessOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Vector<P_numtype1> <= float // Vector<P_numtype1> <= float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_LessOrEqual<P_numtype1, float > > > _bz_LessOrEqual<P_numtype1, float > > >
operator<=(const Vector<P_numtype1>& d1, operator<=(const Vector<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_LessOrEqual<P_numtype1, float> > T_expr; _bz_LessOrEqual<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// Vector<P_numtype1> <= double // Vector<P_numtype1> <= double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_LessOrEqual<P_numtype1, double > > > _bz_LessOrEqual<P_numtype1, double > > >
operator<=(const Vector<P_numtype1>& d1, operator<=(const Vector<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_LessOrEqual<P_numtype1, double> > T_expr; _bz_LessOrEqual<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// Vector<P_numtype1> <= long double // Vector<P_numtype1> <= long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_LessOrEqual<P_numtype1, long double > > > _bz_LessOrEqual<P_numtype1, long double > > >
operator<=(const Vector<P_numtype1>& d1, operator<=(const Vector<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_LessOrEqual<P_numtype1, long double> > T_expr; _bz_LessOrEqual<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> <= complex<T2> // Vector<P_numtype1> <= complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_LessOrEqual<P_numtype1, complex<T2> > > > _bz_LessOrEqual<P_numtype1, complex<T2> > > >
operator<=(const Vector<P_numtype1>& d1, operator<=(const Vector<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_LessOrEqual<P_numtype1, complex<T2> > > T_expr; _bz_LessOrEqual<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> <= Vector<P_numtype2> // _bz_VecExpr<P_expr1> <= Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LessOrEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator<=(_bz_VecExpr<P_expr1> d1, operator<=(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr ; _bz_LessOrEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> <= _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> <= _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2 ::T_numtype > > > _bz_LessOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_numt ype > > >
operator<=(_bz_VecExpr<P_expr1> d1, operator<=(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2 ::T_numtype> > T_expr; _bz_LessOrEqual<typename P_expr1::T_numtype, typename P_expr2::T_numt ype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> <= VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> <= VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LessOrEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator<=(_bz_VecExpr<P_expr1> d1, operator<=(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr ; _bz_LessOrEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> <= Range // _bz_VecExpr<P_expr1> <= Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, int > > > _bz_LessOrEqual<typename P_expr1::T_numtype, int > > >
operator<=(_bz_VecExpr<P_expr1> d1, operator<=(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_LessOrEqual<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> <= TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> <= TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LessOrEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator<=(_bz_VecExpr<P_expr1> d1, operator<=(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr ; _bz_LessOrEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> <= int // _bz_VecExpr<P_expr1> <= int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, int > > > _bz_LessOrEqual<typename P_expr1::T_numtype, int > > >
operator<=(_bz_VecExpr<P_expr1> d1, operator<=(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_LessOrEqual<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> <= float // _bz_VecExpr<P_expr1> <= float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, float > > > _bz_LessOrEqual<typename P_expr1::T_numtype, float > > >
operator<=(_bz_VecExpr<P_expr1> d1, operator<=(_bz_VecExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_LessOrEqual<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// _bz_VecExpr<P_expr1> <= double // _bz_VecExpr<P_expr1> <= double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, double > > > _bz_LessOrEqual<typename P_expr1::T_numtype, double > > >
operator<=(_bz_VecExpr<P_expr1> d1, operator<=(_bz_VecExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_LessOrEqual<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// _bz_VecExpr<P_expr1> <= long double // _bz_VecExpr<P_expr1> <= long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, long double > > > _bz_LessOrEqual<typename P_expr1::T_numtype, long double > > >
operator<=(_bz_VecExpr<P_expr1> d1, operator<=(_bz_VecExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, long double> > T_exp r; _bz_LessOrEqual<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> <= complex<T2> // _bz_VecExpr<P_expr1> <= complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_LessOrEqual<typename P_expr1::T_numtype, complex<T2> > > >
operator<=(_bz_VecExpr<P_expr1> d1, operator<=(_bz_VecExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_LessOrEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > T_ex pr; _bz_LessOrEqual<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> <= Vector<P_numtype2> // VectorPick<P_numtype1> <= Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2 > > > _bz_LessOrEqual<P_numtype1, P_numtype2 > > >
operator<=(const VectorPick<P_numtype1>& d1, operator<=(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> <= _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> <= _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator<=(const VectorPick<P_numtype1>& d1, operator<=(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr ; _bz_LessOrEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> <= VectorPick<P_numtype2> // VectorPick<P_numtype1> <= VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2 > > > _bz_LessOrEqual<P_numtype1, P_numtype2 > > >
operator<=(const VectorPick<P_numtype1>& d1, operator<=(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> <= Range // VectorPick<P_numtype1> <= Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_LessOrEqual<P_numtype1, int > > > _bz_LessOrEqual<P_numtype1, int > > >
operator<=(const VectorPick<P_numtype1>& d1, operator<=(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_LessOrEqual<P_numtype1, int> > T_expr; _bz_LessOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> <= TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> <= TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<P_numtype1, P_numtype2 > > > _bz_LessOrEqual<P_numtype1, P_numtype2 > > >
operator<=(const VectorPick<P_numtype1>& d1, operator<=(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> <= int // VectorPick<P_numtype1> <= int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LessOrEqual<P_numtype1, int > > > _bz_LessOrEqual<P_numtype1, int > > >
operator<=(const VectorPick<P_numtype1>& d1, operator<=(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LessOrEqual<P_numtype1, int> > T_expr; _bz_LessOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> <= float // VectorPick<P_numtype1> <= float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_LessOrEqual<P_numtype1, float > > > _bz_LessOrEqual<P_numtype1, float > > >
operator<=(const VectorPick<P_numtype1>& d1, operator<=(const VectorPick<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_LessOrEqual<P_numtype1, float> > T_expr; _bz_LessOrEqual<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// VectorPick<P_numtype1> <= double // VectorPick<P_numtype1> <= double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_LessOrEqual<P_numtype1, double > > > _bz_LessOrEqual<P_numtype1, double > > >
operator<=(const VectorPick<P_numtype1>& d1, operator<=(const VectorPick<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_LessOrEqual<P_numtype1, double> > T_expr; _bz_LessOrEqual<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// VectorPick<P_numtype1> <= long double // VectorPick<P_numtype1> <= long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_LessOrEqual<P_numtype1, long double > > > _bz_LessOrEqual<P_numtype1, long double > > >
operator<=(const VectorPick<P_numtype1>& d1, operator<=(const VectorPick<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_LessOrEqual<P_numtype1, long double> > T_expr; _bz_LessOrEqual<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> <= complex<T2> // VectorPick<P_numtype1> <= complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_LessOrEqual<P_numtype1, complex<T2> > > > _bz_LessOrEqual<P_numtype1, complex<T2> > > >
operator<=(const VectorPick<P_numtype1>& d1, operator<=(const VectorPick<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_LessOrEqual<P_numtype1, complex<T2> > > T_expr; _bz_LessOrEqual<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// Range <= Vector<P_numtype2> // Range <= Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<int, P_numtype2 > > > _bz_LessOrEqual<int, P_numtype2 > > >
operator<=(Range d1, operator<=(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<int, P_numtype2> > T_expr; _bz_LessOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range <= _bz_VecExpr<P_expr2> // Range <= _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<int, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<int, typename P_expr2::T_numtype > > >
operator<=(Range d1, operator<=(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LessOrEqual<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range <= VectorPick<P_numtype2> // Range <= VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<int, P_numtype2 > > > _bz_LessOrEqual<int, P_numtype2 > > >
operator<=(Range d1, operator<=(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<int, P_numtype2> > T_expr; _bz_LessOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range <= Range // Range <= Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_LessOrEqual<int, int > > > _bz_LessOrEqual<int, int > > >
operator<=(Range d1, operator<=(Range d1,
Range d2) Range d2)
skipping to change at line 12908 skipping to change at line 12905
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<int, P_numtype2 > > > _bz_LessOrEqual<int, P_numtype2 > > >
operator<=(Range d1, operator<=(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<int, P_numtype2> > T_expr; _bz_LessOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range <= float // Range <= float
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_LessOrEqual<int, float > > > _bz_LessOrEqual<int, float > > >
operator<=(Range d1, operator<=(Range d1,
float d2) float d2)
skipping to change at line 12994 skipping to change at line 12991
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2 > > > _bz_LessOrEqual<P_numtype1, P_numtype2 > > >
operator<=(const TinyVector<P_numtype1, N_length1>& d1, operator<=(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> <= _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> <= _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator<=(const TinyVector<P_numtype1, N_length1>& d1, operator<=(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr ; _bz_LessOrEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> <= VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> <= VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2 > > > _bz_LessOrEqual<P_numtype1, P_numtype2 > > >
operator<=(const TinyVector<P_numtype1, N_length1>& d1, operator<=(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> <= Range // TinyVector<P_numtype1, N_length1> <= Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_LessOrEqual<P_numtype1, int > > > _bz_LessOrEqual<P_numtype1, int > > >
operator<=(const TinyVector<P_numtype1, N_length1>& d1, operator<=(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_LessOrEqual<P_numtype1, int> > T_expr; _bz_LessOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> <= TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> <= TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<P_numtype1, P_numtype2 > > > _bz_LessOrEqual<P_numtype1, P_numtype2 > > >
operator<=(const TinyVector<P_numtype1, N_length1>& d1, operator<=(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr; _bz_LessOrEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> <= int // TinyVector<P_numtype1, N_length1> <= int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LessOrEqual<P_numtype1, int > > > _bz_LessOrEqual<P_numtype1, int > > >
operator<=(const TinyVector<P_numtype1, N_length1>& d1, operator<=(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LessOrEqual<P_numtype1, int> > T_expr; _bz_LessOrEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// TinyVector<P_numtype1, N_length1> <= float // TinyVector<P_numtype1, N_length1> <= float
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_LessOrEqual<P_numtype1, float > > > _bz_LessOrEqual<P_numtype1, float > > >
operator<=(const TinyVector<P_numtype1, N_length1>& d1, operator<=(const TinyVector<P_numtype1, N_length1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_LessOrEqual<P_numtype1, float> > T_expr; _bz_LessOrEqual<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// TinyVector<P_numtype1, N_length1> <= double // TinyVector<P_numtype1, N_length1> <= double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_LessOrEqual<P_numtype1, double > > > _bz_LessOrEqual<P_numtype1, double > > >
operator<=(const TinyVector<P_numtype1, N_length1>& d1, operator<=(const TinyVector<P_numtype1, N_length1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_LessOrEqual<P_numtype1, double> > T_expr; _bz_LessOrEqual<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// TinyVector<P_numtype1, N_length1> <= long double // TinyVector<P_numtype1, N_length1> <= long double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_LessOrEqual<P_numtype1, long double > > > _bz_LessOrEqual<P_numtype1, long double > > >
operator<=(const TinyVector<P_numtype1, N_length1>& d1, operator<=(const TinyVector<P_numtype1, N_length1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_LessOrEqual<P_numtype1, long double> > T_expr; _bz_LessOrEqual<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> <= complex<T2> // TinyVector<P_numtype1, N_length1> <= complex<T2>
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_LessOrEqual<P_numtype1, complex<T2> > > > _bz_LessOrEqual<P_numtype1, complex<T2> > > >
operator<=(const TinyVector<P_numtype1, N_length1>& d1, operator<=(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_LessOrEqual<P_numtype1, complex<T2> > > T_expr; _bz_LessOrEqual<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int <= Vector<P_numtype2> // int <= Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<int, P_numtype2 > > > _bz_LessOrEqual<int, P_numtype2 > > >
operator<=(int d1, operator<=(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<int, P_numtype2> > T_expr; _bz_LessOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int <= _bz_VecExpr<P_expr2> // int <= _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<int, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<int, typename P_expr2::T_numtype > > >
operator<=(int d1, operator<=(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LessOrEqual<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int <= VectorPick<P_numtype2> // int <= VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<int, P_numtype2 > > > _bz_LessOrEqual<int, P_numtype2 > > >
operator<=(int d1, operator<=(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<int, P_numtype2> > T_expr; _bz_LessOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int <= TinyVector<P_numtype2, N_length2> // int <= TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<int, P_numtype2 > > > _bz_LessOrEqual<int, P_numtype2 > > >
operator<=(int d1, operator<=(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<int, P_numtype2> > T_expr; _bz_LessOrEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// float <= Vector<P_numtype2> // float <= Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<float, P_numtype2 > > > _bz_LessOrEqual<float, P_numtype2 > > >
operator<=(float d1, operator<=(float d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<float, P_numtype2> > T_expr; _bz_LessOrEqual<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float <= _bz_VecExpr<P_expr2> // float <= _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<float, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<float, typename P_expr2::T_numtype > > >
operator<=(float d1, operator<=(float d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LessOrEqual<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2)); d2));
} }
// float <= VectorPick<P_numtype2> // float <= VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<float, P_numtype2 > > > _bz_LessOrEqual<float, P_numtype2 > > >
operator<=(float d1, operator<=(float d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<float, P_numtype2> > T_expr; _bz_LessOrEqual<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float <= Range // float <= Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range, Range,
_bz_LessOrEqual<float, int > > > _bz_LessOrEqual<float, int > > >
operator<=(float d1, operator<=(float d1,
Range d2) Range d2)
skipping to change at line 13303 skipping to change at line 13300
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<float, P_numtype2 > > > _bz_LessOrEqual<float, P_numtype2 > > >
operator<=(float d1, operator<=(float d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<float, P_numtype2> > T_expr; _bz_LessOrEqual<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// double <= Vector<P_numtype2> // double <= Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<double, P_numtype2 > > > _bz_LessOrEqual<double, P_numtype2 > > >
operator<=(double d1, operator<=(double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<double, P_numtype2> > T_expr; _bz_LessOrEqual<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double <= _bz_VecExpr<P_expr2> // double <= _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<double, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<double, typename P_expr2::T_numtype > > >
operator<=(double d1, operator<=(double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LessOrEqual<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2)); d2));
} }
// double <= VectorPick<P_numtype2> // double <= VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<double, P_numtype2 > > > _bz_LessOrEqual<double, P_numtype2 > > >
operator<=(double d1, operator<=(double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<double, P_numtype2> > T_expr; _bz_LessOrEqual<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double <= Range // double <= Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range, Range,
_bz_LessOrEqual<double, int > > > _bz_LessOrEqual<double, int > > >
operator<=(double d1, operator<=(double d1,
Range d2) Range d2)
skipping to change at line 13388 skipping to change at line 13385
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<double, P_numtype2 > > > _bz_LessOrEqual<double, P_numtype2 > > >
operator<=(double d1, operator<=(double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<double, P_numtype2> > T_expr; _bz_LessOrEqual<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double <= Vector<P_numtype2> // long double <= Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<long double, P_numtype2 > > > _bz_LessOrEqual<long double, P_numtype2 > > >
operator<=(long double d1, operator<=(long double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<long double, P_numtype2> > T_expr; _bz_LessOrEqual<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double <= _bz_VecExpr<P_expr2> // long double <= _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<long double, _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<long double, typename P_expr2::T_numtype > > >
operator<=(long double d1, operator<=(long double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<long double, _bz_typename P_expr2::T_numtype> > T_exp r; _bz_LessOrEqual<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2)); d2));
} }
// long double <= VectorPick<P_numtype2> // long double <= VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<long double, P_numtype2 > > > _bz_LessOrEqual<long double, P_numtype2 > > >
operator<=(long double d1, operator<=(long double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<long double, P_numtype2> > T_expr; _bz_LessOrEqual<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double <= Range // long double <= Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range, Range,
_bz_LessOrEqual<long double, int > > > _bz_LessOrEqual<long double, int > > >
operator<=(long double d1, operator<=(long double d1,
Range d2) Range d2)
skipping to change at line 13473 skipping to change at line 13470
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<long double, P_numtype2 > > > _bz_LessOrEqual<long double, P_numtype2 > > >
operator<=(long double d1, operator<=(long double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<long double, P_numtype2> > T_expr; _bz_LessOrEqual<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> <= Vector<P_numtype2> // complex<T1> <= Vector<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<complex<T1> , P_numtype2 > > > _bz_LessOrEqual<complex<T1> , P_numtype2 > > >
operator<=(complex<T1> d1, operator<=(complex<T1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LessOrEqual<complex<T1> , P_numtype2> > T_expr; _bz_LessOrEqual<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> <= _bz_VecExpr<P_expr2> // complex<T1> <= _bz_VecExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_LessOrEqual<complex<T1> , typename P_expr2::T_numtype > > >
operator<=(complex<T1> d1, operator<=(complex<T1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LessOrEqual<complex<T1> , _bz_typename P_expr2::T_numtype> > T_ex pr; _bz_LessOrEqual<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> <= VectorPick<P_numtype2> // complex<T1> <= VectorPick<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
skipping to change at line 13531 skipping to change at line 13528
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<complex<T1> , P_numtype2 > > > _bz_LessOrEqual<complex<T1> , P_numtype2 > > >
operator<=(complex<T1> d1, operator<=(complex<T1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LessOrEqual<complex<T1> , P_numtype2> > T_expr; _bz_LessOrEqual<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> <= Range // complex<T1> <= Range
template<class T1> template<class T1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range, Range,
skipping to change at line 13571 skipping to change at line 13568
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<complex<T1> , P_numtype2 > > > _bz_LessOrEqual<complex<T1> , P_numtype2 > > >
operator<=(complex<T1> d1, operator<=(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LessOrEqual<complex<T1> , P_numtype2> > T_expr; _bz_LessOrEqual<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Equality operators * Equality operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> == Vector<P_numtype2> // Vector<P_numtype1> == Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2 > > > _bz_Equal<P_numtype1, P_numtype2 > > >
operator==(const Vector<P_numtype1>& d1, operator==(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2> > T_expr; _bz_Equal<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> == _bz_VecExpr<P_expr2> // Vector<P_numtype1> == _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Equal<P_numtype1, typename P_expr2::T_numtype > > >
operator==(const Vector<P_numtype1>& d1, operator==(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> == VectorPick<P_numtype2> // Vector<P_numtype1> == VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2 > > > _bz_Equal<P_numtype1, P_numtype2 > > >
operator==(const Vector<P_numtype1>& d1, operator==(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2> > T_expr; _bz_Equal<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> == Range // Vector<P_numtype1> == Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Equal<P_numtype1, int > > > _bz_Equal<P_numtype1, int > > >
operator==(const Vector<P_numtype1>& d1, operator==(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_Equal<P_numtype1, int> > T_expr; _bz_Equal<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> == TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> == TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<P_numtype1, P_numtype2 > > > _bz_Equal<P_numtype1, P_numtype2 > > >
operator==(const Vector<P_numtype1>& d1, operator==(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<P_numtype1, P_numtype2> > T_expr; _bz_Equal<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> == int // Vector<P_numtype1> == int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Equal<P_numtype1, int > > > _bz_Equal<P_numtype1, int > > >
operator==(const Vector<P_numtype1>& d1, operator==(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Equal<P_numtype1, int> > T_expr; _bz_Equal<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Vector<P_numtype1> == float // Vector<P_numtype1> == float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Equal<P_numtype1, float > > > _bz_Equal<P_numtype1, float > > >
operator==(const Vector<P_numtype1>& d1, operator==(const Vector<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Equal<P_numtype1, float> > T_expr; _bz_Equal<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// Vector<P_numtype1> == double // Vector<P_numtype1> == double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Equal<P_numtype1, double > > > _bz_Equal<P_numtype1, double > > >
operator==(const Vector<P_numtype1>& d1, operator==(const Vector<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Equal<P_numtype1, double> > T_expr; _bz_Equal<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// Vector<P_numtype1> == long double // Vector<P_numtype1> == long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Equal<P_numtype1, long double > > > _bz_Equal<P_numtype1, long double > > >
operator==(const Vector<P_numtype1>& d1, operator==(const Vector<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Equal<P_numtype1, long double> > T_expr; _bz_Equal<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> == complex<T2> // Vector<P_numtype1> == complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Equal<P_numtype1, complex<T2> > > > _bz_Equal<P_numtype1, complex<T2> > > >
operator==(const Vector<P_numtype1>& d1, operator==(const Vector<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Equal<P_numtype1, complex<T2> > > T_expr; _bz_Equal<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> == Vector<P_numtype2> // _bz_VecExpr<P_expr1> == Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Equal<typename P_expr1::T_numtype, P_numtype2 > > >
operator==(_bz_VecExpr<P_expr1> d1, operator==(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Equal<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> == _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> == _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_nu mtype > > > _bz_Equal<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator==(_bz_VecExpr<P_expr1> d1, operator==(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_nu mtype> > T_expr; _bz_Equal<typename P_expr1::T_numtype, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> == VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> == VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Equal<typename P_expr1::T_numtype, P_numtype2 > > >
operator==(_bz_VecExpr<P_expr1> d1, operator==(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Equal<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> == Range // _bz_VecExpr<P_expr1> == Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Equal<_bz_typename P_expr1::T_numtype, int > > > _bz_Equal<typename P_expr1::T_numtype, int > > >
operator==(_bz_VecExpr<P_expr1> d1, operator==(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_Equal<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Equal<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> == TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> == TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_Equal<typename P_expr1::T_numtype, P_numtype2 > > >
operator==(_bz_VecExpr<P_expr1> d1, operator==(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_Equal<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> == int // _bz_VecExpr<P_expr1> == int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Equal<_bz_typename P_expr1::T_numtype, int > > > _bz_Equal<typename P_expr1::T_numtype, int > > >
operator==(_bz_VecExpr<P_expr1> d1, operator==(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Equal<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_Equal<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> == float // _bz_VecExpr<P_expr1> == float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Equal<_bz_typename P_expr1::T_numtype, float > > > _bz_Equal<typename P_expr1::T_numtype, float > > >
operator==(_bz_VecExpr<P_expr1> d1, operator==(_bz_VecExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Equal<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_Equal<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// _bz_VecExpr<P_expr1> == double // _bz_VecExpr<P_expr1> == double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Equal<_bz_typename P_expr1::T_numtype, double > > > _bz_Equal<typename P_expr1::T_numtype, double > > >
operator==(_bz_VecExpr<P_expr1> d1, operator==(_bz_VecExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Equal<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_Equal<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// _bz_VecExpr<P_expr1> == long double // _bz_VecExpr<P_expr1> == long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Equal<_bz_typename P_expr1::T_numtype, long double > > > _bz_Equal<typename P_expr1::T_numtype, long double > > >
operator==(_bz_VecExpr<P_expr1> d1, operator==(_bz_VecExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Equal<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_Equal<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> == complex<T2> // _bz_VecExpr<P_expr1> == complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Equal<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_Equal<typename P_expr1::T_numtype, complex<T2> > > >
operator==(_bz_VecExpr<P_expr1> d1, operator==(_bz_VecExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Equal<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_Equal<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> == Vector<P_numtype2> // VectorPick<P_numtype1> == Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2 > > > _bz_Equal<P_numtype1, P_numtype2 > > >
operator==(const VectorPick<P_numtype1>& d1, operator==(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2> > T_expr; _bz_Equal<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> == _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> == _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Equal<P_numtype1, typename P_expr2::T_numtype > > >
operator==(const VectorPick<P_numtype1>& d1, operator==(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> == VectorPick<P_numtype2> // VectorPick<P_numtype1> == VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2 > > > _bz_Equal<P_numtype1, P_numtype2 > > >
operator==(const VectorPick<P_numtype1>& d1, operator==(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2> > T_expr; _bz_Equal<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> == Range // VectorPick<P_numtype1> == Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Equal<P_numtype1, int > > > _bz_Equal<P_numtype1, int > > >
operator==(const VectorPick<P_numtype1>& d1, operator==(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_Equal<P_numtype1, int> > T_expr; _bz_Equal<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> == TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> == TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<P_numtype1, P_numtype2 > > > _bz_Equal<P_numtype1, P_numtype2 > > >
operator==(const VectorPick<P_numtype1>& d1, operator==(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<P_numtype1, P_numtype2> > T_expr; _bz_Equal<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> == int // VectorPick<P_numtype1> == int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Equal<P_numtype1, int > > > _bz_Equal<P_numtype1, int > > >
operator==(const VectorPick<P_numtype1>& d1, operator==(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Equal<P_numtype1, int> > T_expr; _bz_Equal<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> == float // VectorPick<P_numtype1> == float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Equal<P_numtype1, float > > > _bz_Equal<P_numtype1, float > > >
operator==(const VectorPick<P_numtype1>& d1, operator==(const VectorPick<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Equal<P_numtype1, float> > T_expr; _bz_Equal<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// VectorPick<P_numtype1> == double // VectorPick<P_numtype1> == double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Equal<P_numtype1, double > > > _bz_Equal<P_numtype1, double > > >
operator==(const VectorPick<P_numtype1>& d1, operator==(const VectorPick<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Equal<P_numtype1, double> > T_expr; _bz_Equal<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// VectorPick<P_numtype1> == long double // VectorPick<P_numtype1> == long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Equal<P_numtype1, long double > > > _bz_Equal<P_numtype1, long double > > >
operator==(const VectorPick<P_numtype1>& d1, operator==(const VectorPick<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Equal<P_numtype1, long double> > T_expr; _bz_Equal<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> == complex<T2> // VectorPick<P_numtype1> == complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Equal<P_numtype1, complex<T2> > > > _bz_Equal<P_numtype1, complex<T2> > > >
operator==(const VectorPick<P_numtype1>& d1, operator==(const VectorPick<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Equal<P_numtype1, complex<T2> > > T_expr; _bz_Equal<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// Range == Vector<P_numtype2> // Range == Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<int, P_numtype2 > > > _bz_Equal<int, P_numtype2 > > >
operator==(Range d1, operator==(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<int, P_numtype2> > T_expr; _bz_Equal<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range == _bz_VecExpr<P_expr2> // Range == _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<int, _bz_typename P_expr2::T_numtype > > > _bz_Equal<int, typename P_expr2::T_numtype > > >
operator==(Range d1, operator==(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range == VectorPick<P_numtype2> // Range == VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<int, P_numtype2 > > > _bz_Equal<int, P_numtype2 > > >
operator==(Range d1, operator==(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<int, P_numtype2> > T_expr; _bz_Equal<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range == Range // Range == Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_Equal<int, int > > > _bz_Equal<int, int > > >
operator==(Range d1, operator==(Range d1,
Range d2) Range d2)
skipping to change at line 14177 skipping to change at line 14174
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<int, P_numtype2 > > > _bz_Equal<int, P_numtype2 > > >
operator==(Range d1, operator==(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<int, P_numtype2> > T_expr; _bz_Equal<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range == float // Range == float
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Equal<int, float > > > _bz_Equal<int, float > > >
operator==(Range d1, operator==(Range d1,
float d2) float d2)
skipping to change at line 14263 skipping to change at line 14260
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2 > > > _bz_Equal<P_numtype1, P_numtype2 > > >
operator==(const TinyVector<P_numtype1, N_length1>& d1, operator==(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2> > T_expr; _bz_Equal<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> == _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> == _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_Equal<P_numtype1, typename P_expr2::T_numtype > > >
operator==(const TinyVector<P_numtype1, N_length1>& d1, operator==(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> == VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> == VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2 > > > _bz_Equal<P_numtype1, P_numtype2 > > >
operator==(const TinyVector<P_numtype1, N_length1>& d1, operator==(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<P_numtype1, P_numtype2> > T_expr; _bz_Equal<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> == Range // TinyVector<P_numtype1, N_length1> == Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Equal<P_numtype1, int > > > _bz_Equal<P_numtype1, int > > >
operator==(const TinyVector<P_numtype1, N_length1>& d1, operator==(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_Equal<P_numtype1, int> > T_expr; _bz_Equal<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> == TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> == TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<P_numtype1, P_numtype2 > > > _bz_Equal<P_numtype1, P_numtype2 > > >
operator==(const TinyVector<P_numtype1, N_length1>& d1, operator==(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<P_numtype1, P_numtype2> > T_expr; _bz_Equal<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> == int // TinyVector<P_numtype1, N_length1> == int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Equal<P_numtype1, int > > > _bz_Equal<P_numtype1, int > > >
operator==(const TinyVector<P_numtype1, N_length1>& d1, operator==(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_Equal<P_numtype1, int> > T_expr; _bz_Equal<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// TinyVector<P_numtype1, N_length1> == float // TinyVector<P_numtype1, N_length1> == float
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Equal<P_numtype1, float > > > _bz_Equal<P_numtype1, float > > >
operator==(const TinyVector<P_numtype1, N_length1>& d1, operator==(const TinyVector<P_numtype1, N_length1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_Equal<P_numtype1, float> > T_expr; _bz_Equal<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// TinyVector<P_numtype1, N_length1> == double // TinyVector<P_numtype1, N_length1> == double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Equal<P_numtype1, double > > > _bz_Equal<P_numtype1, double > > >
operator==(const TinyVector<P_numtype1, N_length1>& d1, operator==(const TinyVector<P_numtype1, N_length1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_Equal<P_numtype1, double> > T_expr; _bz_Equal<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// TinyVector<P_numtype1, N_length1> == long double // TinyVector<P_numtype1, N_length1> == long double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Equal<P_numtype1, long double > > > _bz_Equal<P_numtype1, long double > > >
operator==(const TinyVector<P_numtype1, N_length1>& d1, operator==(const TinyVector<P_numtype1, N_length1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_Equal<P_numtype1, long double> > T_expr; _bz_Equal<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> == complex<T2> // TinyVector<P_numtype1, N_length1> == complex<T2>
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Equal<P_numtype1, complex<T2> > > > _bz_Equal<P_numtype1, complex<T2> > > >
operator==(const TinyVector<P_numtype1, N_length1>& d1, operator==(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_Equal<P_numtype1, complex<T2> > > T_expr; _bz_Equal<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int == Vector<P_numtype2> // int == Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<int, P_numtype2 > > > _bz_Equal<int, P_numtype2 > > >
operator==(int d1, operator==(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<int, P_numtype2> > T_expr; _bz_Equal<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int == _bz_VecExpr<P_expr2> // int == _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<int, _bz_typename P_expr2::T_numtype > > > _bz_Equal<int, typename P_expr2::T_numtype > > >
operator==(int d1, operator==(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int == VectorPick<P_numtype2> // int == VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<int, P_numtype2 > > > _bz_Equal<int, P_numtype2 > > >
operator==(int d1, operator==(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<int, P_numtype2> > T_expr; _bz_Equal<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int == TinyVector<P_numtype2, N_length2> // int == TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<int, P_numtype2 > > > _bz_Equal<int, P_numtype2 > > >
operator==(int d1, operator==(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<int, P_numtype2> > T_expr; _bz_Equal<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// float == Vector<P_numtype2> // float == Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<float, P_numtype2 > > > _bz_Equal<float, P_numtype2 > > >
operator==(float d1, operator==(float d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<float, P_numtype2> > T_expr; _bz_Equal<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float == _bz_VecExpr<P_expr2> // float == _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<float, _bz_typename P_expr2::T_numtype > > > _bz_Equal<float, typename P_expr2::T_numtype > > >
operator==(float d1, operator==(float d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2)); d2));
} }
// float == VectorPick<P_numtype2> // float == VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<float, P_numtype2 > > > _bz_Equal<float, P_numtype2 > > >
operator==(float d1, operator==(float d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<float, P_numtype2> > T_expr; _bz_Equal<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float == Range // float == Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range, Range,
_bz_Equal<float, int > > > _bz_Equal<float, int > > >
operator==(float d1, operator==(float d1,
Range d2) Range d2)
skipping to change at line 14572 skipping to change at line 14569
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<float, P_numtype2 > > > _bz_Equal<float, P_numtype2 > > >
operator==(float d1, operator==(float d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<float, P_numtype2> > T_expr; _bz_Equal<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// double == Vector<P_numtype2> // double == Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<double, P_numtype2 > > > _bz_Equal<double, P_numtype2 > > >
operator==(double d1, operator==(double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<double, P_numtype2> > T_expr; _bz_Equal<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double == _bz_VecExpr<P_expr2> // double == _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<double, _bz_typename P_expr2::T_numtype > > > _bz_Equal<double, typename P_expr2::T_numtype > > >
operator==(double d1, operator==(double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2)); d2));
} }
// double == VectorPick<P_numtype2> // double == VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<double, P_numtype2 > > > _bz_Equal<double, P_numtype2 > > >
operator==(double d1, operator==(double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<double, P_numtype2> > T_expr; _bz_Equal<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double == Range // double == Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range, Range,
_bz_Equal<double, int > > > _bz_Equal<double, int > > >
operator==(double d1, operator==(double d1,
Range d2) Range d2)
skipping to change at line 14657 skipping to change at line 14654
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<double, P_numtype2 > > > _bz_Equal<double, P_numtype2 > > >
operator==(double d1, operator==(double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<double, P_numtype2> > T_expr; _bz_Equal<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double == Vector<P_numtype2> // long double == Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<long double, P_numtype2 > > > _bz_Equal<long double, P_numtype2 > > >
operator==(long double d1, operator==(long double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<long double, P_numtype2> > T_expr; _bz_Equal<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double == _bz_VecExpr<P_expr2> // long double == _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<long double, _bz_typename P_expr2::T_numtype > > > _bz_Equal<long double, typename P_expr2::T_numtype > > >
operator==(long double d1, operator==(long double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2)); d2));
} }
// long double == VectorPick<P_numtype2> // long double == VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<long double, P_numtype2 > > > _bz_Equal<long double, P_numtype2 > > >
operator==(long double d1, operator==(long double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<long double, P_numtype2> > T_expr; _bz_Equal<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double == Range // long double == Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range, Range,
_bz_Equal<long double, int > > > _bz_Equal<long double, int > > >
operator==(long double d1, operator==(long double d1,
Range d2) Range d2)
skipping to change at line 14742 skipping to change at line 14739
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<long double, P_numtype2 > > > _bz_Equal<long double, P_numtype2 > > >
operator==(long double d1, operator==(long double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<long double, P_numtype2> > T_expr; _bz_Equal<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> == Vector<P_numtype2> // complex<T1> == Vector<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<complex<T1> , P_numtype2 > > > _bz_Equal<complex<T1> , P_numtype2 > > >
operator==(complex<T1> d1, operator==(complex<T1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_Equal<complex<T1> , P_numtype2> > T_expr; _bz_Equal<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> == _bz_VecExpr<P_expr2> // complex<T1> == _bz_VecExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_Equal<complex<T1> , typename P_expr2::T_numtype > > >
operator==(complex<T1> d1, operator==(complex<T1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_Equal<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_Equal<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> == VectorPick<P_numtype2> // complex<T1> == VectorPick<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
skipping to change at line 14800 skipping to change at line 14797
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<complex<T1> , P_numtype2 > > > _bz_Equal<complex<T1> , P_numtype2 > > >
operator==(complex<T1> d1, operator==(complex<T1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_Equal<complex<T1> , P_numtype2> > T_expr; _bz_Equal<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> == Range // complex<T1> == Range
template<class T1> template<class T1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range, Range,
skipping to change at line 14840 skipping to change at line 14837
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<complex<T1> , P_numtype2 > > > _bz_Equal<complex<T1> , P_numtype2 > > >
operator==(complex<T1> d1, operator==(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Equal<complex<T1> , P_numtype2> > T_expr; _bz_Equal<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Not-equal operators * Not-equal operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> != Vector<P_numtype2> // Vector<P_numtype1> != Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2 > > > _bz_NotEqual<P_numtype1, P_numtype2 > > >
operator!=(const Vector<P_numtype1>& d1, operator!=(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2> > T_expr; _bz_NotEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> != _bz_VecExpr<P_expr2> // Vector<P_numtype1> != _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator!=(const Vector<P_numtype1>& d1, operator!=(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> != VectorPick<P_numtype2> // Vector<P_numtype1> != VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2 > > > _bz_NotEqual<P_numtype1, P_numtype2 > > >
operator!=(const Vector<P_numtype1>& d1, operator!=(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2> > T_expr; _bz_NotEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> != Range // Vector<P_numtype1> != Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_NotEqual<P_numtype1, int > > > _bz_NotEqual<P_numtype1, int > > >
operator!=(const Vector<P_numtype1>& d1, operator!=(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_NotEqual<P_numtype1, int> > T_expr; _bz_NotEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> != TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> != TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<P_numtype1, P_numtype2 > > > _bz_NotEqual<P_numtype1, P_numtype2 > > >
operator!=(const Vector<P_numtype1>& d1, operator!=(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<P_numtype1, P_numtype2> > T_expr; _bz_NotEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> != int // Vector<P_numtype1> != int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_NotEqual<P_numtype1, int > > > _bz_NotEqual<P_numtype1, int > > >
operator!=(const Vector<P_numtype1>& d1, operator!=(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_NotEqual<P_numtype1, int> > T_expr; _bz_NotEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Vector<P_numtype1> != float // Vector<P_numtype1> != float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_NotEqual<P_numtype1, float > > > _bz_NotEqual<P_numtype1, float > > >
operator!=(const Vector<P_numtype1>& d1, operator!=(const Vector<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_NotEqual<P_numtype1, float> > T_expr; _bz_NotEqual<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// Vector<P_numtype1> != double // Vector<P_numtype1> != double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_NotEqual<P_numtype1, double > > > _bz_NotEqual<P_numtype1, double > > >
operator!=(const Vector<P_numtype1>& d1, operator!=(const Vector<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_NotEqual<P_numtype1, double> > T_expr; _bz_NotEqual<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// Vector<P_numtype1> != long double // Vector<P_numtype1> != long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_NotEqual<P_numtype1, long double > > > _bz_NotEqual<P_numtype1, long double > > >
operator!=(const Vector<P_numtype1>& d1, operator!=(const Vector<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_NotEqual<P_numtype1, long double> > T_expr; _bz_NotEqual<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> != complex<T2> // Vector<P_numtype1> != complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_NotEqual<P_numtype1, complex<T2> > > > _bz_NotEqual<P_numtype1, complex<T2> > > >
operator!=(const Vector<P_numtype1>& d1, operator!=(const Vector<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_NotEqual<P_numtype1, complex<T2> > > T_expr; _bz_NotEqual<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> != Vector<P_numtype2> // _bz_VecExpr<P_expr1> != Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_NotEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator!=(_bz_VecExpr<P_expr1> d1, operator!=(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> != _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> != _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype > > > _bz_NotEqual<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > >
operator!=(_bz_VecExpr<P_expr1> d1, operator!=(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T _numtype> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, typename P_expr2::T_numtype > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> != VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> != VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_NotEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator!=(_bz_VecExpr<P_expr1> d1, operator!=(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> != Range // _bz_VecExpr<P_expr1> != Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, int > > > _bz_NotEqual<typename P_expr1::T_numtype, int > > >
operator!=(_bz_VecExpr<P_expr1> d1, operator!=(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> != TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> != TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_NotEqual<typename P_expr1::T_numtype, P_numtype2 > > >
operator!=(_bz_VecExpr<P_expr1> d1, operator!=(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> != int // _bz_VecExpr<P_expr1> != int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, int > > > _bz_NotEqual<typename P_expr1::T_numtype, int > > >
operator!=(_bz_VecExpr<P_expr1> d1, operator!=(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> != float // _bz_VecExpr<P_expr1> != float
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, float > > > _bz_NotEqual<typename P_expr1::T_numtype, float > > >
operator!=(_bz_VecExpr<P_expr1> d1, operator!=(_bz_VecExpr<P_expr1> d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, float> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// _bz_VecExpr<P_expr1> != double // _bz_VecExpr<P_expr1> != double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, double > > > _bz_NotEqual<typename P_expr1::T_numtype, double > > >
operator!=(_bz_VecExpr<P_expr1> d1, operator!=(_bz_VecExpr<P_expr1> d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, double> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// _bz_VecExpr<P_expr1> != long double // _bz_VecExpr<P_expr1> != long double
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, long double > > > _bz_NotEqual<typename P_expr1::T_numtype, long double > > >
operator!=(_bz_VecExpr<P_expr1> d1, operator!=(_bz_VecExpr<P_expr1> d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, long double> > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> != complex<T2> // _bz_VecExpr<P_expr1> != complex<T2>
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > > _bz_NotEqual<typename P_expr1::T_numtype, complex<T2> > > >
operator!=(_bz_VecExpr<P_expr1> d1, operator!=(_bz_VecExpr<P_expr1> d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_NotEqual<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr; _bz_NotEqual<typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> != Vector<P_numtype2> // VectorPick<P_numtype1> != Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2 > > > _bz_NotEqual<P_numtype1, P_numtype2 > > >
operator!=(const VectorPick<P_numtype1>& d1, operator!=(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2> > T_expr; _bz_NotEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> != _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> != _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator!=(const VectorPick<P_numtype1>& d1, operator!=(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> != VectorPick<P_numtype2> // VectorPick<P_numtype1> != VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2 > > > _bz_NotEqual<P_numtype1, P_numtype2 > > >
operator!=(const VectorPick<P_numtype1>& d1, operator!=(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2> > T_expr; _bz_NotEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> != Range // VectorPick<P_numtype1> != Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_NotEqual<P_numtype1, int > > > _bz_NotEqual<P_numtype1, int > > >
operator!=(const VectorPick<P_numtype1>& d1, operator!=(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_NotEqual<P_numtype1, int> > T_expr; _bz_NotEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> != TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> != TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<P_numtype1, P_numtype2 > > > _bz_NotEqual<P_numtype1, P_numtype2 > > >
operator!=(const VectorPick<P_numtype1>& d1, operator!=(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<P_numtype1, P_numtype2> > T_expr; _bz_NotEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> != int // VectorPick<P_numtype1> != int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_NotEqual<P_numtype1, int > > > _bz_NotEqual<P_numtype1, int > > >
operator!=(const VectorPick<P_numtype1>& d1, operator!=(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_NotEqual<P_numtype1, int> > T_expr; _bz_NotEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> != float // VectorPick<P_numtype1> != float
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_NotEqual<P_numtype1, float > > > _bz_NotEqual<P_numtype1, float > > >
operator!=(const VectorPick<P_numtype1>& d1, operator!=(const VectorPick<P_numtype1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_NotEqual<P_numtype1, float> > T_expr; _bz_NotEqual<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// VectorPick<P_numtype1> != double // VectorPick<P_numtype1> != double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_NotEqual<P_numtype1, double > > > _bz_NotEqual<P_numtype1, double > > >
operator!=(const VectorPick<P_numtype1>& d1, operator!=(const VectorPick<P_numtype1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_NotEqual<P_numtype1, double> > T_expr; _bz_NotEqual<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// VectorPick<P_numtype1> != long double // VectorPick<P_numtype1> != long double
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_NotEqual<P_numtype1, long double > > > _bz_NotEqual<P_numtype1, long double > > >
operator!=(const VectorPick<P_numtype1>& d1, operator!=(const VectorPick<P_numtype1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_NotEqual<P_numtype1, long double> > T_expr; _bz_NotEqual<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> != complex<T2> // VectorPick<P_numtype1> != complex<T2>
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_NotEqual<P_numtype1, complex<T2> > > > _bz_NotEqual<P_numtype1, complex<T2> > > >
operator!=(const VectorPick<P_numtype1>& d1, operator!=(const VectorPick<P_numtype1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_NotEqual<P_numtype1, complex<T2> > > T_expr; _bz_NotEqual<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// Range != Vector<P_numtype2> // Range != Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<int, P_numtype2 > > > _bz_NotEqual<int, P_numtype2 > > >
operator!=(Range d1, operator!=(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<int, P_numtype2> > T_expr; _bz_NotEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range != _bz_VecExpr<P_expr2> // Range != _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<int, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<int, typename P_expr2::T_numtype > > >
operator!=(Range d1, operator!=(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range != VectorPick<P_numtype2> // Range != VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<int, P_numtype2 > > > _bz_NotEqual<int, P_numtype2 > > >
operator!=(Range d1, operator!=(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<int, P_numtype2> > T_expr; _bz_NotEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range != Range // Range != Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_NotEqual<int, int > > > _bz_NotEqual<int, int > > >
operator!=(Range d1, operator!=(Range d1,
Range d2) Range d2)
skipping to change at line 15446 skipping to change at line 15443
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<int, P_numtype2 > > > _bz_NotEqual<int, P_numtype2 > > >
operator!=(Range d1, operator!=(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<int, P_numtype2> > T_expr; _bz_NotEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range != float // Range != float
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_NotEqual<int, float > > > _bz_NotEqual<int, float > > >
operator!=(Range d1, operator!=(Range d1,
float d2) float d2)
skipping to change at line 15532 skipping to change at line 15529
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2 > > > _bz_NotEqual<P_numtype1, P_numtype2 > > >
operator!=(const TinyVector<P_numtype1, N_length1>& d1, operator!=(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2> > T_expr; _bz_NotEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> != _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> != _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<P_numtype1, typename P_expr2::T_numtype > > >
operator!=(const TinyVector<P_numtype1, N_length1>& d1, operator!=(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> != VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> != VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2 > > > _bz_NotEqual<P_numtype1, P_numtype2 > > >
operator!=(const TinyVector<P_numtype1, N_length1>& d1, operator!=(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<P_numtype1, P_numtype2> > T_expr; _bz_NotEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> != Range // TinyVector<P_numtype1, N_length1> != Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_NotEqual<P_numtype1, int > > > _bz_NotEqual<P_numtype1, int > > >
operator!=(const TinyVector<P_numtype1, N_length1>& d1, operator!=(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_NotEqual<P_numtype1, int> > T_expr; _bz_NotEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> != TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> != TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<P_numtype1, P_numtype2 > > > _bz_NotEqual<P_numtype1, P_numtype2 > > >
operator!=(const TinyVector<P_numtype1, N_length1>& d1, operator!=(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<P_numtype1, P_numtype2> > T_expr; _bz_NotEqual<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> != int // TinyVector<P_numtype1, N_length1> != int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_NotEqual<P_numtype1, int > > > _bz_NotEqual<P_numtype1, int > > >
operator!=(const TinyVector<P_numtype1, N_length1>& d1, operator!=(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_NotEqual<P_numtype1, int> > T_expr; _bz_NotEqual<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// TinyVector<P_numtype1, N_length1> != float // TinyVector<P_numtype1, N_length1> != float
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_NotEqual<P_numtype1, float > > > _bz_NotEqual<P_numtype1, float > > >
operator!=(const TinyVector<P_numtype1, N_length1>& d1, operator!=(const TinyVector<P_numtype1, N_length1>& d1,
float d2) float d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_NotEqual<P_numtype1, float> > T_expr; _bz_NotEqual<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2))); _bz_VecExprConstant<float>(d2)));
} }
// TinyVector<P_numtype1, N_length1> != double // TinyVector<P_numtype1, N_length1> != double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_NotEqual<P_numtype1, double > > > _bz_NotEqual<P_numtype1, double > > >
operator!=(const TinyVector<P_numtype1, N_length1>& d1, operator!=(const TinyVector<P_numtype1, N_length1>& d1,
double d2) double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_NotEqual<P_numtype1, double> > T_expr; _bz_NotEqual<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2))); _bz_VecExprConstant<double>(d2)));
} }
// TinyVector<P_numtype1, N_length1> != long double // TinyVector<P_numtype1, N_length1> != long double
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_NotEqual<P_numtype1, long double > > > _bz_NotEqual<P_numtype1, long double > > >
operator!=(const TinyVector<P_numtype1, N_length1>& d1, operator!=(const TinyVector<P_numtype1, N_length1>& d1,
long double d2) long double d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_NotEqual<P_numtype1, long double> > T_expr; _bz_NotEqual<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2))); _bz_VecExprConstant<long double>(d2)));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// TinyVector<P_numtype1, N_length1> != complex<T2> // TinyVector<P_numtype1, N_length1> != complex<T2>
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_NotEqual<P_numtype1, complex<T2> > > > _bz_NotEqual<P_numtype1, complex<T2> > > >
operator!=(const TinyVector<P_numtype1, N_length1>& d1, operator!=(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2) complex<T2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_NotEqual<P_numtype1, complex<T2> > > T_expr; _bz_NotEqual<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2))); _bz_VecExprConstant<complex<T2> > (d2)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// int != Vector<P_numtype2> // int != Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<int, P_numtype2 > > > _bz_NotEqual<int, P_numtype2 > > >
operator!=(int d1, operator!=(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<int, P_numtype2> > T_expr; _bz_NotEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int != _bz_VecExpr<P_expr2> // int != _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<int, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<int, typename P_expr2::T_numtype > > >
operator!=(int d1, operator!=(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int != VectorPick<P_numtype2> // int != VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<int, P_numtype2 > > > _bz_NotEqual<int, P_numtype2 > > >
operator!=(int d1, operator!=(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<int, P_numtype2> > T_expr; _bz_NotEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int != TinyVector<P_numtype2, N_length2> // int != TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<int, P_numtype2 > > > _bz_NotEqual<int, P_numtype2 > > >
operator!=(int d1, operator!=(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<int, P_numtype2> > T_expr; _bz_NotEqual<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// float != Vector<P_numtype2> // float != Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<float, P_numtype2 > > > _bz_NotEqual<float, P_numtype2 > > >
operator!=(float d1, operator!=(float d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<float, P_numtype2> > T_expr; _bz_NotEqual<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float != _bz_VecExpr<P_expr2> // float != _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<float, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<float, typename P_expr2::T_numtype > > >
operator!=(float d1, operator!=(float d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<float, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<float, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2)); d2));
} }
// float != VectorPick<P_numtype2> // float != VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<float, P_numtype2 > > > _bz_NotEqual<float, P_numtype2 > > >
operator!=(float d1, operator!=(float d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<float, P_numtype2> > T_expr; _bz_NotEqual<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// float != Range // float != Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>,
Range, Range,
_bz_NotEqual<float, int > > > _bz_NotEqual<float, int > > >
operator!=(float d1, operator!=(float d1,
Range d2) Range d2)
skipping to change at line 15841 skipping to change at line 15838
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<float, P_numtype2 > > > _bz_NotEqual<float, P_numtype2 > > >
operator!=(float d1, operator!=(float d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, typedef _bz_VecExprOp<_bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<float, P_numtype2> > T_expr; _bz_NotEqual<float, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1),
d2.begin())); d2.beginFast()));
} }
// double != Vector<P_numtype2> // double != Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<double, P_numtype2 > > > _bz_NotEqual<double, P_numtype2 > > >
operator!=(double d1, operator!=(double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<double, P_numtype2> > T_expr; _bz_NotEqual<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double != _bz_VecExpr<P_expr2> // double != _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<double, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<double, typename P_expr2::T_numtype > > >
operator!=(double d1, operator!=(double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2)); d2));
} }
// double != VectorPick<P_numtype2> // double != VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<double, P_numtype2 > > > _bz_NotEqual<double, P_numtype2 > > >
operator!=(double d1, operator!=(double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<double, P_numtype2> > T_expr; _bz_NotEqual<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// double != Range // double != Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>,
Range, Range,
_bz_NotEqual<double, int > > > _bz_NotEqual<double, int > > >
operator!=(double d1, operator!=(double d1,
Range d2) Range d2)
skipping to change at line 15926 skipping to change at line 15923
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<double, P_numtype2 > > > _bz_NotEqual<double, P_numtype2 > > >
operator!=(double d1, operator!=(double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, typedef _bz_VecExprOp<_bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<double, P_numtype2> > T_expr; _bz_NotEqual<double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double != Vector<P_numtype2> // long double != Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<long double, P_numtype2 > > > _bz_NotEqual<long double, P_numtype2 > > >
operator!=(long double d1, operator!=(long double d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<long double, P_numtype2> > T_expr; _bz_NotEqual<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double != _bz_VecExpr<P_expr2> // long double != _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<long double, _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<long double, typename P_expr2::T_numtype > > >
operator!=(long double d1, operator!=(long double d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<long double, _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<long double, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2)); d2));
} }
// long double != VectorPick<P_numtype2> // long double != VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<long double, P_numtype2 > > > _bz_NotEqual<long double, P_numtype2 > > >
operator!=(long double d1, operator!=(long double d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<long double, P_numtype2> > T_expr; _bz_NotEqual<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
// long double != Range // long double != Range
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>,
Range, Range,
_bz_NotEqual<long double, int > > > _bz_NotEqual<long double, int > > >
operator!=(long double d1, operator!=(long double d1,
Range d2) Range d2)
skipping to change at line 16011 skipping to change at line 16008
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<long double, P_numtype2 > > > _bz_NotEqual<long double, P_numtype2 > > >
operator!=(long double d1, operator!=(long double d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, typedef _bz_VecExprOp<_bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<long double, P_numtype2> > T_expr; _bz_NotEqual<long double, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.begin())); d2.beginFast()));
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> != Vector<P_numtype2> // complex<T1> != Vector<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<complex<T1> , P_numtype2 > > > _bz_NotEqual<complex<T1> , P_numtype2 > > >
operator!=(complex<T1> d1, operator!=(complex<T1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_NotEqual<complex<T1> , P_numtype2> > T_expr; _bz_NotEqual<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> != _bz_VecExpr<P_expr2> // complex<T1> != _bz_VecExpr<P_expr2>
template<class T1, class P_expr2> template<class T1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<complex<T1> , _bz_typename P_expr2::T_numtype > > > _bz_NotEqual<complex<T1> , typename P_expr2::T_numtype > > >
operator!=(complex<T1> d1, operator!=(complex<T1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_NotEqual<complex<T1> , _bz_typename P_expr2::T_numtype> > T_expr; _bz_NotEqual<complex<T1> , typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2)); d2));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> != VectorPick<P_numtype2> // complex<T1> != VectorPick<P_numtype2>
template<class T1, class P_numtype2> template<class T1, class P_numtype2>
skipping to change at line 16069 skipping to change at line 16066
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<complex<T1> , P_numtype2 > > > _bz_NotEqual<complex<T1> , P_numtype2 > > >
operator!=(complex<T1> d1, operator!=(complex<T1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_NotEqual<complex<T1> , P_numtype2> > T_expr; _bz_NotEqual<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
// complex<T1> != Range // complex<T1> != Range
template<class T1> template<class T1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range, Range,
skipping to change at line 16109 skipping to change at line 16106
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<complex<T1> , P_numtype2 > > > _bz_NotEqual<complex<T1> , P_numtype2 > > >
operator!=(complex<T1> d1, operator!=(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_NotEqual<complex<T1> , P_numtype2> > T_expr; _bz_NotEqual<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1 ),
d2.begin())); d2.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
/************************************************************************** ** /************************************************************************** **
* Logical AND operators * Logical AND operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> && Vector<P_numtype2> // Vector<P_numtype1> && Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2 > > > _bz_LogicalAnd<P_numtype1, P_numtype2 > > >
operator&&(const Vector<P_numtype1>& d1, operator&&(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr; _bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> && _bz_VecExpr<P_expr2> // Vector<P_numtype1> && _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LogicalAnd<P_numtype1, typename P_expr2::T_numtype > > >
operator&&(const Vector<P_numtype1>& d1, operator&&(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalAnd<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> && VectorPick<P_numtype2> // Vector<P_numtype1> && VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2 > > > _bz_LogicalAnd<P_numtype1, P_numtype2 > > >
operator&&(const Vector<P_numtype1>& d1, operator&&(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr; _bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> && Range // Vector<P_numtype1> && Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_LogicalAnd<P_numtype1, int > > > _bz_LogicalAnd<P_numtype1, int > > >
operator&&(const Vector<P_numtype1>& d1, operator&&(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_LogicalAnd<P_numtype1, int> > T_expr; _bz_LogicalAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> && TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> && TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<P_numtype1, P_numtype2 > > > _bz_LogicalAnd<P_numtype1, P_numtype2 > > >
operator&&(const Vector<P_numtype1>& d1, operator&&(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr; _bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> && int // Vector<P_numtype1> && int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalAnd<P_numtype1, int > > > _bz_LogicalAnd<P_numtype1, int > > >
operator&&(const Vector<P_numtype1>& d1, operator&&(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalAnd<P_numtype1, int> > T_expr; _bz_LogicalAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> && Vector<P_numtype2> // _bz_VecExpr<P_expr1> && Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LogicalAnd<typename P_expr1::T_numtype, P_numtype2 > > >
operator&&(_bz_VecExpr<P_expr1> d1, operator&&(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_LogicalAnd<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> && _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> && _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype > > > _bz_LogicalAnd<typename P_expr1::T_numtype, typename P_expr2::T_numty pe > > >
operator&&(_bz_VecExpr<P_expr1> d1, operator&&(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2: :T_numtype> > T_expr; _bz_LogicalAnd<typename P_expr1::T_numtype, typename P_expr2::T_numty pe> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> && VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> && VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LogicalAnd<typename P_expr1::T_numtype, P_numtype2 > > >
operator&&(_bz_VecExpr<P_expr1> d1, operator&&(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_LogicalAnd<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> && Range // _bz_VecExpr<P_expr1> && Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, int > > > _bz_LogicalAnd<typename P_expr1::T_numtype, int > > >
operator&&(_bz_VecExpr<P_expr1> d1, operator&&(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_LogicalAnd<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> && TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> && TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LogicalAnd<typename P_expr1::T_numtype, P_numtype2 > > >
operator&&(_bz_VecExpr<P_expr1> d1, operator&&(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_LogicalAnd<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> && int // _bz_VecExpr<P_expr1> && int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, int > > > _bz_LogicalAnd<typename P_expr1::T_numtype, int > > >
operator&&(_bz_VecExpr<P_expr1> d1, operator&&(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalAnd<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_LogicalAnd<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> && Vector<P_numtype2> // VectorPick<P_numtype1> && Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2 > > > _bz_LogicalAnd<P_numtype1, P_numtype2 > > >
operator&&(const VectorPick<P_numtype1>& d1, operator&&(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr; _bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> && _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> && _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LogicalAnd<P_numtype1, typename P_expr2::T_numtype > > >
operator&&(const VectorPick<P_numtype1>& d1, operator&&(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalAnd<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> && VectorPick<P_numtype2> // VectorPick<P_numtype1> && VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2 > > > _bz_LogicalAnd<P_numtype1, P_numtype2 > > >
operator&&(const VectorPick<P_numtype1>& d1, operator&&(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr; _bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> && Range // VectorPick<P_numtype1> && Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_LogicalAnd<P_numtype1, int > > > _bz_LogicalAnd<P_numtype1, int > > >
operator&&(const VectorPick<P_numtype1>& d1, operator&&(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_LogicalAnd<P_numtype1, int> > T_expr; _bz_LogicalAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> && TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> && TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<P_numtype1, P_numtype2 > > > _bz_LogicalAnd<P_numtype1, P_numtype2 > > >
operator&&(const VectorPick<P_numtype1>& d1, operator&&(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr; _bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> && int // VectorPick<P_numtype1> && int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalAnd<P_numtype1, int > > > _bz_LogicalAnd<P_numtype1, int > > >
operator&&(const VectorPick<P_numtype1>& d1, operator&&(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalAnd<P_numtype1, int> > T_expr; _bz_LogicalAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Range && Vector<P_numtype2> // Range && Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<int, P_numtype2 > > > _bz_LogicalAnd<int, P_numtype2 > > >
operator&&(Range d1, operator&&(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<int, P_numtype2> > T_expr; _bz_LogicalAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range && _bz_VecExpr<P_expr2> // Range && _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<int, _bz_typename P_expr2::T_numtype > > > _bz_LogicalAnd<int, typename P_expr2::T_numtype > > >
operator&&(Range d1, operator&&(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalAnd<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range && VectorPick<P_numtype2> // Range && VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<int, P_numtype2 > > > _bz_LogicalAnd<int, P_numtype2 > > >
operator&&(Range d1, operator&&(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<int, P_numtype2> > T_expr; _bz_LogicalAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range && Range // Range && Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_LogicalAnd<int, int > > > _bz_LogicalAnd<int, int > > >
operator&&(Range d1, operator&&(Range d1,
Range d2) Range d2)
skipping to change at line 16505 skipping to change at line 16502
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<int, P_numtype2 > > > _bz_LogicalAnd<int, P_numtype2 > > >
operator&&(Range d1, operator&&(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<int, P_numtype2> > T_expr; _bz_LogicalAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> && Vector<P_numtype2> // TinyVector<P_numtype1, N_length1> && Vector<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2 > > > _bz_LogicalAnd<P_numtype1, P_numtype2 > > >
operator&&(const TinyVector<P_numtype1, N_length1>& d1, operator&&(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr; _bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> && _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> && _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LogicalAnd<P_numtype1, typename P_expr2::T_numtype > > >
operator&&(const TinyVector<P_numtype1, N_length1>& d1, operator&&(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalAnd<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> && VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> && VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2 > > > _bz_LogicalAnd<P_numtype1, P_numtype2 > > >
operator&&(const TinyVector<P_numtype1, N_length1>& d1, operator&&(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr; _bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> && Range // TinyVector<P_numtype1, N_length1> && Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_LogicalAnd<P_numtype1, int > > > _bz_LogicalAnd<P_numtype1, int > > >
operator&&(const TinyVector<P_numtype1, N_length1>& d1, operator&&(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_LogicalAnd<P_numtype1, int> > T_expr; _bz_LogicalAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> && TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> && TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<P_numtype1, P_numtype2 > > > _bz_LogicalAnd<P_numtype1, P_numtype2 > > >
operator&&(const TinyVector<P_numtype1, N_length1>& d1, operator&&(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr; _bz_LogicalAnd<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> && int // TinyVector<P_numtype1, N_length1> && int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalAnd<P_numtype1, int > > > _bz_LogicalAnd<P_numtype1, int > > >
operator&&(const TinyVector<P_numtype1, N_length1>& d1, operator&&(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalAnd<P_numtype1, int> > T_expr; _bz_LogicalAnd<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// int && Vector<P_numtype2> // int && Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<int, P_numtype2 > > > _bz_LogicalAnd<int, P_numtype2 > > >
operator&&(int d1, operator&&(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalAnd<int, P_numtype2> > T_expr; _bz_LogicalAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int && _bz_VecExpr<P_expr2> // int && _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<int, _bz_typename P_expr2::T_numtype > > > _bz_LogicalAnd<int, typename P_expr2::T_numtype > > >
operator&&(int d1, operator&&(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalAnd<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalAnd<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int && VectorPick<P_numtype2> // int && VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<int, P_numtype2 > > > _bz_LogicalAnd<int, P_numtype2 > > >
operator&&(int d1, operator&&(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalAnd<int, P_numtype2> > T_expr; _bz_LogicalAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int && TinyVector<P_numtype2, N_length2> // int && TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<int, P_numtype2 > > > _bz_LogicalAnd<int, P_numtype2 > > >
operator&&(int d1, operator&&(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalAnd<int, P_numtype2> > T_expr; _bz_LogicalAnd<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* Logical OR operators * Logical OR operators
************************************************************************** **/ ************************************************************************** **/
// Vector<P_numtype1> || Vector<P_numtype2> // Vector<P_numtype1> || Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2 > > > _bz_LogicalOr<P_numtype1, P_numtype2 > > >
operator||(const Vector<P_numtype1>& d1, operator||(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2> > T_expr; _bz_LogicalOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> || _bz_VecExpr<P_expr2> // Vector<P_numtype1> || _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LogicalOr<P_numtype1, typename P_expr2::T_numtype > > >
operator||(const Vector<P_numtype1>& d1, operator||(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalOr<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> || VectorPick<P_numtype2> // Vector<P_numtype1> || VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2 > > > _bz_LogicalOr<P_numtype1, P_numtype2 > > >
operator||(const Vector<P_numtype1>& d1, operator||(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2> > T_expr; _bz_LogicalOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> || Range // Vector<P_numtype1> || Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_LogicalOr<P_numtype1, int > > > _bz_LogicalOr<P_numtype1, int > > >
operator||(const Vector<P_numtype1>& d1, operator||(const Vector<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range, Range,
_bz_LogicalOr<P_numtype1, int> > T_expr; _bz_LogicalOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// Vector<P_numtype1> || TinyVector<P_numtype2, N_length2> // Vector<P_numtype1> || TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<P_numtype1, P_numtype2 > > > _bz_LogicalOr<P_numtype1, P_numtype2 > > >
operator||(const Vector<P_numtype1>& d1, operator||(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<P_numtype1, P_numtype2> > T_expr; _bz_LogicalOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// Vector<P_numtype1> || int // Vector<P_numtype1> || int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalOr<P_numtype1, int > > > _bz_LogicalOr<P_numtype1, int > > >
operator||(const Vector<P_numtype1>& d1, operator||(const Vector<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalOr<P_numtype1, int> > T_expr; _bz_LogicalOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// _bz_VecExpr<P_expr1> || Vector<P_numtype2> // _bz_VecExpr<P_expr1> || Vector<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LogicalOr<typename P_expr1::T_numtype, P_numtype2 > > >
operator||(_bz_VecExpr<P_expr1> d1, operator||(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_LogicalOr<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> || _bz_VecExpr<P_expr2> // _bz_VecExpr<P_expr1> || _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype > > > _bz_LogicalOr<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e > > >
operator||(_bz_VecExpr<P_expr1> d1, operator||(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2:: T_numtype> > T_expr; _bz_LogicalOr<typename P_expr1::T_numtype, typename P_expr2::T_numtyp e> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> || VectorPick<P_numtype2> // _bz_VecExpr<P_expr1> || VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LogicalOr<typename P_expr1::T_numtype, P_numtype2 > > >
operator||(_bz_VecExpr<P_expr1> d1, operator||(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_LogicalOr<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> || Range // _bz_VecExpr<P_expr1> || Range
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, int > > > _bz_LogicalOr<typename P_expr1::T_numtype, int > > >
operator||(_bz_VecExpr<P_expr1> d1, operator||(_bz_VecExpr<P_expr1> d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_LogicalOr<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// _bz_VecExpr<P_expr1> || TinyVector<P_numtype2, N_length2> // _bz_VecExpr<P_expr1> || TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, P_numtype2 > > > _bz_LogicalOr<typename P_expr1::T_numtype, P_numtype2 > > >
operator||(_bz_VecExpr<P_expr1> d1, operator||(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr; _bz_LogicalOr<typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// _bz_VecExpr<P_expr1> || int // _bz_VecExpr<P_expr1> || int
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, int > > > _bz_LogicalOr<typename P_expr1::T_numtype, int > > >
operator||(_bz_VecExpr<P_expr1> d1, operator||(_bz_VecExpr<P_expr1> d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalOr<_bz_typename P_expr1::T_numtype, int> > T_expr; _bz_LogicalOr<typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// VectorPick<P_numtype1> || Vector<P_numtype2> // VectorPick<P_numtype1> || Vector<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2 > > > _bz_LogicalOr<P_numtype1, P_numtype2 > > >
operator||(const VectorPick<P_numtype1>& d1, operator||(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2> > T_expr; _bz_LogicalOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> || _bz_VecExpr<P_expr2> // VectorPick<P_numtype1> || _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LogicalOr<P_numtype1, typename P_expr2::T_numtype > > >
operator||(const VectorPick<P_numtype1>& d1, operator||(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalOr<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> || VectorPick<P_numtype2> // VectorPick<P_numtype1> || VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2 > > > _bz_LogicalOr<P_numtype1, P_numtype2 > > >
operator||(const VectorPick<P_numtype1>& d1, operator||(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2> > T_expr; _bz_LogicalOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> || Range // VectorPick<P_numtype1> || Range
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_LogicalOr<P_numtype1, int > > > _bz_LogicalOr<P_numtype1, int > > >
operator||(const VectorPick<P_numtype1>& d1, operator||(const VectorPick<P_numtype1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_LogicalOr<P_numtype1, int> > T_expr; _bz_LogicalOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// VectorPick<P_numtype1> || TinyVector<P_numtype2, N_length2> // VectorPick<P_numtype1> || TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<P_numtype1, P_numtype2 > > > _bz_LogicalOr<P_numtype1, P_numtype2 > > >
operator||(const VectorPick<P_numtype1>& d1, operator||(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<P_numtype1, P_numtype2> > T_expr; _bz_LogicalOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// VectorPick<P_numtype1> || int // VectorPick<P_numtype1> || int
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalOr<P_numtype1, int > > > _bz_LogicalOr<P_numtype1, int > > >
operator||(const VectorPick<P_numtype1>& d1, operator||(const VectorPick<P_numtype1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalOr<P_numtype1, int> > T_expr; _bz_LogicalOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// Range || Vector<P_numtype2> // Range || Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<int, P_numtype2 > > > _bz_LogicalOr<int, P_numtype2 > > >
operator||(Range d1, operator||(Range d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<int, P_numtype2> > T_expr; _bz_LogicalOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range || _bz_VecExpr<P_expr2> // Range || _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<int, _bz_typename P_expr2::T_numtype > > > _bz_LogicalOr<int, typename P_expr2::T_numtype > > >
operator||(Range d1, operator||(Range d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalOr<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2)); d2));
} }
// Range || VectorPick<P_numtype2> // Range || VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<int, P_numtype2 > > > _bz_LogicalOr<int, P_numtype2 > > >
operator||(Range d1, operator||(Range d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<int, P_numtype2> > T_expr; _bz_LogicalOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// Range || Range // Range || Range
inline inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<_bz_VecExprOp<Range,
Range, Range,
_bz_LogicalOr<int, int > > > _bz_LogicalOr<int, int > > >
operator||(Range d1, operator||(Range d1,
Range d2) Range d2)
skipping to change at line 17069 skipping to change at line 17066
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<int, P_numtype2 > > > _bz_LogicalOr<int, P_numtype2 > > >
operator||(Range d1, operator||(Range d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<Range, typedef _bz_VecExprOp<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<int, P_numtype2> > T_expr; _bz_LogicalOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> || Vector<P_numtype2> // TinyVector<P_numtype1, N_length1> || Vector<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2 > > > _bz_LogicalOr<P_numtype1, P_numtype2 > > >
operator||(const TinyVector<P_numtype1, N_length1>& d1, operator||(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2> > T_expr; _bz_LogicalOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> || _bz_VecExpr<P_expr2> // TinyVector<P_numtype1, N_length1> || _bz_VecExpr<P_expr2>
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<P_numtype1, _bz_typename P_expr2::T_numtype > > > _bz_LogicalOr<P_numtype1, typename P_expr2::T_numtype > > >
operator||(const TinyVector<P_numtype1, N_length1>& d1, operator||(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalOr<P_numtype1, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> || VectorPick<P_numtype2> // TinyVector<P_numtype1, N_length1> || VectorPick<P_numtype2>
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2 > > > _bz_LogicalOr<P_numtype1, P_numtype2 > > >
operator||(const TinyVector<P_numtype1, N_length1>& d1, operator||(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<P_numtype1, P_numtype2> > T_expr; _bz_LogicalOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> || Range // TinyVector<P_numtype1, N_length1> || Range
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_LogicalOr<P_numtype1, int > > > _bz_LogicalOr<P_numtype1, int > > >
operator||(const TinyVector<P_numtype1, N_length1>& d1, operator||(const TinyVector<P_numtype1, N_length1>& d1,
Range d2) Range d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_LogicalOr<P_numtype1, int> > T_expr; _bz_LogicalOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2)); d2));
} }
// TinyVector<P_numtype1, N_length1> || TinyVector<P_numtype2, N_length2> // TinyVector<P_numtype1, N_length1> || TinyVector<P_numtype2, N_length2>
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<P_numtype1, P_numtype2 > > > _bz_LogicalOr<P_numtype1, P_numtype2 > > >
operator||(const TinyVector<P_numtype1, N_length1>& d1, operator||(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<P_numtype1, P_numtype2> > T_expr; _bz_LogicalOr<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin())); d2.beginFast()));
} }
// TinyVector<P_numtype1, N_length1> || int // TinyVector<P_numtype1, N_length1> || int
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalOr<P_numtype1, int > > > _bz_LogicalOr<P_numtype1, int > > >
operator||(const TinyVector<P_numtype1, N_length1>& d1, operator||(const TinyVector<P_numtype1, N_length1>& d1,
int d2) int d2)
{ {
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_LogicalOr<P_numtype1, int> > T_expr; _bz_LogicalOr<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2))); _bz_VecExprConstant<int>(d2)));
} }
// int || Vector<P_numtype2> // int || Vector<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<int, P_numtype2 > > > _bz_LogicalOr<int, P_numtype2 > > >
operator||(int d1, operator||(int d1,
const Vector<P_numtype2>& d2) const Vector<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_LogicalOr<int, P_numtype2> > T_expr; _bz_LogicalOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int || _bz_VecExpr<P_expr2> // int || _bz_VecExpr<P_expr2>
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<int, _bz_typename P_expr2::T_numtype > > > _bz_LogicalOr<int, typename P_expr2::T_numtype > > >
operator||(int d1, operator||(int d1,
_bz_VecExpr<P_expr2> d2) _bz_VecExpr<P_expr2> d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_LogicalOr<int, _bz_typename P_expr2::T_numtype> > T_expr; _bz_LogicalOr<int, typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2)); d2));
} }
// int || VectorPick<P_numtype2> // int || VectorPick<P_numtype2>
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<int, P_numtype2 > > > _bz_LogicalOr<int, P_numtype2 > > >
operator||(int d1, operator||(int d1,
const VectorPick<P_numtype2>& d2) const VectorPick<P_numtype2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_LogicalOr<int, P_numtype2> > T_expr; _bz_LogicalOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
// int || TinyVector<P_numtype2, N_length2> // int || TinyVector<P_numtype2, N_length2>
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<int, P_numtype2 > > > _bz_LogicalOr<int, P_numtype2 > > >
operator||(int d1, operator||(int d1,
const TinyVector<P_numtype2, N_length2>& d2) const TinyVector<P_numtype2, N_length2>& d2)
{ {
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, typedef _bz_VecExprOp<_bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_LogicalOr<int, P_numtype2> > T_expr; _bz_LogicalOr<int, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1),
d2.begin())); d2.beginFast()));
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif #endif
 End of changes. 1289 change blocks. 
1460 lines changed or deleted 1457 lines changed or added


 veccount.cc   veccount.cc 
/* /*
* $Id: veccount.cc,v 1.1.1.1 2000/06/19 12:26:12 tveldhui Exp $ * $Id: veccount.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: veccount.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/ */
#ifndef BZ_VECCOUNT_CC #ifndef BZ_VECCOUNT_CC
#define BZ_VECCOUNT_CC #define BZ_VECCOUNT_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/veccount.cc> must be included via <blitz/vecglobs.h> #error <blitz/veccount.cc> must be included via <blitz/vecglobs.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr> template<typename P_expr>
inline int _bz_vec_count(P_expr vector) inline int _bz_vec_count(P_expr vector)
{ {
int length = vector._bz_suggestLength(); int length = vector._bz_suggestLength();
int count = 0; int count = 0;
if (vector._bz_hasFastAccess()) if (vector._bz_hasFastAccess())
{ {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
if (vector._bz_fastAccess(i)) if (vector._bz_fastAccess(i))
++count; ++count;
} }
else { else {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
if (vector[i]) if (vector[i])
++count; ++count;
} }
return count; return count;
} }
template<class P_numtype> template<typename P_numtype>
inline int count(const Vector<P_numtype>& x) inline int count(const Vector<P_numtype>& x)
{ {
return _bz_vec_count(x._bz_asVecExpr()); return _bz_vec_count(x._bz_asVecExpr());
} }
template<class P_expr> template<typename P_expr>
inline int count(_bz_VecExpr<P_expr> expr) inline int count(_bz_VecExpr<P_expr> expr)
{ {
return _bz_vec_count(expr); return _bz_vec_count(expr);
} }
template<class P_numtype> template<typename P_numtype>
inline int count(const VectorPick<P_numtype>& x) inline int count(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_count(x._bz_asVecExpr()); return _bz_vec_count(x._bz_asVecExpr());
} }
template<class P_numtype, int N_dimensions> template<typename P_numtype, int N_dimensions>
inline int count(const TinyVector<P_numtype, N_dimensions>& x) inline int count(const TinyVector<P_numtype, N_dimensions>& x)
{ {
return _bz_vec_count(x._bz_asVecExpr()); return _bz_vec_count(x._bz_asVecExpr());
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECCOUNT_CC #endif // BZ_VECCOUNT_CC
 End of changes. 7 change blocks. 
16 lines changed or deleted 6 lines changed or added


 vecdelta.cc   vecdelta.cc 
/* /*
* $Id: vecdelta.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $ * $Id: vecdelta.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecdelta.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECDELTA_CC #ifndef BZ_VECDELTA_CC
#define BZ_VECDELTA_CC #define BZ_VECDELTA_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/vecdelta.cc> must be included via <blitz/vecglobs.h> #error <blitz/vecdelta.cc> must be included via <blitz/vecglobs.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P> template<typename P>
inline inline
Vector<BZ_DIFFTYPE(_bz_typename P::T_numtype)> _bz_vec_delta(P expr) Vector<BZ_DIFFTYPE(_bz_typename P::T_numtype)> _bz_vec_delta(P expr)
{ {
typedef _bz_typename P::T_numtype T_numtype; typedef _bz_typename P::T_numtype T_numtype;
typedef BZ_DIFFTYPE(T_numtype) T_difftype; typedef BZ_DIFFTYPE(T_numtype) T_difftype;
int length = expr._bz_suggestLength(); int length = expr._bz_suggestLength();
Vector<T_difftype> z(length); Vector<T_difftype> z(length);
T_numtype currentElement = 0; T_numtype currentElement = 0;
T_numtype previousElement = 0; T_numtype previousElement = 0;
skipping to change at line 65 skipping to change at line 52
{ {
currentElement = expr(i); currentElement = expr(i);
z[i] = currentElement - previousElement; z[i] = currentElement - previousElement;
previousElement = currentElement; previousElement = currentElement;
} }
} }
return z; return z;
} }
template<class P_numtype> template<typename P_numtype>
Vector<BZ_DIFFTYPE(P_numtype)> delta(const Vector<P_numtype>& x) Vector<BZ_DIFFTYPE(P_numtype)> delta(const Vector<P_numtype>& x)
{ {
return _bz_vec_delta(x); return _bz_vec_delta(x);
} }
// delta(expr) // delta(expr)
template<class P_expr> template<typename P_expr>
Vector<BZ_DIFFTYPE(_bz_typename P_expr::T_numtype)> delta(_bz_VecExpr<P_exp r> x) Vector<BZ_DIFFTYPE(_bz_typename P_expr::T_numtype)> delta(_bz_VecExpr<P_exp r> x)
{ {
return _bz_vec_delta(x); return _bz_vec_delta(x);
} }
// delta(vecpick) // delta(vecpick)
template<class P_numtype> template<typename P_numtype>
Vector<BZ_DIFFTYPE(P_numtype)> delta(const VectorPick<P_numtype>& x) Vector<BZ_DIFFTYPE(P_numtype)> delta(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_delta(x); return _bz_vec_delta(x);
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECDELTA_CC #endif // BZ_VECDELTA_CC
 End of changes. 6 change blocks. 
18 lines changed or deleted 5 lines changed or added


 vecdot.cc   vecdot.cc 
/* /*
* $Id: vecdot.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $ * $Id: vecdot.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecdot.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECDOT_CC #ifndef BZ_VECDOT_CC
#define BZ_VECDOT_CC #define BZ_VECDOT_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/vecdot.cc> must be included via <blitz/vecglobs.h> #error <blitz/vecdot.cc> must be included via <blitz/vecglobs.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P1, class P2> template<typename P1, typename P2>
inline inline
BZ_SUMTYPE(BZ_PROMOTE(_bz_typename P1::T_numtype, _bz_typename P2::T_numtyp e)) BZ_SUMTYPE(BZ_PROMOTE(_bz_typename P1::T_numtype, _bz_typename P2::T_numtyp e))
_bz_dot(P1 vector1, P2 vector2) _bz_dot(P1 vector1, P2 vector2)
{ {
BZPRECONDITION(vector1._bz_suggestLength() == vector2._bz_suggestLength ()); BZPRECONDITION(vector1._bz_suggestLength() == vector2._bz_suggestLength ());
typedef BZ_SUMTYPE(BZ_PROMOTE(_bz_typename P1::T_numtype, typedef BZ_SUMTYPE(BZ_PROMOTE(_bz_typename P1::T_numtype,
_bz_typename P2::T_numtype)) T_sumtype; _bz_typename P2::T_numtype)) T_sumtype;
T_sumtype sum = 0; T_sumtype sum = 0;
skipping to change at line 60 skipping to change at line 47
} }
else { else {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
sum += vector1[i] * vector2[i]; sum += vector1[i] * vector2[i];
} }
return sum; return sum;
} }
// dot() // dot()
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
inline inline
BZ_SUMTYPE(BZ_PROMOTE(P_numtype1,P_numtype2)) BZ_SUMTYPE(BZ_PROMOTE(P_numtype1,P_numtype2))
dot(const Vector<P_numtype1>& a, const Vector<P_numtype2>& b) dot(const Vector<P_numtype1>& a, const Vector<P_numtype2>& b)
{ {
return _bz_dot(a, b); return _bz_dot(a, b);
} }
// dot(expr,expr) // dot(expr,expr)
template<class P_expr1, class P_expr2> template<typename P_expr1, typename P_expr2>
inline inline
BZ_SUMTYPE(BZ_PROMOTE(_bz_typename P_expr1::T_numtype, BZ_SUMTYPE(BZ_PROMOTE(_bz_typename P_expr1::T_numtype,
_bz_typename P_expr2::T_numtype)) _bz_typename P_expr2::T_numtype))
dot(_bz_VecExpr<P_expr1> expr1, _bz_VecExpr<P_expr2> expr2) dot(_bz_VecExpr<P_expr1> expr1, _bz_VecExpr<P_expr2> expr2)
{ {
return _bz_dot(expr1, expr2); return _bz_dot(expr1, expr2);
} }
// dot(expr,vec) // dot(expr,vec)
template<class P_expr1, class P_numtype2> template<typename P_expr1, typename P_numtype2>
inline inline
BZ_SUMTYPE(BZ_PROMOTE(_bz_typename P_expr1::T_numtype, P_numtype2)) BZ_SUMTYPE(BZ_PROMOTE(_bz_typename P_expr1::T_numtype, P_numtype2))
dot(_bz_VecExpr<P_expr1> expr1, const Vector<P_numtype2>& vector2) dot(_bz_VecExpr<P_expr1> expr1, const Vector<P_numtype2>& vector2)
{ {
return _bz_dot(vector2, expr1); return _bz_dot(vector2, expr1);
} }
// dot(vec,expr) // dot(vec,expr)
template<class P_numtype1, class P_expr2> template<typename P_numtype1, typename P_expr2>
inline inline
BZ_SUMTYPE(BZ_PROMOTE(P_numtype1, _bz_typename P_expr2::T_numtype)) BZ_SUMTYPE(BZ_PROMOTE(P_numtype1, _bz_typename P_expr2::T_numtype))
dot(const Vector<P_numtype1>& vector1, _bz_VecExpr<P_expr2> expr2) dot(const Vector<P_numtype1>& vector1, _bz_VecExpr<P_expr2> expr2)
{ {
return _bz_dot(vector1, expr2); return _bz_dot(vector1, expr2);
} }
// dot(vec,vecpick) // dot(vec,vecpick)
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
inline inline
BZ_SUMTYPE(BZ_PROMOTE(P_numtype1, P_numtype2)) BZ_SUMTYPE(BZ_PROMOTE(P_numtype1, P_numtype2))
dot(const Vector<P_numtype1>& vector1, const VectorPick<P_numtype2>& vector 2) dot(const Vector<P_numtype1>& vector1, const VectorPick<P_numtype2>& vector 2)
{ {
return _bz_dot(vector1, vector2); return _bz_dot(vector1, vector2);
} }
// dot(vecpick,vec) // dot(vecpick,vec)
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
inline inline
BZ_SUMTYPE(BZ_PROMOTE(P_numtype1, P_numtype2)) BZ_SUMTYPE(BZ_PROMOTE(P_numtype1, P_numtype2))
dot(const VectorPick<P_numtype1>& vector1, const Vector<P_numtype2>& vector 2) dot(const VectorPick<P_numtype1>& vector1, const Vector<P_numtype2>& vector 2)
{ {
return _bz_dot(vector1, vector2); return _bz_dot(vector1, vector2);
} }
// dot(vecpick,vecpick) // dot(vecpick,vecpick)
template<class P_numtype1, class P_numtype2> template<typename P_numtype1, typename P_numtype2>
inline inline
BZ_SUMTYPE(BZ_PROMOTE(P_numtype1, P_numtype2)) BZ_SUMTYPE(BZ_PROMOTE(P_numtype1, P_numtype2))
dot(const VectorPick<P_numtype1>& vector1, const VectorPick<P_numtype2>& ve ctor2) dot(const VectorPick<P_numtype1>& vector1, const VectorPick<P_numtype2>& ve ctor2)
{ {
return _bz_dot(vector1, vector2); return _bz_dot(vector1, vector2);
} }
// dot(expr, vecpick) // dot(expr, vecpick)
template<class P_expr1, class P_numtype2> template<typename P_expr1, typename P_numtype2>
inline inline
BZ_SUMTYPE(BZ_PROMOTE(_bz_typename P_expr1::T_numtype, P_numtype2)) BZ_SUMTYPE(BZ_PROMOTE(_bz_typename P_expr1::T_numtype, P_numtype2))
dot(_bz_VecExpr<P_expr1> expr1, const VectorPick<P_numtype2>& vector2) dot(_bz_VecExpr<P_expr1> expr1, const VectorPick<P_numtype2>& vector2)
{ {
return _bz_dot(expr1, vector2); return _bz_dot(expr1, vector2);
} }
// dot(vecpick, expr) // dot(vecpick, expr)
template<class P_numtype1, class P_expr2> template<typename P_numtype1, typename P_expr2>
inline inline
BZ_SUMTYPE(BZ_PROMOTE(P_numtype1, _bz_typename P_expr2::T_numtype)) BZ_SUMTYPE(BZ_PROMOTE(P_numtype1, _bz_typename P_expr2::T_numtype))
dot(const VectorPick<P_numtype1>& vector1, _bz_VecExpr<P_expr2> expr2) dot(const VectorPick<P_numtype1>& vector1, _bz_VecExpr<P_expr2> expr2)
{ {
return _bz_dot(vector1, expr2); return _bz_dot(vector1, expr2);
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECDOT_CC #endif // BZ_VECDOT_CC
 End of changes. 12 change blocks. 
24 lines changed or deleted 11 lines changed or added


 vecexpr.h   vecexpr.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/vecexpr.h Vector<P_numtype> expression templates * blitz/vecexpr.h Vector<P_numtype> expression templates
* *
* $Id: vecexpr.h,v 1.5 2002/07/02 19:36:43 jcumming Exp $ * $Id: vecexpr.h,v 1.11 2005/10/06 23:30:51 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: vecexpr.h,v $
* Revision 1.5 2002/07/02 19:36:43 jcumming
* Undid the previous change to this file. Vector ET support is now gotten
* by including blitz/vector-et.h explicitly.
*
* Revision 1.4 2002/03/06 17:53:57 patricg
*
* (re)inserted includes for vecbops, vecuops and vecbfn
* in order to compile testsuite/tinyvec.cpp
*
* Revision 1.3 2001/01/24 22:51:50 tveldhui
* Reorganized #include orders to avoid including the huge Vector e.t.
* implementation when using Array.
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.6 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.5 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.4 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.3 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_VECEXPR_H #ifndef BZ_VECEXPR_H
#define BZ_VECEXPR_H #define BZ_VECEXPR_H
#ifndef BZ_VECTOR_H #include <blitz/vector.h>
#include <blitz/vector.h> #include <blitz/applics.h>
#endif #include <blitz/meta/metaprog.h>
#include <blitz/vecexprwrap.h> // _bz_VecExpr wrapper class
#ifndef BZ_APPLICS_H
#include <blitz/applics.h>
#endif
#ifndef BZ_META_METAPROG_H
#include <blitz/meta/metaprog.h>
#endif
#ifndef BZ_VECEXPRWRAP_H
#include <blitz/vecexprwrap.h> // _bz_VecExpr wrapper class
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr1, class P_expr2, class P_op> template<typename P_expr1, typename P_expr2, typename P_op>
class _bz_VecExprOp { class _bz_VecExprOp {
public: public:
typedef P_expr1 T_expr1; typedef P_expr1 T_expr1;
typedef P_expr2 T_expr2; typedef P_expr2 T_expr2;
typedef _bz_typename T_expr1::T_numtype T_numtype1; typedef _bz_typename T_expr1::T_numtype T_numtype1;
typedef _bz_typename T_expr2::T_numtype T_numtype2; typedef _bz_typename T_expr2::T_numtype T_numtype2;
typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype; typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype;
typedef P_op T_op; typedef P_op T_op;
skipping to change at line 124 skipping to change at line 77
T_numtype operator()(int i) const T_numtype operator()(int i) const
{ return T_op::apply(iter1_(i), iter2_(i)); } { return T_op::apply(iter1_(i), iter2_(i)); }
int length(int recommendedLength) const int length(int recommendedLength) const
{ {
BZPRECONDITION(iter2_.length(recommendedLength) == BZPRECONDITION(iter2_.length(recommendedLength) ==
iter1_.length(recommendedLength)); iter1_.length(recommendedLength));
return iter1_.length(recommendedLength); return iter1_.length(recommendedLength);
} }
enum { static const int
_bz_staticLengthCount = _bz_staticLengthCount = P_expr1::_bz_staticLengthCount
BZ_ENUM_CAST(P_expr1::_bz_staticLengthCount) + P_expr2::_bz_staticLengthCount,
+ BZ_ENUM_CAST(P_expr2::_bz_staticLengthCount), _bz_dynamicLengthCount = P_expr1::_bz_dynamicLengthCount
+ P_expr2::_bz_dynamicLengthCount,
_bz_dynamicLengthCount = _bz_staticLength =
BZ_ENUM_CAST(P_expr1::_bz_dynamicLengthCount) (P_expr1::_bz_staticLength > P_expr2::_bz_staticLength) ?
+ BZ_ENUM_CAST(P_expr2::_bz_dynamicLengthCount), P_expr1::_bz_staticLength : P_expr2::_bz_staticLength;
_bz_staticLength = (BZ_ENUM_CAST(P_expr1::_bz_staticLength) > BZ
_ENUM_CAST(P_expr2::_bz_staticLength)) ? BZ_ENUM_CAST(P_expr1::_bz_staticLe
ngth) : BZ_ENUM_CAST(P_expr2::_bz_staticLength)
// _bz_meta_max<P_expr1::_bz_staticLength, P_expr2::_bz_staticLength>: :max // _bz_meta_max<P_expr1::_bz_staticLength, P_expr2::_bz_staticLength>: :max
};
int _bz_suggestLength() const int _bz_suggestLength() const
{ {
int length1 = iter1_._bz_suggestLength(); int length1 = iter1_._bz_suggestLength();
if (length1 != 0) if (length1 != 0)
return length1; return length1;
return iter2_._bz_suggestLength(); return iter2_._bz_suggestLength();
} }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return iter1_._bz_hasFastAccess() && iter2_._bz_hasFastAccess(); } { return iter1_._bz_hasFastAccess() && iter2_._bz_hasFastAccess(); }
T_numtype _bz_fastAccess(int i) const T_numtype _bz_fastAccess(int i) const
{ {
return T_op::apply(iter1_._bz_fastAccess(i), return T_op::apply(iter1_._bz_fastAccess(i),
iter2_._bz_fastAccess(i)); iter2_._bz_fastAccess(i));
} }
private: private:
_bz_VecExprOp(); _bz_VecExprOp();
T_expr1 iter1_; T_expr1 iter1_;
T_expr2 iter2_; T_expr2 iter2_;
}; };
template<class P_expr, class P_unaryOp> template<typename P_expr, typename P_unaryOp>
class _bz_VecExprUnaryOp { class _bz_VecExprUnaryOp {
public: public:
typedef P_expr T_expr; typedef P_expr T_expr;
typedef P_unaryOp T_unaryOp; typedef P_unaryOp T_unaryOp;
typedef _bz_typename T_unaryOp::T_numtype T_numtype; typedef _bz_typename T_unaryOp::T_numtype T_numtype;
#ifdef BZ_PASS_EXPR_BY_VALUE #ifdef BZ_PASS_EXPR_BY_VALUE
_bz_VecExprUnaryOp(T_expr iter) _bz_VecExprUnaryOp(T_expr iter)
: iter_(iter) : iter_(iter)
skipping to change at line 195 skipping to change at line 145
T_numtype operator[](int i) const T_numtype operator[](int i) const
{ return T_unaryOp::apply(iter_[i]); } { return T_unaryOp::apply(iter_[i]); }
T_numtype operator()(int i) const T_numtype operator()(int i) const
{ return T_unaryOp::apply(iter_(i)); } { return T_unaryOp::apply(iter_(i)); }
int length(int recommendedLength) const int length(int recommendedLength) const
{ return iter_.length(recommendedLength); } { return iter_.length(recommendedLength); }
enum { _bz_staticLengthCount = BZ_ENUM_CAST(P_expr::_bz_staticLengthCou static const int
nt), _bz_staticLengthCount = P_expr::_bz_staticLengthCount,
_bz_dynamicLengthCount =BZ_ENUM_CAST(P_expr::_bz_dynamicLengthCo _bz_dynamicLengthCount = P_expr::_bz_dynamicLengthCount,
unt), _bz_staticLength = P_expr::_bz_staticLength;
_bz_staticLength = BZ_ENUM_CAST(P_expr::_bz_staticLength) };
int _bz_suggestLength() const int _bz_suggestLength() const
{ return iter_._bz_suggestLength(); } { return iter_._bz_suggestLength(); }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return iter_._bz_hasFastAccess(); } { return iter_._bz_hasFastAccess(); }
T_numtype _bz_fastAccess(int i) const T_numtype _bz_fastAccess(int i) const
{ return T_unaryOp::apply(iter_._bz_fastAccess(i)); } { return T_unaryOp::apply(iter_._bz_fastAccess(i)); }
private: private:
_bz_VecExprUnaryOp() { } _bz_VecExprUnaryOp() { }
T_expr iter_; T_expr iter_;
}; };
template<class P_numtype> template<typename P_numtype>
class _bz_VecExprConstant { class _bz_VecExprConstant {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
_bz_VecExprConstant(P_numtype value) _bz_VecExprConstant(P_numtype value)
: value_(BZ_NO_PROPAGATE(value)) : value_(BZ_NO_PROPAGATE(value))
{ {
} }
#ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
skipping to change at line 239 skipping to change at line 190
T_numtype operator[](int) const T_numtype operator[](int) const
{ return value_; } { return value_; }
T_numtype operator()(int) const T_numtype operator()(int) const
{ return value_; } { return value_; }
int length(int recommendedLength) const int length(int recommendedLength) const
{ return recommendedLength; } { return recommendedLength; }
enum { _bz_staticLengthCount = 0, static const int
_bz_dynamicLengthCount = 0, _bz_staticLengthCount = 0,
_bz_staticLength = 0 _bz_dynamicLengthCount = 0,
}; _bz_staticLength = 0;
int _bz_suggestLength() const int _bz_suggestLength() const
{ return 0; } { return 0; }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return 1; } { return 1; }
T_numtype _bz_fastAccess(int) const T_numtype _bz_fastAccess(int) const
{ return value_; } { return value_; }
private: private:
_bz_VecExprConstant() { } _bz_VecExprConstant() { }
T_numtype value_; T_numtype value_;
}; };
BZ_NAMESPACE_END
#ifndef BZ_TINYVEC_H
#include <blitz/tinyvec.h>
#endif
BZ_NAMESPACE(blitz)
// Some miscellaneous operators that don't seem to belong anywhere else. // Some miscellaneous operators that don't seem to belong anywhere else.
template<class P_expr> template<typename P_expr>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr>,
_bz_negate<_bz_typename P_expr::T_numtype> > > _bz_negate<_bz_typename P_expr::T_numtype> > >
operator-(_bz_VecExpr<P_expr> a) operator-(_bz_VecExpr<P_expr> a)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr>,
_bz_negate<_bz_typename P_expr::T_numtype> > T_expr; _bz_negate<_bz_typename P_expr::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(a)); return _bz_VecExpr<T_expr>(T_expr(a));
} }
template<class P_numtype> template<typename P_numtype>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype>,
_bz_negate<P_numtype> > > _bz_negate<P_numtype> > >
operator-(const Vector<P_numtype>& a) operator-(const Vector<P_numtype>& a)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype>,
_bz_negate<P_numtype> > T_expr; _bz_negate<P_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(a.begin())); return _bz_VecExpr<T_expr>(T_expr(a.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_negate<Range::T_numtype> > > _bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_negate<Range::T_numtype> > >
operator-(Range r) operator-(Range r)
{ {
typedef _bz_VecExprUnaryOp<Range, _bz_negate<Range::T_numtype> > T_expr ; typedef _bz_VecExprUnaryOp<Range, _bz_negate<Range::T_numtype> > T_expr ;
return _bz_VecExpr<T_expr>(T_expr(r)); return _bz_VecExpr<T_expr>(T_expr(r));
} }
// NEEDS_WORK: implement operator- for Range, VectorPick, TinyVector template<typename P_numtype>
inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype>,
_bz_negate<P_numtype> > >
operator-(const VectorPick<P_numtype>& a)
{
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype>,
_bz_negate<P_numtype> > T_expr;
BZ_NAMESPACE_END return _bz_VecExpr<T_expr>(T_expr(a.beginFast()));
}
#ifndef BZ_TINYVEC_H template<typename P_numtype, int N_length>
#include <blitz/tinyvec.h> inline
#endif _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype,N_length>,
_bz_negate<P_numtype> > >
operator-(const TinyVector<P_numtype,N_length>& a)
{
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype,N_length>,
_bz_negate<P_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(a.beginFast()));
}
BZ_NAMESPACE_END
#endif // BZ_VECEXPR_H #endif // BZ_VECEXPR_H
 End of changes. 21 change blocks. 
91 lines changed or deleted 64 lines changed or added


 vecexprwrap.h   vecexprwrap.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/vecexprwrap.h Vector expression templates wrapper class * blitz/vecexprwrap.h Vector expression templates wrapper class
* *
* $Id: vecexprwrap.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: vecexprwrap.h,v 1.5 2005/05/07 04:17:56 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: vecexprwrap.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:12 tveldhui
* Imported sources
*
* Revision 1.2 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
*/
#ifndef BZ_VECEXPRWRAP_H #ifndef BZ_VECEXPRWRAP_H
#define BZ_VECEXPRWRAP_H #define BZ_VECEXPRWRAP_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr> template<typename P_expr>
class _bz_VecExpr { class _bz_VecExpr {
public: public:
typedef P_expr T_expr; typedef P_expr T_expr;
typedef _bz_typename T_expr::T_numtype T_numtype; typedef _bz_typename T_expr::T_numtype T_numtype;
#ifdef BZ_PASS_EXPR_BY_VALUE #ifdef BZ_PASS_EXPR_BY_VALUE
_bz_VecExpr(T_expr a) _bz_VecExpr(T_expr a)
: iter_(a) : iter_(a)
{ } { }
skipping to change at line 81 skipping to change at line 68
T_numtype operator[](int i) const T_numtype operator[](int i) const
{ return iter_[i]; } { return iter_[i]; }
T_numtype operator()(int i) const T_numtype operator()(int i) const
{ return iter_(i); } { return iter_(i); }
int length(int recommendedLength) const int length(int recommendedLength) const
{ return iter_.length(recommendedLength); } { return iter_.length(recommendedLength); }
enum { _bz_staticLengthCount = BZ_ENUM_CAST(P_expr::_bz_staticLengthCou static const int
nt), _bz_staticLengthCount = P_expr::_bz_staticLengthCount,
_bz_dynamicLengthCount = BZ_ENUM_CAST(P_expr::_bz_dynamicLengthC _bz_dynamicLengthCount = P_expr::_bz_dynamicLengthCount,
ount), _bz_staticLength = P_expr::_bz_staticLength;
_bz_staticLength = BZ_ENUM_CAST(P_expr::_bz_staticLength) };
int _bz_suggestLength() const int _bz_suggestLength() const
{ return iter_._bz_suggestLength(); } { return iter_._bz_suggestLength(); }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return iter_._bz_hasFastAccess(); } { return iter_._bz_hasFastAccess(); }
T_numtype _bz_fastAccess(int i) const T_numtype _bz_fastAccess(int i) const
{ return iter_._bz_fastAccess(i); } { return iter_._bz_fastAccess(i); }
private: private:
_bz_VecExpr(); _bz_VecExpr();
T_expr iter_; T_expr iter_;
}; };
 End of changes. 6 change blocks. 
24 lines changed or deleted 10 lines changed or added


 vecglobs.cc   vecglobs.cc 
/* /*
* $Id: vecglobs.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $ * $Id: vecglobs.cc,v 1.2 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecglobs.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECGLOBS_CC #ifndef BZ_VECGLOBS_CC
#define BZ_VECGLOBS_CC #define BZ_VECGLOBS_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#include <blitz/vecglobs.h> #include <blitz/vecglobs.h>
#endif #endif
#include <blitz/vecaccum.cc> // accumulate() #include <blitz/vecaccum.cc> // accumulate()
 End of changes. 2 change blocks. 
11 lines changed or deleted 1 lines changed or added


 vecglobs.h   vecglobs.h 
/************************************************************************** * /************************************************************************** *
* blitz/vecglobs.h Global vector functions * blitz/vecglobs.h Global vector functions
* *
* $Id: vecglobs.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: vecglobs.h,v 1.3 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: vecglobs.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#define BZ_VECGLOBS_H #define BZ_VECGLOBS_H
#ifndef BZ_VECTOR_H #ifndef BZ_VECTOR_H
#include <blitz/vector.h> #include <blitz/vector.h>
#endif #endif
#ifndef BZ_NUMTRAIT_H #ifndef BZ_NUMTRAIT_H
#include <blitz/numtrait.h> #include <blitz/numtrait.h>
 End of changes. 2 change blocks. 
24 lines changed or deleted 3 lines changed or added


 vecio.cc   vecio.cc 
/* /*
* $Id: vecio.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $ * $Id: vecio.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecio.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.5 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.4 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.3 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECIO_CC #ifndef BZ_VECIO_CC
#define BZ_VECIO_CC #define BZ_VECIO_CC
#ifndef BZ_VECTOR_H #ifndef BZ_VECTOR_H
#include <blitz/vector.h> #include <blitz/vector.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// This version of operator<< is provided as a temporary measure // This version of operator<< is provided as a temporary measure
// only. It will be revised in a future release. // only. It will be revised in a future release.
// NEEDS_WORK // NEEDS_WORK
template<class P_numtype> template<typename P_numtype>
ostream& operator<<(ostream& os, const Vector<P_numtype>& x) ostream& operator<<(ostream& os, const Vector<P_numtype>& x)
{ {
os << "[ "; os << "[ ";
for (int i=0; i < x.length(); ++i) for (int i=0; i < x.length(); ++i)
{ {
os << setw(10) << x[i]; os << setw(10) << x[i];
if (!((i+1)%7)) if (!((i+1)%7))
os << endl << " "; os << endl << " ";
} }
os << " ]"; os << " ]";
return os; return os;
} }
template<class P_expr> template<typename P_expr>
ostream& operator<<(ostream& os, _bz_VecExpr<P_expr> expr) ostream& operator<<(ostream& os, _bz_VecExpr<P_expr> expr)
{ {
Vector<_bz_typename P_expr::T_numtype> result(expr); Vector<_bz_typename P_expr::T_numtype> result(expr);
os << result; os << result;
return os; return os;
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECIO_CC #endif // BZ_VECIO_CC
 End of changes. 4 change blocks. 
16 lines changed or deleted 3 lines changed or added


 veciter.h   veciter.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/veciter.h Iterator classes for Vector<P_numtype> * blitz/veciter.h Iterator classes for Vector<P_numtype>
* *
* $Id: veciter.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: veciter.h,v 1.5 2005/05/07 04:17:56 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: veciter.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.6 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.5 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.4 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.3 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_VECITER_H #ifndef BZ_VECITER_H
#define BZ_VECITER_H #define BZ_VECITER_H
#ifndef BZ_VECTOR_H #ifndef BZ_VECTOR_H
#error <blitz/veciter.h> should be included via <blitz/vector.h> #error <blitz/veciter.h> should be included via <blitz/vector.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Declaration of class VectorIter // Declaration of class VectorIter
template<class P_numtype> template<typename P_numtype>
class VectorIter { class VectorIter {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
_bz_explicit VectorIter(Vector<P_numtype>& x) explicit VectorIter(Vector<P_numtype>& x)
: data_(x.data()) : data_(x.data())
{ {
stride_ = x.stride(); stride_ = x.stride();
length_ = x.length(); length_ = x.length();
} }
VectorIter(P_numtype* _bz_restrict data, int stride, int length) VectorIter(P_numtype* restrict data, int stride, int length)
: data_(data), stride_(stride), length_(length) : data_(data), stride_(stride), length_(length)
{ } { }
#ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
VectorIter(const VectorIter<P_numtype>& x) VectorIter(const VectorIter<P_numtype>& x)
{ {
data_ = x.data_; data_ = x.data_;
stride_ = x.stride_; stride_ = x.stride_;
length_ = x.length_; length_ = x.length_;
} }
#endif #endif
P_numtype operator[](int i) const P_numtype operator[](int i) const
{ {
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
return data_[i*stride_]; return data_[i*stride_];
} }
P_numtype& _bz_restrict operator[](int i) P_numtype& restrict operator[](int i)
{ {
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
return data_[i*stride_]; return data_[i*stride_];
} }
P_numtype operator()(int i) const P_numtype operator()(int i) const
{ {
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
return data_[i*stride_]; return data_[i*stride_];
} }
P_numtype& _bz_restrict operator()(int i) P_numtype& restrict operator()(int i)
{ {
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
return data_[i*stride_]; return data_[i*stride_];
} }
P_numtype operator*() const P_numtype operator*() const
{ return *data_; } { return *data_; }
P_numtype& operator*() P_numtype& operator*()
{ return *data_; } { return *data_; }
VectorIter<P_numtype> operator+(int i) VectorIter<P_numtype> operator+(int i)
{ {
// NEEDS_WORK -- precondition checking? // NEEDS_WORK -- precondition checking?
return VectorIter<P_numtype>(data_+i*stride_, stride_, length_-i); return VectorIter<P_numtype>(data_+i*stride_, stride_, length_-i);
} }
int length(int) const int length(int) const
{ return length_; } { return length_; }
_bz_bool isUnitStride() const bool isUnitStride() const
{ return (stride_ == 1); } { return (stride_ == 1); }
///////////////////////////////////////////// /////////////////////////////////////////////
// Library-internal member functions // Library-internal member functions
// These are undocumented and may change or // These are undocumented and may change or
// disappear in future releases. // disappear in future releases.
///////////////////////////////////////////// /////////////////////////////////////////////
enum { _bz_staticLengthCount = 0, static const int
_bz_dynamicLengthCount = 1, _bz_staticLengthCount = 0,
_bz_staticLength = 0 }; _bz_dynamicLengthCount = 1,
_bz_staticLength = 0;
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return isUnitStride(); } { return isUnitStride(); }
P_numtype _bz_fastAccess(int i) const P_numtype _bz_fastAccess(int i) const
{ return data_[i]; } { return data_[i]; }
P_numtype& _bz_restrict _bz_fastAccess(int i) P_numtype& restrict _bz_fastAccess(int i)
{ return data_[i]; } { return data_[i]; }
int _bz_suggestLength() const int _bz_suggestLength() const
{ return length_; } { return length_; }
private: private:
VectorIter() { } VectorIter() { }
P_numtype * _bz_restrict data_; P_numtype * restrict data_;
int stride_; int stride_;
int length_; int length_;
}; };
template<class P_numtype> template<typename P_numtype>
class VectorIterConst { class VectorIterConst {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
_bz_explicit VectorIterConst(const Vector<P_numtype>& x) explicit VectorIterConst(const Vector<P_numtype>& x)
: data_(x.data()) : data_(x.data())
{ {
stride_ = x.stride(); stride_ = x.stride();
length_ = x.length(); length_ = x.length();
} }
#ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
VectorIterConst(const VectorIterConst<P_numtype>& x) VectorIterConst(const VectorIterConst<P_numtype>& x)
{ {
data_ = x.data_; data_ = x.data_;
skipping to change at line 192 skipping to change at line 170
P_numtype operator()(int i) const P_numtype operator()(int i) const
{ {
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
return data_[i*stride_]; return data_[i*stride_];
} }
int length(int) const int length(int) const
{ return length_; } { return length_; }
_bz_bool isUnitStride() const bool isUnitStride() const
{ return (stride_ == 1); } { return (stride_ == 1); }
///////////////////////////////////////////// /////////////////////////////////////////////
// Library-internal member functions // Library-internal member functions
// These are undocumented and may change or // These are undocumented and may change or
// disappear in future releases. // disappear in future releases.
///////////////////////////////////////////// /////////////////////////////////////////////
enum { _bz_staticLengthCount = 0, static const int
_bz_dynamicLengthCount = 1, _bz_staticLengthCount = 0,
_bz_staticLength = 0 }; _bz_dynamicLengthCount = 1,
_bz_staticLength = 0;
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return isUnitStride(); } { return isUnitStride(); }
P_numtype _bz_fastAccess(int i) const P_numtype _bz_fastAccess(int i) const
{ {
return data_[i]; return data_[i];
} }
int _bz_suggestLength() const int _bz_suggestLength() const
{ return length_; } { return length_; }
private: private:
const P_numtype * _bz_restrict data_; const P_numtype * restrict data_;
int stride_; int stride_;
int length_; int length_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECITER_H #endif // BZ_VECITER_H
 End of changes. 19 change blocks. 
47 lines changed or deleted 26 lines changed or added


 vecmax.cc   vecmax.cc 
/* /*
* $Id: vecmax.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $ * $Id: vecmax.cc,v 1.4 2005/06/02 18:56:52 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecmax.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECMAX_CC #ifndef BZ_VECMAX_CC
#define BZ_VECMAX_CC #define BZ_VECMAX_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/vecmax.cc> must be included via <blitz/vecglobs.h> #error <blitz/vecmax.cc> must be included via <blitz/vecglobs.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr> template<typename P_expr>
inline inline
Extremum<_bz_typename P_expr::T_numtype, int> _bz_vec_max(P_expr vector) Extremum<_bz_typename P_expr::T_numtype, int> _bz_vec_max(P_expr vector)
{ {
typedef _bz_typename P_expr::T_numtype T_numtype; typedef _bz_typename P_expr::T_numtype T_numtype;
T_numtype maxValue = vector(0); T_numtype maxValue = vector(0);
int maxIndex = 0; int maxIndex = 0;
int length = vector._bz_suggestLength(); int length = vector._bz_suggestLength();
if (vector._bz_hasFastAccess()) if (vector._bz_hasFastAccess())
skipping to change at line 70 skipping to change at line 57
maxValue = value; maxValue = value;
maxIndex = i; maxIndex = i;
} }
} }
} }
return Extremum<T_numtype, int>(maxValue, maxIndex); return Extremum<T_numtype, int>(maxValue, maxIndex);
} }
// max(vector) // max(vector)
template<class P_numtype> template<typename P_numtype>
inline inline
Extremum<P_numtype, int> max(const Vector<P_numtype>& x) Extremum<P_numtype, int> (max)(const Vector<P_numtype>& x)
{ {
return _bz_vec_max(x._bz_asVecExpr()); return _bz_vec_max(x._bz_asVecExpr());
} }
// max(expr) // max(expr)
template<class P_expr> template<typename P_expr>
inline inline
Extremum<_bz_typename P_expr::T_numtype,int> max(_bz_VecExpr<P_expr> x) Extremum<_bz_typename P_expr::T_numtype,int> (max)(_bz_VecExpr<P_expr> x)
{ {
return _bz_vec_max(x); return _bz_vec_max(x);
} }
// max(vecpick) // max(vecpick)
template<class P_numtype> template<typename P_numtype>
inline inline
Extremum<P_numtype, int> max(const VectorPick<P_numtype>& x) Extremum<P_numtype, int> (max)(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_max(x._bz_asVecExpr()); return _bz_vec_max(x._bz_asVecExpr());
} }
// max(TinyVector) // max(TinyVector)
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline inline
Extremum<P_numtype, int> Extremum<P_numtype, int> (max)(const TinyVector<P_numtype, N_length>& x)
max(const TinyVector<P_numtype, N_length>& x)
{ {
return _bz_vec_max(x._bz_asVecExpr()); return _bz_vec_max(x._bz_asVecExpr());
} }
// maxIndex(vector) // maxIndex(vector)
template<class P_numtype> template<typename P_numtype>
inline inline
int maxIndex(const Vector<P_numtype>& x) int maxIndex(const Vector<P_numtype>& x)
{ {
return _bz_vec_max(x).index(); return _bz_vec_max(x).index();
} }
// maxIndex(expr) // maxIndex(expr)
template<class P_expr> template<typename P_expr>
inline inline
int maxIndex(_bz_VecExpr<P_expr> x) int maxIndex(_bz_VecExpr<P_expr> x)
{ {
return _bz_vec_max(x._bz_asVecExpr()).index(); return _bz_vec_max(x._bz_asVecExpr()).index();
} }
// maxIndex(vecpick) // maxIndex(vecpick)
template<class P_numtype> template<typename P_numtype>
int maxIndex(const VectorPick<P_numtype>& x) int maxIndex(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_max(x._bz_asVecExpr()).index(); return _bz_vec_max(x._bz_asVecExpr()).index();
} }
// maxIndex(TinyVector) // maxIndex(TinyVector)
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
int maxIndex(const TinyVector<P_numtype, N_length>& x) int maxIndex(const TinyVector<P_numtype, N_length>& x)
{ {
return _bz_vec_max(x._bz_asVecExpr()).index(); return _bz_vec_max(x._bz_asVecExpr()).index();
} }
// maxValue(vector) // maxValue(vector)
template<class P_numtype> template<typename P_numtype>
inline inline
int maxValue(const Vector<P_numtype>& x) int maxValue(const Vector<P_numtype>& x)
{ {
return _bz_vec_max(x._bz_asVecExpr()).value(); return _bz_vec_max(x._bz_asVecExpr()).value();
} }
// maxValue(expr) // maxValue(expr)
template<class P_expr> template<typename P_expr>
inline inline
int maxValue(_bz_VecExpr<P_expr> x) int maxValue(_bz_VecExpr<P_expr> x)
{ {
return _bz_vec_max(x).value(); return _bz_vec_max(x).value();
} }
// maxValue(vecpick) // maxValue(vecpick)
template<class P_numtype> template<typename P_numtype>
int maxValue(const VectorPick<P_numtype>& x) int maxValue(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_max(x._bz_asVecExpr()).value(); return _bz_vec_max(x._bz_asVecExpr()).value();
} }
// maxValue(TinyVector) // maxValue(TinyVector)
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
int maxValue(const TinyVector<P_numtype, N_length>& x) int maxValue(const TinyVector<P_numtype, N_length>& x)
{ {
return _bz_vec_max(x._bz_asVecExpr()).value(); return _bz_vec_max(x._bz_asVecExpr()).value();
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECMAX_CC #endif // BZ_VECMAX_CC
 End of changes. 22 change blocks. 
39 lines changed or deleted 25 lines changed or added


 vecmin.cc   vecmin.cc 
/* /*
* $Id: vecmin.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $ * $Id: vecmin.cc,v 1.4 2005/06/02 18:56:08 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecmin.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECMIN_CC #ifndef BZ_VECMIN_CC
#define BZ_VECMIN_CC #define BZ_VECMIN_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/vecmin.cc> must be included via <blitz/vecglobs.h> #error <blitz/vecmin.cc> must be included via <blitz/vecglobs.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr> template<typename P_expr>
inline inline
Extremum<_bz_typename P_expr::T_numtype, int> _bz_vec_min(P_expr vector) Extremum<_bz_typename P_expr::T_numtype, int> _bz_vec_min(P_expr vector)
{ {
typedef _bz_typename P_expr::T_numtype T_numtype; typedef _bz_typename P_expr::T_numtype T_numtype;
T_numtype minValue = vector(0); T_numtype minValue = vector(0);
int minIndex = 0; int minIndex = 0;
int length = vector._bz_suggestLength(); int length = vector._bz_suggestLength();
if (vector._bz_hasFastAccess()) if (vector._bz_hasFastAccess())
skipping to change at line 70 skipping to change at line 57
minValue = value; minValue = value;
minIndex = i; minIndex = i;
} }
} }
} }
return Extremum<T_numtype, int>(minValue, minIndex); return Extremum<T_numtype, int>(minValue, minIndex);
} }
// min(vector) // min(vector)
template<class P_numtype> template<typename P_numtype>
inline inline
Extremum<P_numtype,int> min(const Vector<P_numtype>& x) Extremum<P_numtype,int> (min)(const Vector<P_numtype>& x)
{ {
return _bz_vec_min(x._bz_asVecExpr()); return _bz_vec_min(x._bz_asVecExpr());
} }
// min(expr) // min(expr)
template<class P_expr> template<typename P_expr>
inline inline
Extremum<_bz_typename P_expr::T_numtype,int> min(_bz_VecExpr<P_expr> x) Extremum<_bz_typename P_expr::T_numtype,int> (min)(_bz_VecExpr<P_expr> x)
{ {
return _bz_vec_min(x); return _bz_vec_min(x);
} }
// min(vecpick) // min(vecpick)
template<class P_numtype> template<typename P_numtype>
inline inline
Extremum<P_numtype, int> min(const VectorPick<P_numtype>& x) Extremum<P_numtype, int> (min)(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_min(x._bz_asVecExpr()); return _bz_vec_min(x._bz_asVecExpr());
} }
// min(TinyVector) // min(TinyVector)
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
inline inline
Extremum<P_numtype, int> min(const TinyVector<P_numtype, N_length>& x) Extremum<P_numtype, int> (min)(const TinyVector<P_numtype, N_length>& x)
{ {
return _bz_vec_min(x._bz_asVecExpr()); return _bz_vec_min(x._bz_asVecExpr());
} }
// minIndex(vector) // minIndex(vector)
template<class P_numtype> template<typename P_numtype>
inline inline
int minIndex(const Vector<P_numtype>& x) int minIndex(const Vector<P_numtype>& x)
{ {
return _bz_vec_min(x._bz_asVecExpr()).index(); return _bz_vec_min(x._bz_asVecExpr()).index();
} }
// maxIndex(expr) // maxIndex(expr)
template<class P_expr> template<typename P_expr>
inline inline
int minIndex(_bz_VecExpr<P_expr> x) int minIndex(_bz_VecExpr<P_expr> x)
{ {
return _bz_vec_min(x).index(); return _bz_vec_min(x).index();
} }
// minIndex(vecpick) // minIndex(vecpick)
template<class P_numtype> template<typename P_numtype>
int minIndex(const VectorPick<P_numtype>& x) int minIndex(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_min(x._bz_asVecExpr()).index(); return _bz_vec_min(x._bz_asVecExpr()).index();
} }
// minIndex(TinyVector) // minIndex(TinyVector)
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
int minIndex(const TinyVector<P_numtype, N_length>& x) int minIndex(const TinyVector<P_numtype, N_length>& x)
{ {
return _bz_vec_min(x._bz_asVecExpr()).index(); return _bz_vec_min(x._bz_asVecExpr()).index();
} }
// minValue(vector) // minValue(vector)
template<class P_numtype> template<typename P_numtype>
inline inline
int minValue(const Vector<P_numtype>& x) int minValue(const Vector<P_numtype>& x)
{ {
return _bz_vec_min(x._bz_asVecExpr()).value(); return _bz_vec_min(x._bz_asVecExpr()).value();
} }
// minValue(expr) // minValue(expr)
template<class P_expr> template<typename P_expr>
inline inline
int minValue(_bz_VecExpr<P_expr> x) int minValue(_bz_VecExpr<P_expr> x)
{ {
return _bz_vec_min(x).value(); return _bz_vec_min(x).value();
} }
// minValue(vecpick) // minValue(vecpick)
template<class P_numtype> template<typename P_numtype>
int minValue(const VectorPick<P_numtype>& x) int minValue(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_min(x._bz_asVecExpr()).value(); return _bz_vec_min(x._bz_asVecExpr()).value();
} }
// minValue(TinyVector) // minValue(TinyVector)
template<class P_numtype, int N_length> template<typename P_numtype, int N_length>
int minValue(const TinyVector<P_numtype, N_length>& x) int minValue(const TinyVector<P_numtype, N_length>& x)
{ {
return _bz_vec_min(x._bz_asVecExpr()).value(); return _bz_vec_min(x._bz_asVecExpr()).value();
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECMIN_CC #endif // BZ_VECMIN_CC
 End of changes. 23 change blocks. 
38 lines changed or deleted 25 lines changed or added


 vecnorm.cc   vecnorm.cc 
/* /*
* $Id: vecnorm.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $ * $Id: vecnorm.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecnorm.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.5 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.4 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.3 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECNORM_CC #ifndef BZ_VECNORM_CC
#define BZ_VECNORM_CC #define BZ_VECNORM_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/vecnorm.cc> must be included via <blitz/vecglobs.h> #error <blitz/vecnorm.cc> must be included via <blitz/vecglobs.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr> template<typename P_expr>
inline inline
BZ_FLOATTYPE(BZ_SUMTYPE(_bz_typename P_expr::T_numtype)) BZ_FLOATTYPE(BZ_SUMTYPE(_bz_typename P_expr::T_numtype))
_bz_vec_norm(P_expr vector) _bz_vec_norm(P_expr vector)
{ {
// An extreme use of traits here. It's necessary to // An extreme use of traits here. It's necessary to
// handle odd cases such as the norm of a Vector<char>. // handle odd cases such as the norm of a Vector<char>.
// To avoid overflow, BZ_SUMTYPE(char) is int. // To avoid overflow, BZ_SUMTYPE(char) is int.
// To take the sqrt of the sum, BZ_FLOATTYPE(char) is float. // To take the sqrt of the sum, BZ_FLOATTYPE(char) is float.
// So float is returned for Vector<char>. // So float is returned for Vector<char>.
typedef _bz_typename P_expr::T_numtype T_numtype; typedef _bz_typename P_expr::T_numtype T_numtype;
skipping to change at line 68 skipping to change at line 55
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
{ {
T_numtype value = vector(i); T_numtype value = vector(i);
sum += value * T_sumtype(value); sum += value * T_sumtype(value);
} }
} }
return _bz_sqrt<T_floattype>::apply(sum); return _bz_sqrt<T_floattype>::apply(sum);
} }
template<class P_numtype> template<typename P_numtype>
inline inline
BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) norm(const Vector<P_numtype>& x) BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) norm(const Vector<P_numtype>& x)
{ {
return _bz_vec_norm(x._bz_asVecExpr()); return _bz_vec_norm(x._bz_asVecExpr());
} }
// norm(expr) // norm(expr)
template<class P_expr> template<typename P_expr>
inline inline
BZ_FLOATTYPE(BZ_SUMTYPE(_bz_typename P_expr::T_numtype)) BZ_FLOATTYPE(BZ_SUMTYPE(_bz_typename P_expr::T_numtype))
norm(_bz_VecExpr<P_expr> expr) norm(_bz_VecExpr<P_expr> expr)
{ {
return _bz_vec_norm(expr); return _bz_vec_norm(expr);
} }
// norm(vecpick) // norm(vecpick)
template<class P_numtype> template<typename P_numtype>
inline inline
BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype))
norm(const VectorPick<P_numtype>& x) norm(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_norm(x._bz_asVecExpr()); return _bz_vec_norm(x._bz_asVecExpr());
} }
// norm(TinyVector) // norm(TinyVector)
template<class P_numtype, int N_dimensions> template<typename P_numtype, int N_dimensions>
inline inline
BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype))
norm(const TinyVector<P_numtype, N_dimensions>& x) norm(const TinyVector<P_numtype, N_dimensions>& x)
{ {
return _bz_vec_norm(x._bz_asVecExpr()); return _bz_vec_norm(x._bz_asVecExpr());
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECNORM_CC #endif // BZ_VECNORM_CC
 End of changes. 7 change blocks. 
19 lines changed or deleted 6 lines changed or added


 vecnorm1.cc   vecnorm1.cc 
/* /*
* $Id: vecnorm1.cc,v 1.1.1.1 2000/06/19 12:26:08 tveldhui Exp $ * $Id: vecnorm1.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecnorm1.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:08 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECNORM1_CC #ifndef BZ_VECNORM1_CC
#define BZ_VECNORM1_CC #define BZ_VECNORM1_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/vecnorm1.cc> must be included via <blitz/vecglobs.h> #error <blitz/vecnorm1.cc> must be included via <blitz/vecglobs.h>
#endif #endif
#include <blitz/applics.h> #include <blitz/applics.h>
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr> template<typename P_expr>
inline inline
BZ_SUMTYPE(_bz_typename P_expr::T_numtype) BZ_SUMTYPE(_bz_typename P_expr::T_numtype)
_bz_vec_norm1(P_expr vector) _bz_vec_norm1(P_expr vector)
{ {
typedef _bz_typename P_expr::T_numtype T_numtype; typedef _bz_typename P_expr::T_numtype T_numtype;
typedef BZ_SUMTYPE(T_numtype) T_sumtype; typedef BZ_SUMTYPE(T_numtype) T_sumtype;
T_sumtype sum = 0; T_sumtype sum = 0;
int length = vector._bz_suggestLength(); int length = vector._bz_suggestLength();
skipping to change at line 59 skipping to change at line 46
} }
else { else {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
sum += _bz_abs<T_numtype>::apply(vector(i)); sum += _bz_abs<T_numtype>::apply(vector(i));
} }
return sum; return sum;
} }
// norm1(vector) // norm1(vector)
template<class P_numtype> template<typename P_numtype>
BZ_SUMTYPE(P_numtype) norm1(const Vector<P_numtype>& x) BZ_SUMTYPE(P_numtype) norm1(const Vector<P_numtype>& x)
{ {
return _bz_vec_norm1(x._bz_asVecExpr()); return _bz_vec_norm1(x._bz_asVecExpr());
} }
// norm1(expr) // norm1(expr)
template<class P_expr> template<typename P_expr>
BZ_SUMTYPE(_bz_typename P_expr::T_numtype) norm1(_bz_VecExpr<P_expr> expr) BZ_SUMTYPE(_bz_typename P_expr::T_numtype) norm1(_bz_VecExpr<P_expr> expr)
{ {
return _bz_vec_norm1(expr); return _bz_vec_norm1(expr);
} }
// norm1(vecpick) // norm1(vecpick)
template<class P_numtype> template<typename P_numtype>
BZ_SUMTYPE(P_numtype) norm1(const VectorPick<P_numtype>& x) BZ_SUMTYPE(P_numtype) norm1(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_norm1(x._bz_asVecExpr()); return _bz_vec_norm1(x._bz_asVecExpr());
} }
// norm1(TinyVector) // norm1(TinyVector)
template<class P_numtype, int N_dimensions> template<typename P_numtype, int N_dimensions>
BZ_SUMTYPE(P_numtype) norm1(const TinyVector<P_numtype, N_dimensions>& x) BZ_SUMTYPE(P_numtype) norm1(const TinyVector<P_numtype, N_dimensions>& x)
{ {
return _bz_vec_norm1(x._bz_asVecExpr()); return _bz_vec_norm1(x._bz_asVecExpr());
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECNORM1_CC #endif // BZ_VECNORM1_CC
 End of changes. 7 change blocks. 
19 lines changed or deleted 6 lines changed or added


 vecpick.cc   vecpick.cc 
/* /*
* $Id: vecpick.cc,v 1.1.1.1 2000/06/19 12:26:09 tveldhui Exp $ * $Id: vecpick.cc,v 1.4 2005/10/06 23:29:34 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecpick.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.5 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.4 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.3 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECPICK_CC #ifndef BZ_VECPICK_CC
#define BZ_VECPICK_CC #define BZ_VECPICK_CC
#ifndef BZ_VECPICK_H #include <blitz/vecpick.h>
#include <blitz/vecpick.h> #include <blitz/update.h>
#endif #include <blitz/random.h>
#include <blitz/vecexpr.h>
#ifndef BZ_UPDATE_H
#include <blitz/update.h>
#endif
#ifndef BZ_RANDOM_H
#include <blitz/random.h>
#endif
#ifndef BZ_VECEXPR_H
#include <blitz/vecexpr.h>
#endif
#ifndef BZ_RANDOM_H
#include <blitz/random.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with vector expression operand * Assignment operators with vector expression operand
*/ */
template<class P_numtype> template<class P_expr, class P_updater> template<typename P_numtype> template<typename P_expr, typename P_updater>
inline inline
void VectorPick<P_numtype>::_bz_assign(P_expr expr, P_updater) void VectorPick<P_numtype>::_bz_assign(P_expr expr, P_updater)
{ {
BZPRECONDITION(expr.length(length()) == length()); BZPRECONDITION(expr.length(length()) == length());
// If all vectors in the expression, plus the vector to which the // If all vectors in the expression, plus the vector to which the
// result is being assigned have unit stride, then avoid stride // result is being assigned have unit stride, then avoid stride
// calculations. // calculations.
if (_bz_hasFastAccess() && expr._bz_hasFastAccess()) if (_bz_hasFastAccess() && expr._bz_hasFastAccess())
{ {
skipping to change at line 91 skipping to change at line 64
#endif #endif
} }
else { else {
// Not all unit strides -- have to access all the vector elements // Not all unit strides -- have to access all the vector elements
// as data_[i*stride_], which is slower. // as data_[i*stride_], which is slower.
for (int i=0; i < length(); ++i) for (int i=0; i < length(); ++i)
P_updater::update(vector_[index_[i]], expr[i]); P_updater::update(vector_[index_[i]], expr[i]);
} }
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator=(_bz_VecExpr<P_expr> expr)
{ {
BZPRECONDITION(expr.length(length()) == length()); BZPRECONDITION(expr.length(length()) == length());
// If all vectors in the expression, plus the vector to which the // If all vectors in the expression, plus the vector to which the
// result is being assigned have unit stride, then avoid stride // result is being assigned have unit stride, then avoid stride
// calculations. // calculations.
if (_bz_hasFastAccess() && expr._bz_hasFastAccess()) if (_bz_hasFastAccess() && expr._bz_hasFastAccess())
{ {
skipping to change at line 132 skipping to change at line 105
} }
else { else {
// Not all unit strides -- have to access all the vector elements // Not all unit strides -- have to access all the vector elements
// as data_[i*stride_], which is slower. // as data_[i*stride_], which is slower.
for (int i=0; i < length(); ++i) for (int i=0; i < length(); ++i)
(*this)[i] = expr[i]; (*this)[i] = expr[i];
} }
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator+=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator+=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_plus_update<P_numtype, _bz_assign(expr, _bz_plus_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator-=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator-=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_minus_update<P_numtype, _bz_assign(expr, _bz_minus_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator*=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator*=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_multiply_update<P_numtype, _bz_assign(expr, _bz_multiply_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator/=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator/=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_divide_update<P_numtype, _bz_assign(expr, _bz_divide_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator%=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator%=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_mod_update<P_numtype, _bz_assign(expr, _bz_mod_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator^=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator^=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_xor_update<P_numtype, _bz_assign(expr, _bz_xor_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator&=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator&=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_bitand_update<P_numtype, _bz_assign(expr, _bz_bitand_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator|=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator|=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_bitor_update<P_numtype, _bz_assign(expr, _bz_bitor_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator>>=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator>>=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_shiftr_update<P_numtype, _bz_assign(expr, _bz_shiftr_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator<<=(_bz_VecExpr<P_expr> expr) VectorPick<P_numtype>::operator<<=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_shiftl_update<P_numtype, _bz_assign(expr, _bz_shiftl_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with scalar operand * Assignment operators with scalar operand
*/ */
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator=(P_numtype x) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator=(P_numtype x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) = _bz_VecExpr<T_expr>(T_expr(x)); (*this) = _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator+=(P_numtype x ) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator+=(P_numtype x )
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) += _bz_VecExpr<T_expr>(T_expr(x)); (*this) += _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator-=(P_numtype x ) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator-=(P_numtype x )
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) -= _bz_VecExpr<T_expr>(T_expr(x)); (*this) -= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator*=(P_numtype x ) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator*=(P_numtype x )
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) *= _bz_VecExpr<T_expr>(T_expr(x)); (*this) *= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator/=(P_numtype x ) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator/=(P_numtype x )
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) /= _bz_VecExpr<T_expr>(T_expr(x)); (*this) /= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator%=(P_numtype x ) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator%=(P_numtype x )
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) %= _bz_VecExpr<T_expr>(T_expr(x)); (*this) %= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator^=(P_numtype x ) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator^=(P_numtype x )
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) ^= _bz_VecExpr<T_expr>(T_expr(x)); (*this) ^= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator&=(P_numtype x ) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator&=(P_numtype x )
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) &= _bz_VecExpr<T_expr>(T_expr(x)); (*this) &= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator|=(P_numtype x ) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator|=(P_numtype x )
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) |= _bz_VecExpr<T_expr>(T_expr(x)); (*this) |= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator>>=(int x) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator>>=(int x)
{ {
typedef _bz_VecExprConstant<int> T_expr; typedef _bz_VecExprConstant<int> T_expr;
(*this) >>= _bz_VecExpr<T_expr>(T_expr(x)); (*this) >>= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator<<=(int x) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator<<=(int x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) <<= _bz_VecExpr<T_expr>(T_expr(x)); (*this) <<= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with vector operand * Assignment operators with vector operand
*/ */
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator=(const Vector<P_numtype2>& x)
{ {
(*this) = _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) = _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator+=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator+=(const Vector<P_numtype2>& x)
{ {
(*this) += _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) += _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator-=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator-=(const Vector<P_numtype2>& x)
{ {
(*this) -= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) -= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator*=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator*=(const Vector<P_numtype2>& x)
{ {
(*this) *= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) *= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator/=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator/=(const Vector<P_numtype2>& x)
{ {
(*this) /= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) /= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator%=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator%=(const Vector<P_numtype2>& x)
{ {
(*this) %= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) %= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator^=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator^=(const Vector<P_numtype2>& x)
{ {
(*this) ^= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) ^= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator&=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator&=(const Vector<P_numtype2>& x)
{ {
(*this) &= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) &= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator|=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator|=(const Vector<P_numtype2>& x)
{ {
(*this) |= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) |= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator<<=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator<<=(const Vector<P_numtype2>& x)
{ {
(*this) <<= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) <<= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& inline VectorPick<P_numtype>&
VectorPick<P_numtype>::operator>>=(const Vector<P_numtype2>& x) VectorPick<P_numtype>::operator>>=(const Vector<P_numtype2>& x)
{ {
(*this) >>= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) >>= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with Range operand * Assignment operators with Range operand
*/ */
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator=(Range r)
{ {
(*this) = _bz_VecExpr<Range>(r); (*this) = _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator+=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator+=(Range r)
{ {
(*this) += _bz_VecExpr<Range>(r); (*this) += _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator-=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator-=(Range r)
{ {
(*this) -= _bz_VecExpr<Range>(r); (*this) -= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator*=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator*=(Range r)
{ {
(*this) *= _bz_VecExpr<Range>(r); (*this) *= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator/=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator/=(Range r)
{ {
(*this) /= _bz_VecExpr<Range>(r); (*this) /= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator%=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator%=(Range r)
{ {
(*this) %= _bz_VecExpr<Range>(r); (*this) %= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator^=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator^=(Range r)
{ {
(*this) ^= _bz_VecExpr<Range>(r); (*this) ^= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator&=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator&=(Range r)
{ {
(*this) &= _bz_VecExpr<Range>(r); (*this) &= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator|=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator|=(Range r)
{ {
(*this) |= _bz_VecExpr<Range>(r); (*this) |= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator>>=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator>>=(Range r)
{ {
(*this) >>= _bz_VecExpr<Range>(r); (*this) >>= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator<<=(Range r) inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator<<=(Range r)
{ {
(*this) <<= _bz_VecExpr<Range>(r); (*this) <<= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with VectorPick operand * Assignment operators with VectorPick operand
*/ */
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator=(const inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) = _bz_VecExpr<T_expr>(x.begin()); (*this) = _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator+=(const inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator+=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) += _bz_VecExpr<T_expr>(x.begin()); (*this) += _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator-=(const inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator-=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) -= _bz_VecExpr<T_expr>(x.begin()); (*this) -= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator*=(const inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator*=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) *= _bz_VecExpr<T_expr>(x.begin()); (*this) *= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator/=(const inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator/=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) /= _bz_VecExpr<T_expr>(x.begin()); (*this) /= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator%=(const inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator%=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) %= _bz_VecExpr<T_expr>(x.begin()); (*this) %= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator^=(const inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator^=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) ^= _bz_VecExpr<T_expr>(x.begin()); (*this) ^= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator&=(const inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator&=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) &= _bz_VecExpr<T_expr>(x.begin()); (*this) &= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator|=(const inline VectorPick<P_numtype>& VectorPick<P_numtype>::operator|=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) |= _bz_VecExpr<T_expr>(x.begin()); (*this) |= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with Random operand * Assignment operators with Random operand
*/ */
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
VectorPick<P_numtype>& VectorPick<P_numtype>&
VectorPick<P_numtype>::operator=(Random<P_distribution>& rand) VectorPick<P_numtype>::operator=(Random<P_distribution>& rand)
{ {
(*this) = _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) = _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
VectorPick<P_numtype>& VectorPick<P_numtype>&
VectorPick<P_numtype>::operator+=(Random<P_distribution>& rand) VectorPick<P_numtype>::operator+=(Random<P_distribution>& rand)
{ {
(*this) += _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) += _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
VectorPick<P_numtype>& VectorPick<P_numtype>&
VectorPick<P_numtype>::operator-=(Random<P_distribution>& rand) VectorPick<P_numtype>::operator-=(Random<P_distribution>& rand)
{ {
(*this) -= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) -= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
VectorPick<P_numtype>& VectorPick<P_numtype>&
VectorPick<P_numtype>::operator*=(Random<P_distribution>& rand) VectorPick<P_numtype>::operator*=(Random<P_distribution>& rand)
{ {
(*this) *= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) *= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
VectorPick<P_numtype>& VectorPick<P_numtype>&
VectorPick<P_numtype>::operator/=(Random<P_distribution>& rand) VectorPick<P_numtype>::operator/=(Random<P_distribution>& rand)
{ {
(*this) /= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) /= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
VectorPick<P_numtype>& VectorPick<P_numtype>&
VectorPick<P_numtype>::operator%=(Random<P_distribution>& rand) VectorPick<P_numtype>::operator%=(Random<P_distribution>& rand)
{ {
(*this) %= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) %= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
VectorPick<P_numtype>& VectorPick<P_numtype>&
VectorPick<P_numtype>::operator^=(Random<P_distribution>& rand) VectorPick<P_numtype>::operator^=(Random<P_distribution>& rand)
{ {
(*this) ^= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) ^= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
VectorPick<P_numtype>& VectorPick<P_numtype>&
VectorPick<P_numtype>::operator&=(Random<P_distribution>& rand) VectorPick<P_numtype>::operator&=(Random<P_distribution>& rand)
{ {
(*this) &= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) &= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
VectorPick<P_numtype>& VectorPick<P_numtype>&
VectorPick<P_numtype>::operator|=(Random<P_distribution>& rand) VectorPick<P_numtype>::operator|=(Random<P_distribution>& rand)
{ {
(*this) |= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) |= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 87 change blocks. 
115 lines changed or deleted 88 lines changed or added


 vecpick.h   vecpick.h 
/************************************************************************** * /************************************************************************** *
* blitz/vecpick.h Declaration of the VectorPick<T_numtype> class * blitz/vecpick.h Declaration of the VectorPick<T_numtype> class
* *
* $Id: vecpick.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: vecpick.h,v 1.5 2005/10/06 23:28:55 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: vecpick.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.5 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.4 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.3 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_VECPICK_H #ifndef BZ_VECPICK_H
#define BZ_VECPICK_H #define BZ_VECPICK_H
#ifndef BZ_VECTOR_H #include <blitz/vector.h>
#include <blitz/vector.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Forward declarations // Forward declarations
template<class P_numtype> class VectorPickIter; template<typename P_numtype> class VectorPickIter;
template<class P_numtype> class VectorPickIterConst; template<typename P_numtype> class VectorPickIterConst;
// Declaration of class VectorPick<P_numtype> // Declaration of class VectorPick<P_numtype>
template<class P_numtype> template<typename P_numtype>
class VectorPick { class VectorPick {
public: public:
////////////////////////////////////////////// //////////////////////////////////////////////
// Public Types // Public Types
////////////////////////////////////////////// //////////////////////////////////////////////
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
typedef Vector<T_numtype> T_vector; typedef Vector<T_numtype> T_vector;
typedef Vector<int> T_indexVector; typedef Vector<int> T_indexVector;
skipping to change at line 102 skipping to change at line 76
{ } { }
VectorPick(T_pick& vecpick, Range r) VectorPick(T_pick& vecpick, Range r)
: vector_(vecpick.vector_), index_(vecpick.index_[r]) : vector_(vecpick.vector_), index_(vecpick.index_[r])
{ } { }
////////////////////////////////////////////// //////////////////////////////////////////////
// Member functions // Member functions
////////////////////////////////////////////// //////////////////////////////////////////////
T_iterator begin() T_iterator beginFast()
{ return VectorPickIter<T_numtype>(*this); } { return VectorPickIter<T_numtype>(*this); }
T_constIterator begin() const T_constIterator beginFast() const
{ return VectorPickIterConst<T_numtype>(*this); } { return VectorPickIterConst<T_numtype>(*this); }
// T_vector copy() const; // T_vector copy() const;
// T_iterator end(); // T_iterator end();
// T_constIterator end() const; // T_constIterator end() const;
T_indexVector& indexSet() T_indexVector& indexSet()
{ return index_; } { return index_; }
skipping to change at line 144 skipping to change at line 118
///////////////////////////////////////////// /////////////////////////////////////////////
// Library-internal member functions // Library-internal member functions
// These are undocumented and may change or // These are undocumented and may change or
// disappear in future releases. // disappear in future releases.
///////////////////////////////////////////// /////////////////////////////////////////////
int _bz_suggestLength() const int _bz_suggestLength() const
{ return index_.length(); } { return index_.length(); }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return vector_._bz_hasFastAccess() && index_._bz_hasFastAccess(); } { return vector_._bz_hasFastAccess() && index_._bz_hasFastAccess(); }
T_numtype& _bz_fastAccess(int i) T_numtype& _bz_fastAccess(int i)
{ return vector_._bz_fastAccess(index_._bz_fastAccess(i)); } { return vector_._bz_fastAccess(index_._bz_fastAccess(i)); }
T_numtype _bz_fastAccess(int i) const T_numtype _bz_fastAccess(int i) const
{ return vector_._bz_fastAccess(index_._bz_fastAccess(i)); } { return vector_._bz_fastAccess(index_._bz_fastAccess(i)); }
_bz_VecExpr<T_constIterator> _bz_asVecExpr() const _bz_VecExpr<T_constIterator> _bz_asVecExpr() const
{ return _bz_VecExpr<T_constIterator>(begin()); } { return _bz_VecExpr<T_constIterator>(beginFast()); }
////////////////////////////////////////////// //////////////////////////////////////////////
// Subscripting operators // Subscripting operators
////////////////////////////////////////////// //////////////////////////////////////////////
T_numtype operator()(int i) const T_numtype operator()(int i) const
{ {
BZPRECONDITION(index_.stride() == 1); BZPRECONDITION(index_.stride() == 1);
BZPRECONDITION(vector_.stride() == 1); BZPRECONDITION(vector_.stride() == 1);
BZPRECONDITION(i < index_.length()); BZPRECONDITION(i < index_.length());
skipping to change at line 224 skipping to change at line 198
T_pick& operator*=(T_numtype); T_pick& operator*=(T_numtype);
T_pick& operator/=(T_numtype); T_pick& operator/=(T_numtype);
T_pick& operator%=(T_numtype); T_pick& operator%=(T_numtype);
T_pick& operator^=(T_numtype); T_pick& operator^=(T_numtype);
T_pick& operator&=(T_numtype); T_pick& operator&=(T_numtype);
T_pick& operator|=(T_numtype); T_pick& operator|=(T_numtype);
T_pick& operator>>=(int); T_pick& operator>>=(int);
T_pick& operator<<=(int); T_pick& operator<<=(int);
// Vector operand // Vector operand
template<class P_numtype2> T_pick& operator=(const Vector<P_numtype2> & template<typename P_numtype2> T_pick& operator=(const Vector<P_numtype2
); > &);
template<class P_numtype2> T_pick& operator+=(const Vector<P_numtype2> template<typename P_numtype2> T_pick& operator+=(const Vector<P_numtype
&); 2> &);
template<class P_numtype2> T_pick& operator-=(const Vector<P_numtype2> template<typename P_numtype2> T_pick& operator-=(const Vector<P_numtype
&); 2> &);
template<class P_numtype2> T_pick& operator*=(const Vector<P_numtype2> template<typename P_numtype2> T_pick& operator*=(const Vector<P_numtype
&); 2> &);
template<class P_numtype2> T_pick& operator/=(const Vector<P_numtype2> template<typename P_numtype2> T_pick& operator/=(const Vector<P_numtype
&); 2> &);
template<class P_numtype2> T_pick& operator%=(const Vector<P_numtype2> template<typename P_numtype2> T_pick& operator%=(const Vector<P_numtype
&); 2> &);
template<class P_numtype2> T_pick& operator^=(const Vector<P_numtype2> template<typename P_numtype2> T_pick& operator^=(const Vector<P_numtype
&); 2> &);
template<class P_numtype2> T_pick& operator&=(const Vector<P_numtype2> template<typename P_numtype2> T_pick& operator&=(const Vector<P_numtype
&); 2> &);
template<class P_numtype2> T_pick& operator|=(const Vector<P_numtype2> template<typename P_numtype2> T_pick& operator|=(const Vector<P_numtype
&); 2> &);
template<class P_numtype2> T_pick& operator>>=(const Vector<P_numtype2> template<typename P_numtype2> T_pick& operator>>=(const Vector<P_numtyp
&); e2> &);
template<class P_numtype2> T_pick& operator<<=(const Vector<P_numtype2> template<typename P_numtype2> T_pick& operator<<=(const Vector<P_numtyp
&); e2> &);
// Vector expression operand // Vector expression operand
template<class P_expr> T_pick& operator=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator=(_bz_VecExpr<P_expr>);
template<class P_expr> T_pick& operator+=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator+=(_bz_VecExpr<P_expr>);
template<class P_expr> T_pick& operator-=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator-=(_bz_VecExpr<P_expr>);
template<class P_expr> T_pick& operator*=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator*=(_bz_VecExpr<P_expr>);
template<class P_expr> T_pick& operator/=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator/=(_bz_VecExpr<P_expr>);
template<class P_expr> T_pick& operator%=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator%=(_bz_VecExpr<P_expr>);
template<class P_expr> T_pick& operator^=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator^=(_bz_VecExpr<P_expr>);
template<class P_expr> T_pick& operator&=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator&=(_bz_VecExpr<P_expr>);
template<class P_expr> T_pick& operator|=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator|=(_bz_VecExpr<P_expr>);
template<class P_expr> T_pick& operator>>=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator>>=(_bz_VecExpr<P_expr>);
template<class P_expr> T_pick& operator<<=(_bz_VecExpr<P_expr>); template<typename P_expr> T_pick& operator<<=(_bz_VecExpr<P_expr>);
// Range operand // Range operand
T_pick& operator=(Range); T_pick& operator=(Range);
T_pick& operator+=(Range); T_pick& operator+=(Range);
T_pick& operator-=(Range); T_pick& operator-=(Range);
T_pick& operator*=(Range); T_pick& operator*=(Range);
T_pick& operator/=(Range); T_pick& operator/=(Range);
T_pick& operator%=(Range); T_pick& operator%=(Range);
T_pick& operator^=(Range); T_pick& operator^=(Range);
T_pick& operator&=(Range); T_pick& operator&=(Range);
T_pick& operator|=(Range); T_pick& operator|=(Range);
T_pick& operator>>=(Range); T_pick& operator>>=(Range);
T_pick& operator<<=(Range); T_pick& operator<<=(Range);
// Vector pick operand // Vector pick operand
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator=(const VectorPick<P_numtype2> &); T_pick& operator=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator+=(const VectorPick<P_numtype2> &); T_pick& operator+=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator-=(const VectorPick<P_numtype2> &); T_pick& operator-=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator*=(const VectorPick<P_numtype2> &); T_pick& operator*=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator/=(const VectorPick<P_numtype2> &); T_pick& operator/=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator%=(const VectorPick<P_numtype2> &); T_pick& operator%=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator^=(const VectorPick<P_numtype2> &); T_pick& operator^=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator&=(const VectorPick<P_numtype2> &); T_pick& operator&=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator|=(const VectorPick<P_numtype2> &); T_pick& operator|=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator>>=(const VectorPick<P_numtype2> &); T_pick& operator>>=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_pick& operator<<=(const VectorPick<P_numtype2> &); T_pick& operator<<=(const VectorPick<P_numtype2> &);
// Random operand // Random operand
template<class P_distribution> template<typename P_distribution>
T_pick& operator=(Random<P_distribution>& random); T_pick& operator=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_pick& operator+=(Random<P_distribution>& random); T_pick& operator+=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_pick& operator-=(Random<P_distribution>& random); T_pick& operator-=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_pick& operator*=(Random<P_distribution>& random); T_pick& operator*=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_pick& operator/=(Random<P_distribution>& random); T_pick& operator/=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_pick& operator%=(Random<P_distribution>& random); T_pick& operator%=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_pick& operator^=(Random<P_distribution>& random); T_pick& operator^=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_pick& operator&=(Random<P_distribution>& random); T_pick& operator&=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_pick& operator|=(Random<P_distribution>& random); T_pick& operator|=(Random<P_distribution>& random);
private: private:
VectorPick() { } VectorPick() { }
template<class P_expr, class P_updater> template<typename P_expr, typename P_updater>
inline void _bz_assign(P_expr, P_updater); inline void _bz_assign(P_expr, P_updater);
private: private:
T_vector vector_; T_vector vector_;
T_indexVector index_; T_indexVector index_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#include <blitz/vecpick.cc> #include <blitz/vecpick.cc>
 End of changes. 32 change blocks. 
91 lines changed or deleted 65 lines changed or added


 vecpickio.cc   vecpickio.cc 
/* /*
* $Id: vecpickio.cc,v 1.1.1.1 2000/06/19 12:26:09 tveldhui Exp $ * $Id: vecpickio.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecpickio.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECPICKIO_CC #ifndef BZ_VECPICKIO_CC
#define BZ_VECPICKIO_CC #define BZ_VECPICKIO_CC
#ifndef BZ_VECPICK_H #ifndef BZ_VECPICK_H
#error <blitz/vecpickio.cc> must be included via <blitz/vecpick.h> #error <blitz/vecpickio.cc> must be included via <blitz/vecpick.h>
#endif // BZ_VECPICK_H #endif // BZ_VECPICK_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_numtype> template<typename P_numtype>
ostream& operator<<(ostream& os, const VectorPick<P_numtype>& x) ostream& operator<<(ostream& os, const VectorPick<P_numtype>& x)
{ {
Vector<P_numtype> y(x.length()); Vector<P_numtype> y(x.length());
y = x; y = x;
os << y; os << y;
return os; return os;
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 3 change blocks. 
9 lines changed or deleted 2 lines changed or added


 vecpickiter.h   vecpickiter.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/vecpickiter.h Declaration of VectorPickIter<T_numtype> and * blitz/vecpickiter.h Declaration of VectorPickIter<T_numtype> and
* VectorPickIterConst<T_numtype> classes * VectorPickIterConst<T_numtype> classes
* *
* $Id: vecpickiter.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: vecpickiter.h,v 1.5 2005/05/07 04:17:56 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: vecpickiter.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.5 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.4 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.3 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.2 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
*/
#ifndef BZ_VECPICKITER_H #ifndef BZ_VECPICKITER_H
#define BZ_VECPICKITER_H #define BZ_VECPICKITER_H
#ifndef BZ_VECPICK_H #ifndef BZ_VECPICK_H
#include <blitz/vecpick.h> #include <blitz/vecpick.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_numtype> template<typename P_numtype>
class VectorPickIter { class VectorPickIter {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
_bz_explicit VectorPickIter(VectorPick<T_numtype>& x) explicit VectorPickIter(VectorPick<T_numtype>& x)
: data_(x.vector().data()), index_(x.indexSet().data()) : data_(x.vector().data()), index_(x.indexSet().data())
{ {
dataStride_ = x.vector().stride(); dataStride_ = x.vector().stride();
indexStride_ = x.indexSet().stride(); indexStride_ = x.indexSet().stride();
length_ = x.indexSet().length(); length_ = x.indexSet().length();
} }
#ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
VectorPickIter(const VectorPickIter<T_numtype>& x) VectorPickIter(const VectorPickIter<T_numtype>& x)
{ {
skipping to change at line 103 skipping to change at line 80
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
return data_[dataStride_ * index_[i * indexStride_]]; return data_[dataStride_ * index_[i * indexStride_]];
} }
int length(int) const int length(int) const
{ return length_; } { return length_; }
int _bz_suggestLength() const int _bz_suggestLength() const
{ return length_; } { return length_; }
_bz_bool isUnitStride() const bool isUnitStride() const
{ return (dataStride_ == 1) && (indexStride_ == 1); } { return (dataStride_ == 1) && (indexStride_ == 1); }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return isUnitStride(); } { return isUnitStride(); }
T_numtype _bz_fastAccess(int i) const T_numtype _bz_fastAccess(int i) const
{ {
return data_[index_[i]]; return data_[index_[i]];
} }
T_numtype& _bz_fastAccess(int i) T_numtype& _bz_fastAccess(int i)
{ {
return data_[index_[i]]; return data_[index_[i]];
} }
enum { _bz_staticLengthCount = 0, static const int
_bz_dynamicLengthCount = 1, _bz_staticLengthCount = 0,
_bz_staticLength = 0 }; _bz_dynamicLengthCount = 1,
_bz_staticLength = 0;
private: private:
T_numtype * _bz_restrict data_; T_numtype * restrict data_;
int dataStride_; int dataStride_;
const int * _bz_restrict index_; const int * restrict index_;
int indexStride_; int indexStride_;
int length_; int length_;
}; };
template<class P_numtype> template<typename P_numtype>
class VectorPickIterConst { class VectorPickIterConst {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
_bz_explicit VectorPickIterConst(const VectorPick<T_numtype>& x) explicit VectorPickIterConst(const VectorPick<T_numtype>& x)
: data_(x.vector().data()), index_(x.indexSet().data()) : data_(x.vector().data()), index_(x.indexSet().data())
{ {
dataStride_ = x.vector().stride(); dataStride_ = x.vector().stride();
indexStride_ = x.indexSet().stride(); indexStride_ = x.indexSet().stride();
length_ = x.indexSet().length(); length_ = x.indexSet().length();
} }
#ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
VectorPickIterConst(const VectorPickIterConst<T_numtype>& x) VectorPickIterConst(const VectorPickIterConst<T_numtype>& x)
{ {
skipping to change at line 168 skipping to change at line 146
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
return data_[dataStride_ * index_[i * indexStride_]]; return data_[dataStride_ * index_[i * indexStride_]];
} }
int length(int) const int length(int) const
{ return length_; } { return length_; }
int _bz_suggestLength() const int _bz_suggestLength() const
{ return length_; } { return length_; }
_bz_bool isUnitStride() const bool isUnitStride() const
{ return (dataStride_ == 1) && (indexStride_ == 1); } { return (dataStride_ == 1) && (indexStride_ == 1); }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return isUnitStride(); } { return isUnitStride(); }
T_numtype _bz_fastAccess(int i) const T_numtype _bz_fastAccess(int i) const
{ {
return data_[index_[i]]; return data_[index_[i]];
} }
enum { _bz_staticLengthCount = 0, static const int
_bz_dynamicLengthCount = 1, _bz_staticLengthCount = 0,
_bz_staticLength = 0 }; _bz_dynamicLengthCount = 1,
_bz_staticLength = 0;
private: private:
const T_numtype * _bz_restrict data_; const T_numtype * restrict data_;
int dataStride_; int dataStride_;
const int * _bz_restrict index_; const int * restrict index_;
int indexStride_; int indexStride_;
int length_; int length_;
}; };
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_VECPICKITER_H #endif // BZ_VECPICKITER_H
 End of changes. 17 change blocks. 
45 lines changed or deleted 24 lines changed or added


 vecsum.cc   vecsum.cc 
/* /*
* $Id: vecsum.cc,v 1.1.1.1 2000/06/19 12:26:09 tveldhui Exp $ * $Id: vecsum.cc,v 1.3 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vecsum.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECSUM_CC #ifndef BZ_VECSUM_CC
#define BZ_VECSUM_CC #define BZ_VECSUM_CC
#ifndef BZ_VECGLOBS_H #ifndef BZ_VECGLOBS_H
#error <blitz/vecsum.cc> must be included via <blitz/vecglobs.h> #error <blitz/vecsum.cc> must be included via <blitz/vecglobs.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr> template<typename P_expr>
inline inline
BZ_SUMTYPE(_bz_typename P_expr::T_numtype) BZ_SUMTYPE(_bz_typename P_expr::T_numtype)
_bz_vec_sum(P_expr vector) _bz_vec_sum(P_expr vector)
{ {
typedef _bz_typename P_expr::T_numtype T_numtype; typedef _bz_typename P_expr::T_numtype T_numtype;
typedef BZ_SUMTYPE(T_numtype) T_sumtype; typedef BZ_SUMTYPE(T_numtype) T_sumtype;
T_sumtype sum = 0; T_sumtype sum = 0;
int length = vector._bz_suggestLength(); int length = vector._bz_suggestLength();
skipping to change at line 56 skipping to change at line 43
sum += vector._bz_fastAccess(i); sum += vector._bz_fastAccess(i);
} }
else { else {
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
sum += vector(i); sum += vector(i);
} }
return sum; return sum;
} }
template<class P_numtype> template<typename P_numtype>
inline inline
BZ_SUMTYPE(P_numtype) sum(const Vector<P_numtype>& x) BZ_SUMTYPE(P_numtype) sum(const Vector<P_numtype>& x)
{ {
return _bz_vec_sum(x._bz_asVecExpr()); return _bz_vec_sum(x._bz_asVecExpr());
} }
// sum(expr) // sum(expr)
template<class P_expr> template<typename P_expr>
inline inline
BZ_SUMTYPE(_bz_typename P_expr::T_numtype) BZ_SUMTYPE(_bz_typename P_expr::T_numtype)
sum(_bz_VecExpr<P_expr> expr) sum(_bz_VecExpr<P_expr> expr)
{ {
return _bz_vec_sum(expr); return _bz_vec_sum(expr);
} }
// sum(vecpick) // sum(vecpick)
template<class P_numtype> template<typename P_numtype>
inline inline
BZ_SUMTYPE(P_numtype) BZ_SUMTYPE(P_numtype)
sum(const VectorPick<P_numtype>& x) sum(const VectorPick<P_numtype>& x)
{ {
return _bz_vec_sum(x._bz_asVecExpr()); return _bz_vec_sum(x._bz_asVecExpr());
} }
// mean(vector) // mean(vector)
template<class P_numtype> template<typename P_numtype>
inline inline
BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) mean(const Vector<P_numtype>& x) BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) mean(const Vector<P_numtype>& x)
{ {
BZPRECONDITION(x.length() > 0); BZPRECONDITION(x.length() > 0);
typedef BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) T_floattype; typedef BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) T_floattype;
return _bz_vec_sum(x._bz_asVecExpr()) / (T_floattype) x.length(); return _bz_vec_sum(x._bz_asVecExpr()) / (T_floattype) x.length();
} }
// mean(expr) // mean(expr)
template<class P_expr> template<typename P_expr>
inline inline
BZ_FLOATTYPE(BZ_SUMTYPE(_bz_typename P_expr::T_numtype)) BZ_FLOATTYPE(BZ_SUMTYPE(_bz_typename P_expr::T_numtype))
mean(_bz_VecExpr<P_expr> expr) mean(_bz_VecExpr<P_expr> expr)
{ {
BZPRECONDITION(expr._bz_suggestLength() > 0); BZPRECONDITION(expr._bz_suggestLength() > 0);
typedef BZ_FLOATTYPE(BZ_SUMTYPE(_bz_typename P_expr::T_numtype)) typedef BZ_FLOATTYPE(BZ_SUMTYPE(_bz_typename P_expr::T_numtype))
T_floattype; T_floattype;
return _bz_vec_sum(expr) / (T_floattype) expr._bz_suggestLength(); return _bz_vec_sum(expr) / (T_floattype) expr._bz_suggestLength();
} }
// mean(vecpick) // mean(vecpick)
template<class P_numtype> template<typename P_numtype>
inline inline
BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype))
mean(const VectorPick<P_numtype>& x) mean(const VectorPick<P_numtype>& x)
{ {
BZPRECONDITION(x.length() > 0); BZPRECONDITION(x.length() > 0);
typedef BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) T_floattype; typedef BZ_FLOATTYPE(BZ_SUMTYPE(P_numtype)) T_floattype;
return _bz_vec_sum(x._bz_asVecExpr()) / (T_floattype) x.length(); return _bz_vec_sum(x._bz_asVecExpr()) / (T_floattype) x.length();
} }
 End of changes. 9 change blocks. 
21 lines changed or deleted 8 lines changed or added


 vector-et.h   vector-et.h 
/************************************************************************** * /************************************************************************** *
* blitz/vector-et.h Vector<P_numtype> class + expression templates * blitz/vector-et.h Vector<P_numtype> class + expression templates
* *
* $Id: vector-et.h,v 1.1 2002/07/02 19:25:39 jcumming Exp $ * $Id: vector-et.h,v 1.2 2003/01/14 11:29:18 patricg Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: vector-et.h,v $
* Revision 1.1 2002/07/02 19:25:39 jcumming
* This is the new name for the Vector.h file, which includes the Vector cl
ass implementation and Vector ET support using old-style expression templat
es.
*
* Revision 1.1 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
*/
#ifndef BZ_VECTOR_ET_H #ifndef BZ_VECTOR_ET_H
#define BZ_VECTOR_ET_H #define BZ_VECTOR_ET_H
#include <blitz/vector.h> #include <blitz/vector.h>
// These are compile-time expensive things not included // These are compile-time expensive things not included
// by <blitz/vector.h>, but needed if we want vector expressions. // by <blitz/vector.h>, but needed if we want vector expressions.
#include <blitz/vecbops.cc> // Operators with two operands #include <blitz/vecbops.cc> // Operators with two operands
 End of changes. 2 change blocks. 
13 lines changed or deleted 3 lines changed or added


 vector.cc   vector.cc 
/* /*
* $Id: vector.cc,v 1.3 2002/05/27 19:37:12 jcumming Exp $ * $Id: vector.cc,v 1.7 2005/10/06 23:28:03 julianc Exp $
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: vector.cc,v $
* Revision 1.3 2002/05/27 19:37:12 jcumming
* Removed use of this->. These names are now declared in class definition
.
*
* Revision 1.2 2002/03/06 16:27:40 patricg
*
* data_ replaced by this->data_ everywhere
* numReferences() by this->numReferences()
*
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.6 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.5 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.4 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_VECTOR_CC #ifndef BZ_VECTOR_CC
#define BZ_VECTOR_CC #define BZ_VECTOR_CC
#ifndef BZ_VECTOR_H #include <blitz/vector.h>
#include <blitz/vector.h> #include <blitz/update.h>
#endif
#ifndef BZ_UPDATE_H
#include <blitz/update.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_numtype> template<typename P_numtype>
Vector<P_numtype> Vector<P_numtype>::copy() const Vector<P_numtype> Vector<P_numtype>::copy() const
{ {
Vector<P_numtype> newCopy(length_); Vector<P_numtype> newCopy(length_);
if (stride_ == 1) if (stride_ == 1)
{ {
memcpy(newCopy.data(), data(), length_ * sizeof(P_numtype)); memcpy(newCopy.data(), data(), length_ * sizeof(P_numtype));
} }
else { else {
for (int i=0; i < length_; ++i) for (int i=0; i < length_; ++i)
skipping to change at line 66 skipping to change at line 40
// Can assume that newCopy has unit stride, and hence use // Can assume that newCopy has unit stride, and hence use
// the operator(), which assumes unit stride. Since this // the operator(), which assumes unit stride. Since this
// vector doesn't have unit stride, use []. // vector doesn't have unit stride, use [].
newCopy(i) = (*this)[i]; newCopy(i) = (*this)[i];
} }
} }
return newCopy; return newCopy;
} }
template<class P_numtype> template<typename P_numtype>
void Vector<P_numtype>::makeUnique() void Vector<P_numtype>::makeUnique()
{ {
if ((stride_ != 1) || (this->numReferences() > 1)) if ((stride_ != 1) || (this->numReferences() > 1))
{ {
Vector<P_numtype> tmp = copy(); Vector<P_numtype> tmp = copy();
reference(tmp); reference(tmp);
} }
} }
template<class P_numtype> template<typename P_numtype>
void Vector<P_numtype>::reference(Vector<P_numtype>& x) void Vector<P_numtype>::reference(Vector<P_numtype>& x)
{ {
MemoryBlockReference<P_numtype>::changeBlock(x, 0); MemoryBlockReference<P_numtype>::changeBlock(x);
length_ = x.length_; length_ = x.length_;
stride_ = x.stride_; stride_ = x.stride_;
} }
template<class P_numtype> template<typename P_numtype>
void Vector<P_numtype>::resize(int length) void Vector<P_numtype>::resize(int length)
{ {
if (length != length_) if (length != length_)
{ {
MemoryBlockReference<P_numtype>::newBlock(length); MemoryBlockReference<P_numtype>::newBlock(length);
length_ = length; length_ = length;
stride_ = 1; stride_ = 1;
} }
} }
template<class P_numtype> template<typename P_numtype>
void Vector<P_numtype>::resizeAndPreserve(int newLength) void Vector<P_numtype>::resizeAndPreserve(int newLength)
{ {
Vector<P_numtype> newVector(newLength); Vector<P_numtype> newVector(newLength);
if (newLength > length_) if (newLength > length_)
newVector(Range(0,length_-1)) = (*this); newVector(Range(0,length_-1)) = (*this);
else else
newVector(Range(0,newLength-1)) = (*this); newVector(Range(0,newLength-1)) = (*this);
reference(newVector); reference(newVector);
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with vector expression operand * Assignment operators with vector expression operand
*/ */
template<class P_numtype> template<class P_expr, class P_updater> template<typename P_numtype> template<typename P_expr, typename P_updater>
inline inline
void Vector<P_numtype>::_bz_assign(P_expr expr, P_updater) void Vector<P_numtype>::_bz_assign(P_expr expr, P_updater)
{ {
BZPRECONDITION(expr.length(length_) == length_); BZPRECONDITION(expr.length(length_) == length_);
// If all vectors in the expression, plus the vector to which the // If all vectors in the expression, plus the vector to which the
// result is being assigned have unit stride, then avoid stride // result is being assigned have unit stride, then avoid stride
// calculations. // calculations.
if ((stride_ == 1) && (expr._bz_hasFastAccess())) if ((stride_ == 1) && (expr._bz_hasFastAccess()))
{ {
skipping to change at line 167 skipping to change at line 141
#endif #endif
} }
else { else {
// Not all unit strides -- have to access all the vector elements // Not all unit strides -- have to access all the vector elements
// as data_[i*stride_], which is slower. // as data_[i*stride_], which is slower.
for (int i=0; i < length_; ++i) for (int i=0; i < length_; ++i)
P_updater::update((*this)[i], expr[i]); P_updater::update((*this)[i], expr[i]);
} }
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator=(_bz_VecExpr<P_expr> expr) inline Vector<P_numtype>& Vector<P_numtype>::operator=(_bz_VecExpr<P_expr> expr)
{ {
BZPRECONDITION(expr.length(length_) == length_); BZPRECONDITION(expr.length(length_) == length_);
// If all vectors in the expression, plus the vector to which the // If all vectors in the expression, plus the vector to which the
// result is being assigned have unit stride, then avoid stride // result is being assigned have unit stride, then avoid stride
// calculations. // calculations.
if ((stride_ == 1) && (expr._bz_hasFastAccess())) if ((stride_ == 1) && (expr._bz_hasFastAccess()))
{ {
#ifndef BZ_PARTIAL_LOOP_UNROLL #ifndef BZ_PARTIAL_LOOP_UNROLL
skipping to change at line 225 skipping to change at line 199
// as data_[i*stride_], which is slower. // as data_[i*stride_], which is slower.
for (int i=0; i < length_; ++i) for (int i=0; i < length_; ++i)
(*this)[i] = (P_numtype)expr[i]; (*this)[i] = (P_numtype)expr[i];
} }
return *this; return *this;
} }
#ifdef BZ_PARTIAL_LOOP_UNROLL #ifdef BZ_PARTIAL_LOOP_UNROLL
#define BZ_VECTOR_ASSIGN(op) \ #define BZ_VECTOR_ASSIGN(op) \
template<class P_numtype> template<class P_expr> \ template<typename P_numtype> template<typename P_expr> \
inline Vector<P_numtype>& Vector<P_numtype>:: \ inline Vector<P_numtype>& Vector<P_numtype>:: \
operator op (_bz_VecExpr<P_expr> expr) \ operator op (_bz_VecExpr<P_expr> expr) \
{ \ { \
BZPRECONDITION(expr.length(length_) == length_); \ BZPRECONDITION(expr.length(length_) == length_); \
if ((stride_ == 1) && (expr._bz_hasFastAccess())) \ if ((stride_ == 1) && (expr._bz_hasFastAccess())) \
{ \ { \
int leftover = length_ & 0x03; \ int leftover = length_ & 0x03; \
\ \
int i=0; \ int i=0; \
for (; i < leftover; ++i) \ for (; i < leftover; ++i) \
skipping to change at line 275 skipping to change at line 249
#ifdef BZ_ALTERNATE_FORWARD_BACKWARD_TRAVERSALS #ifdef BZ_ALTERNATE_FORWARD_BACKWARD_TRAVERSALS
/* /*
* NEEDS_WORK: need to incorporate BZ_NO_PROPAGATE here. This * NEEDS_WORK: need to incorporate BZ_NO_PROPAGATE here. This
* will require doing away with the macro BZ_VECTOR_ASSIGN, and * will require doing away with the macro BZ_VECTOR_ASSIGN, and
* adopting an approach similar to that used in arrayeval.cc. * adopting an approach similar to that used in arrayeval.cc.
*/ */
#define BZ_VECTOR_ASSIGN(op) \ #define BZ_VECTOR_ASSIGN(op) \
template<class P_numtype> template<class P_expr> \ template<typename P_numtype> template<typename P_expr> \
inline Vector<P_numtype>& Vector<P_numtype>:: \ inline Vector<P_numtype>& Vector<P_numtype>:: \
operator op (_bz_VecExpr<P_expr> expr) \ operator op (_bz_VecExpr<P_expr> expr) \
{ \ { \
BZPRECONDITION(expr.length(length_) == length_); \ BZPRECONDITION(expr.length(length_) == length_); \
static int traversalOrder = 0; \ static int traversalOrder = 0; \
if ((stride_ == 1) && (expr._bz_hasFastAccess())) \ if ((stride_ == 1) && (expr._bz_hasFastAccess())) \
{ \ { \
if (traversalOrder & 0x01) \ if (traversalOrder & 0x01) \
for (int i=length_-1; i >= 0; --i) \ for (int i=length_-1; i >= 0; --i) \
data_[i] op expr._bz_fastAccess(i); \ data_[i] op expr._bz_fastAccess(i); \
skipping to change at line 301 skipping to change at line 275
for (int i=0; i < length_; ++i) \ for (int i=0; i < length_; ++i) \
(*this)[i] op expr[i]; \ (*this)[i] op expr[i]; \
} \ } \
traversalOrder ^= 0x01; \ traversalOrder ^= 0x01; \
return *this; \ return *this; \
} }
#else // not BZ_ALTERNATE_FORWARD_BACKWARD_TRAVERSALS #else // not BZ_ALTERNATE_FORWARD_BACKWARD_TRAVERSALS
#define BZ_VECTOR_ASSIGN(op) \ #define BZ_VECTOR_ASSIGN(op) \
template<class P_numtype> template<class P_expr> \ template<typename P_numtype> template<typename P_expr> \
inline Vector<P_numtype>& Vector<P_numtype>:: \ inline Vector<P_numtype>& Vector<P_numtype>:: \
operator op (_bz_VecExpr<P_expr> expr) \ operator op (_bz_VecExpr<P_expr> expr) \
{ \ { \
BZPRECONDITION(expr.length(length_) == length_); \ BZPRECONDITION(expr.length(length_) == length_); \
if ((stride_ == 1) && (expr._bz_hasFastAccess())) \ if ((stride_ == 1) && (expr._bz_hasFastAccess())) \
{ \ { \
for (int i=0; i < length_; ++i) \ for (int i=0; i < length_; ++i) \
data_[i] op expr._bz_fastAccess(i); \ data_[i] op expr._bz_fastAccess(i); \
} \ } \
else { \ else { \
skipping to change at line 333 skipping to change at line 307
BZ_VECTOR_ASSIGN(/=) BZ_VECTOR_ASSIGN(/=)
BZ_VECTOR_ASSIGN(%=) BZ_VECTOR_ASSIGN(%=)
BZ_VECTOR_ASSIGN(^=) BZ_VECTOR_ASSIGN(^=)
BZ_VECTOR_ASSIGN(&=) BZ_VECTOR_ASSIGN(&=)
BZ_VECTOR_ASSIGN(|=) BZ_VECTOR_ASSIGN(|=)
BZ_VECTOR_ASSIGN(>>=) BZ_VECTOR_ASSIGN(>>=)
BZ_VECTOR_ASSIGN(<<=) BZ_VECTOR_ASSIGN(<<=)
#if NOT_DEFINED #if NOT_DEFINED
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator+=(_bz_VecExpr<P_expr> expr) inline Vector<P_numtype>& Vector<P_numtype>::operator+=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_plus_update<P_numtype, _bz_assign(expr, _bz_plus_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator-=(_bz_VecExpr<P_expr> expr) inline Vector<P_numtype>& Vector<P_numtype>::operator-=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_minus_update<P_numtype, _bz_assign(expr, _bz_minus_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator*=(_bz_VecExpr<P_expr> expr) inline Vector<P_numtype>& Vector<P_numtype>::operator*=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_multiply_update<P_numtype, _bz_assign(expr, _bz_multiply_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator/=(_bz_VecExpr<P_expr> expr) inline Vector<P_numtype>& Vector<P_numtype>::operator/=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_divide_update<P_numtype, _bz_assign(expr, _bz_divide_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator%=(_bz_VecExpr<P_expr> expr) inline Vector<P_numtype>& Vector<P_numtype>::operator%=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_mod_update<P_numtype, _bz_assign(expr, _bz_mod_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator^=(_bz_VecExpr<P_expr> expr) inline Vector<P_numtype>& Vector<P_numtype>::operator^=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_xor_update<P_numtype, _bz_assign(expr, _bz_xor_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator&=(_bz_VecExpr<P_expr> expr) inline Vector<P_numtype>& Vector<P_numtype>::operator&=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_bitand_update<P_numtype, _bz_assign(expr, _bz_bitand_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator|=(_bz_VecExpr<P_expr> expr) inline Vector<P_numtype>& Vector<P_numtype>::operator|=(_bz_VecExpr<P_expr> expr)
{ {
_bz_assign(expr, _bz_bitor_update<P_numtype, _bz_assign(expr, _bz_bitor_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator>>=(_bz_VecExpr<P_expr > expr) inline Vector<P_numtype>& Vector<P_numtype>::operator>>=(_bz_VecExpr<P_expr > expr)
{ {
_bz_assign(expr, _bz_shiftr_update<P_numtype, _bz_assign(expr, _bz_shiftr_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
template<class P_numtype> template<class P_expr> template<typename P_numtype> template<typename P_expr>
inline Vector<P_numtype>& Vector<P_numtype>::operator<<=(_bz_VecExpr<P_expr > expr) inline Vector<P_numtype>& Vector<P_numtype>::operator<<=(_bz_VecExpr<P_expr > expr)
{ {
_bz_assign(expr, _bz_shiftl_update<P_numtype, _bz_assign(expr, _bz_shiftl_update<P_numtype,
_bz_typename P_expr::T_numtype>()); _bz_typename P_expr::T_numtype>());
return *this; return *this;
} }
#endif // NOT_DEFINED #endif // NOT_DEFINED
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with scalar operand * Assignment operators with scalar operand
*/ */
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::initialize(P_numtype x) inline Vector<P_numtype>& Vector<P_numtype>::initialize(P_numtype x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) = _bz_VecExpr<T_expr>(T_expr(x)); (*this) = _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator+=(P_numtype x) inline Vector<P_numtype>& Vector<P_numtype>::operator+=(P_numtype x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) += _bz_VecExpr<T_expr>(T_expr(x)); (*this) += _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator-=(P_numtype x) inline Vector<P_numtype>& Vector<P_numtype>::operator-=(P_numtype x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) -= _bz_VecExpr<T_expr>(T_expr(x)); (*this) -= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator*=(P_numtype x) inline Vector<P_numtype>& Vector<P_numtype>::operator*=(P_numtype x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) *= _bz_VecExpr<T_expr>(T_expr(x)); (*this) *= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator/=(P_numtype x) inline Vector<P_numtype>& Vector<P_numtype>::operator/=(P_numtype x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) /= _bz_VecExpr<T_expr>(T_expr(x)); (*this) /= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator%=(P_numtype x) inline Vector<P_numtype>& Vector<P_numtype>::operator%=(P_numtype x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) %= _bz_VecExpr<T_expr>(T_expr(x)); (*this) %= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator^=(P_numtype x) inline Vector<P_numtype>& Vector<P_numtype>::operator^=(P_numtype x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) ^= _bz_VecExpr<T_expr>(T_expr(x)); (*this) ^= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator&=(P_numtype x) inline Vector<P_numtype>& Vector<P_numtype>::operator&=(P_numtype x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) &= _bz_VecExpr<T_expr>(T_expr(x)); (*this) &= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator|=(P_numtype x) inline Vector<P_numtype>& Vector<P_numtype>::operator|=(P_numtype x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) |= _bz_VecExpr<T_expr>(T_expr(x)); (*this) |= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator>>=(int x) inline Vector<P_numtype>& Vector<P_numtype>::operator>>=(int x)
{ {
typedef _bz_VecExprConstant<int> T_expr; typedef _bz_VecExprConstant<int> T_expr;
(*this) >>= _bz_VecExpr<T_expr>(T_expr(x)); (*this) >>= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator<<=(int x) inline Vector<P_numtype>& Vector<P_numtype>::operator<<=(int x)
{ {
typedef _bz_VecExprConstant<P_numtype> T_expr; typedef _bz_VecExprConstant<P_numtype> T_expr;
(*this) <<= _bz_VecExpr<T_expr>(T_expr(x)); (*this) <<= _bz_VecExpr<T_expr>(T_expr(x));
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with vector operand * Assignment operators with vector operand
*/ */
// This version is for two vectors with the same template parameter. // This version is for two vectors with the same template parameter.
// Does not appear to be supported by the current C++ standard; or // Does not appear to be supported by the current C++ standard; or
// is it? // is it?
#if 0 #if 0
template<class P_numtype> template<> template<typename P_numtype> template<>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator=(const Vector<P_numtype>& x) Vector<P_numtype>::operator=(const Vector<P_numtype>& x)
{ {
// NEEDS_WORK: if unit strides, use memcpy or something similar. // NEEDS_WORK: if unit strides, use memcpy or something similar.
typedef VectorIterConst<P_numtype> T_expr; typedef VectorIterConst<P_numtype> T_expr;
(*this) = _bz_VecExpr<T_expr>(T_expr(*this)); (*this) = _bz_VecExpr<T_expr>(T_expr(*this));
return *this; return *this;
} }
#endif #endif
// This version is for two vectors with *different* template // This version is for two vectors with *different* template
// parameters. // parameters.
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator=(const Vector<P_numtype2>& x)
{ {
(*this) = _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) = _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator+=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator+=(const Vector<P_numtype2>& x)
{ {
(*this) += _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) += _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator-=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator-=(const Vector<P_numtype2>& x)
{ {
(*this) -= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) -= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator*=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator*=(const Vector<P_numtype2>& x)
{ {
(*this) *= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) *= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator/=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator/=(const Vector<P_numtype2>& x)
{ {
(*this) /= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) /= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator%=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator%=(const Vector<P_numtype2>& x)
{ {
(*this) %= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) %= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator^=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator^=(const Vector<P_numtype2>& x)
{ {
(*this) ^= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) ^= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator&=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator&=(const Vector<P_numtype2>& x)
{ {
(*this) &= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) &= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator|=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator|=(const Vector<P_numtype2>& x)
{ {
(*this) |= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) |= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator<<=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator<<=(const Vector<P_numtype2>& x)
{ {
(*this) <<= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) <<= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& inline Vector<P_numtype>&
Vector<P_numtype>::operator>>=(const Vector<P_numtype2>& x) Vector<P_numtype>::operator>>=(const Vector<P_numtype2>& x)
{ {
(*this) >>= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.begin()); (*this) >>= _bz_VecExpr<VectorIterConst<P_numtype2> >(x.beginFast());
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with Range operand * Assignment operators with Range operand
*/ */
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator=(Range r)
{ {
(*this) = _bz_VecExpr<Range>(r); (*this) = _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator+=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator+=(Range r)
{ {
(*this) += _bz_VecExpr<Range>(r); (*this) += _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator-=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator-=(Range r)
{ {
(*this) -= _bz_VecExpr<Range>(r); (*this) -= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator*=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator*=(Range r)
{ {
(*this) *= _bz_VecExpr<Range>(r); (*this) *= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator/=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator/=(Range r)
{ {
(*this) /= _bz_VecExpr<Range>(r); (*this) /= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator%=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator%=(Range r)
{ {
(*this) %= _bz_VecExpr<Range>(r); (*this) %= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator^=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator^=(Range r)
{ {
(*this) ^= _bz_VecExpr<Range>(r); (*this) ^= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator&=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator&=(Range r)
{ {
(*this) &= _bz_VecExpr<Range>(r); (*this) &= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator|=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator|=(Range r)
{ {
(*this) |= _bz_VecExpr<Range>(r); (*this) |= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator>>=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator>>=(Range r)
{ {
(*this) >>= _bz_VecExpr<Range>(r); (*this) >>= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
template<class P_numtype> template<typename P_numtype>
inline Vector<P_numtype>& Vector<P_numtype>::operator<<=(Range r) inline Vector<P_numtype>& Vector<P_numtype>::operator<<=(Range r)
{ {
(*this) <<= _bz_VecExpr<Range>(r); (*this) <<= _bz_VecExpr<Range>(r);
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with VectorPick operand * Assignment operators with VectorPick operand
*/ */
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& Vector<P_numtype>::operator=(const inline Vector<P_numtype>& Vector<P_numtype>::operator=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) = _bz_VecExpr<T_expr>(x.begin()); (*this) = _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& Vector<P_numtype>::operator+=(const inline Vector<P_numtype>& Vector<P_numtype>::operator+=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) += _bz_VecExpr<T_expr>(x.begin()); (*this) += _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& Vector<P_numtype>::operator-=(const inline Vector<P_numtype>& Vector<P_numtype>::operator-=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) -= _bz_VecExpr<T_expr>(x.begin()); (*this) -= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& Vector<P_numtype>::operator*=(const inline Vector<P_numtype>& Vector<P_numtype>::operator*=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) *= _bz_VecExpr<T_expr>(x.begin()); (*this) *= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& Vector<P_numtype>::operator/=(const inline Vector<P_numtype>& Vector<P_numtype>::operator/=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) /= _bz_VecExpr<T_expr>(x.begin()); (*this) /= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& Vector<P_numtype>::operator%=(const inline Vector<P_numtype>& Vector<P_numtype>::operator%=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) %= _bz_VecExpr<T_expr>(x.begin()); (*this) %= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& Vector<P_numtype>::operator^=(const inline Vector<P_numtype>& Vector<P_numtype>::operator^=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) ^= _bz_VecExpr<T_expr>(x.begin()); (*this) ^= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& Vector<P_numtype>::operator&=(const inline Vector<P_numtype>& Vector<P_numtype>::operator&=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) &= _bz_VecExpr<T_expr>(x.begin()); (*this) &= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
template<class P_numtype> template<class P_numtype2> template<typename P_numtype> template<typename P_numtype2>
inline Vector<P_numtype>& Vector<P_numtype>::operator|=(const inline Vector<P_numtype>& Vector<P_numtype>::operator|=(const
VectorPick<P_numtype2>& x) VectorPick<P_numtype2>& x)
{ {
typedef VectorPickIterConst<P_numtype2> T_expr; typedef VectorPickIterConst<P_numtype2> T_expr;
(*this) |= _bz_VecExpr<T_expr>(x.begin()); (*this) |= _bz_VecExpr<T_expr>(x.beginFast());
return *this; return *this;
} }
/************************************************************************** *** /************************************************************************** ***
* Assignment operators with Random operand * Assignment operators with Random operand
*/ */
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
Vector<P_numtype>& Vector<P_numtype>::operator=(Random<P_distribution>& ran d) Vector<P_numtype>& Vector<P_numtype>::operator=(Random<P_distribution>& ran d)
{ {
for (int i=0; i < length_; ++i) for (int i=0; i < length_; ++i)
(*this)[i] = rand.random(); (*this)[i] = rand.random();
return *this; return *this;
} }
#ifdef BZ_PECULIAR_RANDOM_VECTOR_ASSIGN_BUG #ifdef BZ_PECULIAR_RANDOM_VECTOR_ASSIGN_BUG
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
Vector<P_numtype>& Vector<P_numtype>::operator=(Random<P_distribution>& ran d) Vector<P_numtype>& Vector<P_numtype>::operator=(Random<P_distribution>& ran d)
{ {
(*this) = _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) = _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
Vector<P_numtype>& Vector<P_numtype>::operator+=(Random<P_distribution>& ra nd) Vector<P_numtype>& Vector<P_numtype>::operator+=(Random<P_distribution>& ra nd)
{ {
(*this) += _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) += _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
Vector<P_numtype>& Vector<P_numtype>::operator-=(Random<P_distribution>& ra nd) Vector<P_numtype>& Vector<P_numtype>::operator-=(Random<P_distribution>& ra nd)
{ {
(*this) -= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) -= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
Vector<P_numtype>& Vector<P_numtype>::operator*=(Random<P_distribution>& ra nd) Vector<P_numtype>& Vector<P_numtype>::operator*=(Random<P_distribution>& ra nd)
{ {
(*this) *= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) *= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
Vector<P_numtype>& Vector<P_numtype>::operator/=(Random<P_distribution>& ra nd) Vector<P_numtype>& Vector<P_numtype>::operator/=(Random<P_distribution>& ra nd)
{ {
(*this) /= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) /= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
Vector<P_numtype>& Vector<P_numtype>::operator%=(Random<P_distribution>& ra nd) Vector<P_numtype>& Vector<P_numtype>::operator%=(Random<P_distribution>& ra nd)
{ {
(*this) %= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) %= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
Vector<P_numtype>& Vector<P_numtype>::operator^=(Random<P_distribution>& ra nd) Vector<P_numtype>& Vector<P_numtype>::operator^=(Random<P_distribution>& ra nd)
{ {
(*this) ^= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) ^= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
Vector<P_numtype>& Vector<P_numtype>::operator&=(Random<P_distribution>& ra nd) Vector<P_numtype>& Vector<P_numtype>::operator&=(Random<P_distribution>& ra nd)
{ {
(*this) &= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) &= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
template<class P_numtype> template<class P_distribution> template<typename P_numtype> template<typename P_distribution>
Vector<P_numtype>& Vector<P_numtype>::operator|=(Random<P_distribution>& ra nd) Vector<P_numtype>& Vector<P_numtype>::operator|=(Random<P_distribution>& ra nd)
{ {
(*this) |= _bz_VecExpr<_bz_VecExprRandom<P_distribution> > (*this) |= _bz_VecExpr<_bz_VecExprRandom<P_distribution> >
(_bz_VecExprRandom<P_distribution>(rand)); (_bz_VecExprRandom<P_distribution>(rand));
return *this; return *this;
} }
#endif // BZ_PECULIAR_RANDOM_VECTOR_ASSIGN_BUG #endif // BZ_PECULIAR_RANDOM_VECTOR_ASSIGN_BUG
BZ_NAMESPACE_END BZ_NAMESPACE_END
 End of changes. 97 change blocks. 
124 lines changed or deleted 97 lines changed or added


 vector.h   vector.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/vector.h Declaration of the Vector<P_numtype> class * blitz/vector.h Declaration of the Vector<P_numtype> class
* *
* $Id: vector.h,v 1.6 2002/05/27 19:30:27 jcumming Exp $ * $Id: vector.h,v 1.10 2005/10/06 23:27:13 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: vector.h,v $
* Revision 1.6 2002/05/27 19:30:27 jcumming
* Removed use of this-> as means of accessing members of templated base cl
ass.
* Instead provided using declarations for these members within the derived
* class definitions to bring them into the scope of the derived class.
*
* Revision 1.5 2002/03/06 16:09:46 patricg
* *** empty log message ***
*
* Revision 1.4 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.3 2001/01/24 22:51:50 tveldhui
* Reorganized #include orders to avoid including the huge Vector e.t.
* implementation when using Array.
*
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.8 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.7 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.6 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.5 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
* Revision 1.4 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
* Revision 1.3 1996/11/11 17:29:13 tveldhui
* Periodic RCS update
*
* Revision 1.2 1996/10/31 21:06:54 tveldhui
* Did away with multiple template parameters.
*/
/* /*
* KNOWN BUGS * KNOWN BUGS
* *
* 1. operator[](Vector<int>) won't match; compiler complains of no * 1. operator[](Vector<int>) won't match; compiler complains of no
* suitable copy constructor for VectorPick<T> * suitable copy constructor for VectorPick<T>
* 2. Vector<T>(_bz_VecExpr<E>) constructor generates warning * 2. Vector<T>(_bz_VecExpr<E>) constructor generates warning
* 3. operator+=,-=,..etc.(Random<D>) won't match; compiler complains of * 3. operator+=,-=,..etc.(Random<D>) won't match; compiler complains of
* no suitable copy constructor for _bz_VecExpr(...). * no suitable copy constructor for _bz_VecExpr(...).
*/ */
#ifndef BZ_VECTOR_H #ifndef BZ_VECTOR_H
#define BZ_VECTOR_H #define BZ_VECTOR_H
#ifndef BZ_BLITZ_H #include <blitz/blitz.h>
#include <blitz/blitz.h> #include <blitz/memblock.h>
#endif #include <blitz/range.h>
#include <blitz/listinit.h>
#ifndef BZ_MEMBLOCK_H
#include <blitz/memblock.h>
#endif
#ifndef BZ_RANGE_H
#include <blitz/range.h>
#endif
#ifndef BZ_LISTINIT_H
#include <blitz/listinit.h>
#endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// Forward declarations // Forward declarations
template<class P_numtype> class VectorIter; template<typename P_numtype> class VectorIter;
template<class P_numtype> class VectorIterConst; template<typename P_numtype> class VectorIterConst;
template<class P_expr> class _bz_VecExpr; template<typename P_expr> class _bz_VecExpr;
template<class P_numtype> class VectorPick; template<typename P_numtype> class VectorPick;
template<class P_numtype> class Random; template<typename P_numtype> class Random;
// Declaration of class Vector<P_numtype> // Declaration of class Vector<P_numtype>
template<class P_numtype> template<typename P_numtype>
class Vector : protected MemoryBlockReference<P_numtype> { class Vector : protected MemoryBlockReference<P_numtype> {
private: private:
typedef MemoryBlockReference<P_numtype> T_base; typedef MemoryBlockReference<P_numtype> T_base;
using T_base::data_; using T_base::data_;
public: public:
////////////////////////////////////////////// //////////////////////////////////////////////
// Public Types // Public Types
////////////////////////////////////////////// //////////////////////////////////////////////
skipping to change at line 143 skipping to change at line 90
// be visible to the optimizer. // be visible to the optimizer.
Vector() Vector()
{ {
length_ = 0; length_ = 0;
stride_ = 0; stride_ = 0;
} }
// This constructor is provided inline because it involves // This constructor is provided inline because it involves
// no memory allocation. // no memory allocation.
Vector(Vector<T_numtype>& vec)
: MemoryBlockReference<T_numtype>(vec)
{
length_ = vec.length_;
stride_ = vec.stride_;
}
// Slightly unsafe cast-away-const version
Vector(const Vector<T_numtype>& vec) Vector(const Vector<T_numtype>& vec)
: MemoryBlockReference<T_numtype> : MemoryBlockReference<T_numtype>(const_cast<Vector<T_numtype>&>(ve
(const_cast<Vector<T_numtype>& >(vec)) c))
{ {
length_ = vec.length_; length_ = vec.length_;
stride_ = vec.stride_; stride_ = vec.stride_;
} }
_bz_explicit Vector(int length) explicit Vector(int length)
: MemoryBlockReference<T_numtype>(length) : MemoryBlockReference<T_numtype>(length)
{ {
length_ = length; length_ = length;
stride_ = 1; stride_ = 1;
} }
Vector(Vector<T_numtype>& vec, Range r) Vector(const Vector<T_numtype>& vec, Range r)
: MemoryBlockReference<T_numtype>(vec, : MemoryBlockReference<T_numtype>(const_cast<Vector<T_numtype>&>(ve
r.first() * vec.stride()) c),
r.first() * vec.stride())
{ {
BZPRECONDITION((r.first() >= 0) && (r.first() < vec.length())); BZPRECONDITION((r.first() >= 0) && (r.first() < vec.length()));
BZPRECONDITION((r.last(vec.length()-1) >= 0) BZPRECONDITION((r.last(vec.length()-1) >= 0)
&& (r.last(vec.length()-1) < vec.length())); && (r.last(vec.length()-1) < vec.length()));
length_ = (r.last(vec.length()-1) - r.first()) / r.stride() + 1; length_ = (r.last(vec.length()-1) - r.first()) / r.stride() + 1;
stride_ = vec.stride_ * r.stride(); stride_ = vec.stride() * r.stride();
} }
Vector(int length, T_numtype initValue) Vector(int length, T_numtype initValue)
: MemoryBlockReference<T_numtype>(length) : MemoryBlockReference<T_numtype>(length)
{ {
length_ = length; length_ = length;
stride_ = 1; stride_ = 1;
(*this) = initValue; (*this) = initValue;
} }
Vector(int length, T_numtype firstValue, T_numtype delta) Vector(int length, T_numtype firstValue, T_numtype delta)
: MemoryBlockReference<T_numtype>(length) : MemoryBlockReference<T_numtype>(length)
{ {
length_ = length; length_ = length;
stride_ = 1; stride_ = 1;
for (int i=0; i < length; ++i) for (int i=0; i < length; ++i)
data_[i] = firstValue + i * delta; data_[i] = firstValue + i * delta;
} }
template<class P_distribution> template<typename P_distribution>
Vector(int length, Random<P_distribution>& random) Vector(int length, Random<P_distribution>& random)
: MemoryBlockReference<T_numtype>(length) : MemoryBlockReference<T_numtype>(length)
{ {
length_ = length; length_ = length;
stride_ = 1; stride_ = 1;
(*this) = random; (*this) = random;
} }
template<class P_expr> template<typename P_expr>
Vector(_bz_VecExpr<P_expr> expr) Vector(_bz_VecExpr<P_expr> expr)
: MemoryBlockReference<T_numtype>(expr._bz_suggestLength()) : MemoryBlockReference<T_numtype>(expr._bz_suggestLength())
{ {
length_ = expr._bz_suggestLength(); length_ = expr._bz_suggestLength();
stride_ = 1; stride_ = 1;
(*this) = expr; (*this) = expr;
} }
// Create a vector view of an already allocated block of memory. // Create a vector view of an already allocated block of memory.
// Note that the memory will not be freed when this vector is // Note that the memory will not be freed when this vector is
// destroyed. // destroyed.
Vector(int length, T_numtype* _bz_restrict data, int stride = 1) Vector(int length, T_numtype* restrict data, int stride = 1)
: MemoryBlockReference<T_numtype>(length, data, neverDeleteData) : MemoryBlockReference<T_numtype>(length, data, neverDeleteData)
{ {
length_ = length; length_ = length;
stride_ = stride; stride_ = stride;
} }
// Create a vector containing a range of numbers // Create a vector containing a range of numbers
Vector(Range r) Vector(Range r)
: MemoryBlockReference<T_numtype>(r._bz_suggestLength()) : MemoryBlockReference<T_numtype>(r._bz_suggestLength())
{ {
skipping to change at line 248 skipping to change at line 186
// stride to 1 in the local scope so the optimizer can do copy // stride to 1 in the local scope so the optimizer can do copy
// propagation & dead code elimination. Obviously, you don't // propagation & dead code elimination. Obviously, you don't
// want to use this routine unless you are certain that the // want to use this routine unless you are certain that the
// vectors have unit stride. // vectors have unit stride.
void assertUnitStride() void assertUnitStride()
{ {
BZPRECONDITION(stride_ == 1); BZPRECONDITION(stride_ == 1);
stride_ = 1; stride_ = 1;
} }
T_iterator begin() T_iterator beginFast() { return T_iterator(*this); }
{ return T_iterator(*this); } T_constIterator beginFast() const { return T_constIterator(*this); }
T_constIterator begin() const
{ return T_constIterator(*this); }
T_vector copy() const; T_vector copy() const;
// T_iterator end(); // T_iterator end();
// T_constIterator end() const; // T_constIterator end() const;
T_numtype * _bz_restrict data() T_numtype * restrict data()
{ return data_; } { return data_; }
const T_numtype * _bz_restrict data() const const T_numtype * restrict data() const
{ return data_; } { return data_; }
_bz_bool isUnitStride() const bool isUnitStride() const
{ return stride_ == 1; } { return stride_ == 1; }
int length() const int length() const
{ return length_; } { return length_; }
void makeUnique(); void makeUnique();
// int storageSize() const; // int storageSize() const;
// void storeToBuffer(void* buffer, int bufferLength) const; // void storeToBuffer(void* buffer, int bufferLength) const;
skipping to change at line 292 skipping to change at line 227
// int restoreFromBuffer(void* buffer, int bufferLength); // int restoreFromBuffer(void* buffer, int bufferLength);
T_vector reverse() T_vector reverse()
{ return T_vector(*this,Range(length()-1,0,-1)); } { return T_vector(*this,Range(length()-1,0,-1)); }
int stride() const int stride() const
{ return stride_; } { return stride_; }
operator _bz_VecExpr<VectorIterConst<T_numtype> > () const operator _bz_VecExpr<VectorIterConst<T_numtype> > () const
{ return _bz_VecExpr<VectorIterConst<T_numtype> >(begin()); } { return _bz_VecExpr<VectorIterConst<T_numtype> >(beginFast()); }
///////////////////////////////////////////// /////////////////////////////////////////////
// Library-internal member functions // Library-internal member functions
// These are undocumented and may change or // These are undocumented and may change or
// disappear in future releases. // disappear in future releases.
///////////////////////////////////////////// /////////////////////////////////////////////
int _bz_suggestLength() const int _bz_suggestLength() const
{ return length_; } { return length_; }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ return stride_ == 1; } { return stride_ == 1; }
T_numtype& _bz_fastAccess(int i) T_numtype& _bz_fastAccess(int i)
{ return data_[i]; } { return data_[i]; }
T_numtype _bz_fastAccess(int i) const T_numtype _bz_fastAccess(int i) const
{ return data_[i]; } { return data_[i]; }
template<class P_expr, class P_updater> template<typename P_expr, typename P_updater>
void _bz_assign(P_expr, P_updater); void _bz_assign(P_expr, P_updater);
_bz_VecExpr<T_constIterator> _bz_asVecExpr() const _bz_VecExpr<T_constIterator> _bz_asVecExpr() const
{ return _bz_VecExpr<T_constIterator>(begin()); } { return _bz_VecExpr<T_constIterator>(beginFast()); }
////////////////////////////////////////////// //////////////////////////////////////////////
// Subscripting operators // Subscripting operators
////////////////////////////////////////////// //////////////////////////////////////////////
// operator()(int) may be used only when the vector has unit // operator()(int) may be used only when the vector has unit
// stride. Otherwise, use operator[]. // stride. Otherwise, use operator[].
T_numtype operator()(int i) const T_numtype operator()(int i) const
{ {
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
BZPRECONDITION(stride_ == 1); BZPRECONDITION(stride_ == 1);
return data_[i]; return data_[i];
} }
// operator()(int) may be used only when the vector has unit // operator()(int) may be used only when the vector has unit
// stride. Otherwise, use operator[]. // stride. Otherwise, use operator[].
T_numtype& _bz_restrict operator()(int i) T_numtype& restrict operator()(int i)
{ {
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
BZPRECONDITION(stride_ == 1); BZPRECONDITION(stride_ == 1);
return data_[i]; return data_[i];
} }
T_numtype operator[](int i) const T_numtype operator[](int i) const
{ {
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
return data_[i * stride_]; return data_[i * stride_];
} }
T_numtype& _bz_restrict operator[](int i) T_numtype& restrict operator[](int i)
{ {
BZPRECONDITION(i < length_); BZPRECONDITION(i < length_);
return data_[i * stride_]; return data_[i * stride_];
} }
T_vector operator()(Range r) T_vector operator()(Range r)
{ {
return T_vector(*this, r); return T_vector(*this, r);
} }
skipping to change at line 385 skipping to change at line 320
// Assignment operators // Assignment operators
////////////////////////////////////////////// //////////////////////////////////////////////
// Scalar operand // Scalar operand
ListInitializationSwitch<T_vector,T_iterator> operator=(T_numtype x) ListInitializationSwitch<T_vector,T_iterator> operator=(T_numtype x)
{ {
return ListInitializationSwitch<T_vector,T_iterator>(*this, x); return ListInitializationSwitch<T_vector,T_iterator>(*this, x);
} }
T_iterator getInitializationIterator() T_iterator getInitializationIterator()
{ return begin(); } { return beginFast(); }
T_vector& initialize(T_numtype); T_vector& initialize(T_numtype);
T_vector& operator+=(T_numtype); T_vector& operator+=(T_numtype);
T_vector& operator-=(T_numtype); T_vector& operator-=(T_numtype);
T_vector& operator*=(T_numtype); T_vector& operator*=(T_numtype);
T_vector& operator/=(T_numtype); T_vector& operator/=(T_numtype);
T_vector& operator%=(T_numtype); T_vector& operator%=(T_numtype);
T_vector& operator^=(T_numtype); T_vector& operator^=(T_numtype);
T_vector& operator&=(T_numtype); T_vector& operator&=(T_numtype);
T_vector& operator|=(T_numtype); T_vector& operator|=(T_numtype);
T_vector& operator>>=(int); T_vector& operator>>=(int);
T_vector& operator<<=(int); T_vector& operator<<=(int);
// Vector operand // Vector operand
template<class P_numtype2> T_vector& operator=(const Vector<P_numtype2> &); template<typename P_numtype2> T_vector& operator=(const Vector<P_numtyp e2> &);
// Specialization uses memcpy instead of element-by-element cast and // Specialization uses memcpy instead of element-by-element cast and
// copy // copy
// NEEDS_WORK -- KCC won't accept this syntax; standard?? // NEEDS_WORK -- KCC won't accept this syntax; standard??
// template<> T_vector& operator=(const T_vector&); // template<> T_vector& operator=(const T_vector&);
template<class P_numtype2> T_vector& operator+=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator+=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator-=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator-=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator*=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator*=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator/=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator/=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator%=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator%=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator^=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator^=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator&=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator&=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator|=(const Vector<P_numtype2 template<typename P_numtype2> T_vector& operator|=(const Vector<P_numty
> &); pe2> &);
template<class P_numtype2> T_vector& operator>>=(const Vector<P_numtype template<typename P_numtype2> T_vector& operator>>=(const Vector<P_numt
2> &); ype2> &);
template<class P_numtype2> T_vector& operator<<=(const Vector<P_numtype template<typename P_numtype2> T_vector& operator<<=(const Vector<P_numt
2> &); ype2> &);
// Vector expression operand // Vector expression operand
template<class P_expr> T_vector& operator=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator+=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator+=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator-=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator-=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator*=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator*=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator/=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator/=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator%=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator%=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator^=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator^=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator&=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator&=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator|=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator|=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator>>=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator>>=(_bz_VecExpr<P_expr>);
template<class P_expr> T_vector& operator<<=(_bz_VecExpr<P_expr>); template<typename P_expr> T_vector& operator<<=(_bz_VecExpr<P_expr>);
// VectorPick operand // VectorPick operand
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator=(const VectorPick<P_numtype2> &); T_vector& operator=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator+=(const VectorPick<P_numtype2> &); T_vector& operator+=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator-=(const VectorPick<P_numtype2> &); T_vector& operator-=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator*=(const VectorPick<P_numtype2> &); T_vector& operator*=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator/=(const VectorPick<P_numtype2> &); T_vector& operator/=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator%=(const VectorPick<P_numtype2> &); T_vector& operator%=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator^=(const VectorPick<P_numtype2> &); T_vector& operator^=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator&=(const VectorPick<P_numtype2> &); T_vector& operator&=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator|=(const VectorPick<P_numtype2> &); T_vector& operator|=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator>>=(const VectorPick<P_numtype2> &); T_vector& operator>>=(const VectorPick<P_numtype2> &);
template<class P_numtype2> template<typename P_numtype2>
T_vector& operator<<=(const VectorPick<P_numtype2> &); T_vector& operator<<=(const VectorPick<P_numtype2> &);
// Range operand // Range operand
T_vector& operator=(Range); T_vector& operator=(Range);
T_vector& operator+=(Range); T_vector& operator+=(Range);
T_vector& operator-=(Range); T_vector& operator-=(Range);
T_vector& operator*=(Range); T_vector& operator*=(Range);
T_vector& operator/=(Range); T_vector& operator/=(Range);
T_vector& operator%=(Range); T_vector& operator%=(Range);
T_vector& operator^=(Range); T_vector& operator^=(Range);
T_vector& operator&=(Range); T_vector& operator&=(Range);
T_vector& operator|=(Range); T_vector& operator|=(Range);
T_vector& operator>>=(Range); T_vector& operator>>=(Range);
T_vector& operator<<=(Range); T_vector& operator<<=(Range);
// Random operand // Random operand
template<class P_distribution> template<typename P_distribution>
T_vector& operator=(Random<P_distribution>& random); T_vector& operator=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_vector& operator+=(Random<P_distribution>& random); T_vector& operator+=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_vector& operator-=(Random<P_distribution>& random); T_vector& operator-=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_vector& operator*=(Random<P_distribution>& random); T_vector& operator*=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_vector& operator/=(Random<P_distribution>& random); T_vector& operator/=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_vector& operator%=(Random<P_distribution>& random); T_vector& operator%=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_vector& operator^=(Random<P_distribution>& random); T_vector& operator^=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_vector& operator&=(Random<P_distribution>& random); T_vector& operator&=(Random<P_distribution>& random);
template<class P_distribution> template<typename P_distribution>
T_vector& operator|=(Random<P_distribution>& random); T_vector& operator|=(Random<P_distribution>& random);
////////////////////////////////////////////// //////////////////////////////////////////////
// Unary operators // Unary operators
////////////////////////////////////////////// //////////////////////////////////////////////
// T_vector& operator++(); // T_vector& operator++();
// void operator++(int); // void operator++(int);
// T_vector& operator--(); // T_vector& operator--();
// void operator--(int); // void operator--(int);
private: private:
int length_; int length_;
int stride_; int stride_;
}; };
// Global I/O functions // Global I/O functions
template<class P_numtype> template<typename P_numtype>
ostream& operator<<(ostream& os, const Vector<P_numtype>& x); ostream& operator<<(ostream& os, const Vector<P_numtype>& x);
template<class P_expr> template<typename P_expr>
ostream& operator<<(ostream& os, _bz_VecExpr<P_expr> expr); ostream& operator<<(ostream& os, _bz_VecExpr<P_expr> expr);
BZ_NAMESPACE_END BZ_NAMESPACE_END
#include <blitz/veciter.h> // Iterators #include <blitz/veciter.h> // Iterators
#include <blitz/vecpick.h> // VectorPick #include <blitz/vecpick.h> // VectorPick
#include <blitz/vecexpr.h> // Expression template classes #include <blitz/vecexpr.h> // Expression template classes
#include <blitz/vecglobs.h> // Global functions #include <blitz/vecglobs.h> // Global functions
#include <blitz/vector.cc> // Member functions #include <blitz/vector.cc> // Member functions
#include <blitz/vecio.cc> // IO functions #include <blitz/vecio.cc> // IO functions
 End of changes. 50 change blocks. 
155 lines changed or deleted 91 lines changed or added


 vecuops.cc   vecuops.cc 
/************************************************************************** * /************************************************************************** *
* blitz/vecuops.cc Expression templates for vectors, unary functions * blitz/../vecuops.cc Expression templates for vectors, unary functions
*
* $Id: vecuops.cc,v 1.3 2002/06/29 00:09:25 jcumming Exp $
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-suggest@cybervision.com * Suggestions: blitz-suggest@cybervision.com
* Bugs: blitz-bugs@cybervision.com * Bugs: blitz-bugs@cybervision.com
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://seurat.uwaterloo.ca/blitz/ * http://seurat.uwaterloo.ca/blitz/
* *
************************************************************************** * ************************************************************************** *
* $Log: vecuops.cc,v $
* Revision 1.3 2002/06/29 00:09:25 jcumming
* Freshly generated from genvecuops.cpp. Changed BZ_HAVE_SYSV_MATH to
* BZ_HAVE_SYSTEM_V_MATH to match what is in config.h and elsewhere.
* Corrected categorization of a few math functions. Otherwise, no changes
.
*
* Revision 1.2 2001/01/26 20:11:25 tveldhui
* Changed isnan to blitz_isnan, to avoid conflicts with implementations
* that define isnan as a preprocessor macro.
*
* Revision 1.1 2000/06/19 13:02:47 tveldhui
* Initial source check-in; added files not usually released in the
* distribution.
* *
*/ */
// Generated source file. Do not edit. // Generated source file. Do not edit.
// genvecuops.cpp Jun 28 2002 16:11:47 // genvecuops.cpp Oct 6 2005 15:58:48
#ifndef BZ_VECUOPS_CC #ifndef BZ_VECUOPS_CC
#define BZ_VECUOPS_CC #define BZ_VECUOPS_CC
#ifndef BZ_VECEXPR_H #ifndef BZ_VECEXPR_H
#error <blitz/vecuops.cc> must be included via <blitz/vecexpr.h> #error <blitz/vecuops.cc> must be included via <blitz/vecexpr.h>
#endif // BZ_VECEXPR_H #endif // BZ_VECEXPR_H
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
skipping to change at line 64 skipping to change at line 49
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_abs<P_numtype1> > > _bz_abs<P_numtype1> > >
abs(const Vector<P_numtype1>& d1) abs(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_abs<P_numtype1> > T_expr; _bz_abs<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > > _bz_abs<typename P_expr1::T_numtype> > >
abs(_bz_VecExpr<P_expr1> d1) abs(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > T_expr; _bz_abs<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_abs<P_numtype1> > > _bz_abs<P_numtype1> > >
abs(const VectorPick<P_numtype1>& d1) abs(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_abs<P_numtype1> > T_expr; _bz_abs<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_abs<int> > > _bz_abs<int> > >
abs(Range d1) abs(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_abs<int> > T_expr; _bz_abs<int> > T_expr;
skipping to change at line 111 skipping to change at line 96
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_abs<P_numtype1> > > _bz_abs<P_numtype1> > >
abs(const TinyVector<P_numtype1, N_length1>& d1) abs(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_abs<P_numtype1> > T_expr; _bz_abs<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* acos * acos
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_acos<P_numtype1> > > _bz_acos<P_numtype1> > >
acos(const Vector<P_numtype1>& d1) acos(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_acos<P_numtype1> > T_expr; _bz_acos<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_acos<_bz_typename P_expr1::T_numtype> > > _bz_acos<typename P_expr1::T_numtype> > >
acos(_bz_VecExpr<P_expr1> d1) acos(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_acos<_bz_typename P_expr1::T_numtype> > T_expr; _bz_acos<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_acos<P_numtype1> > > _bz_acos<P_numtype1> > >
acos(const VectorPick<P_numtype1>& d1) acos(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_acos<P_numtype1> > T_expr; _bz_acos<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_acos<int> > > _bz_acos<int> > >
acos(Range d1) acos(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_acos<int> > T_expr; _bz_acos<int> > T_expr;
skipping to change at line 174 skipping to change at line 159
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_acos<P_numtype1> > > _bz_acos<P_numtype1> > >
acos(const TinyVector<P_numtype1, N_length1>& d1) acos(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_acos<P_numtype1> > T_expr; _bz_acos<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* acosh * acosh
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_acosh<P_numtype1> > > _bz_acosh<P_numtype1> > >
acosh(const Vector<P_numtype1>& d1) acosh(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_acosh<P_numtype1> > T_expr; _bz_acosh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_acosh<_bz_typename P_expr1::T_numtype> > > _bz_acosh<typename P_expr1::T_numtype> > >
acosh(_bz_VecExpr<P_expr1> d1) acosh(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_acosh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_acosh<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_acosh<P_numtype1> > > _bz_acosh<P_numtype1> > >
acosh(const VectorPick<P_numtype1>& d1) acosh(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_acosh<P_numtype1> > T_expr; _bz_acosh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_acosh<int> > > _bz_acosh<int> > >
acosh(Range d1) acosh(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_acosh<int> > T_expr; _bz_acosh<int> > T_expr;
skipping to change at line 238 skipping to change at line 223
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_acosh<P_numtype1> > > _bz_acosh<P_numtype1> > >
acosh(const TinyVector<P_numtype1, N_length1>& d1) acosh(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_acosh<P_numtype1> > T_expr; _bz_acosh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* asin * asin
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_asin<P_numtype1> > > _bz_asin<P_numtype1> > >
asin(const Vector<P_numtype1>& d1) asin(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_asin<P_numtype1> > T_expr; _bz_asin<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_asin<_bz_typename P_expr1::T_numtype> > > _bz_asin<typename P_expr1::T_numtype> > >
asin(_bz_VecExpr<P_expr1> d1) asin(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_asin<_bz_typename P_expr1::T_numtype> > T_expr; _bz_asin<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_asin<P_numtype1> > > _bz_asin<P_numtype1> > >
asin(const VectorPick<P_numtype1>& d1) asin(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_asin<P_numtype1> > T_expr; _bz_asin<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_asin<int> > > _bz_asin<int> > >
asin(Range d1) asin(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_asin<int> > T_expr; _bz_asin<int> > T_expr;
skipping to change at line 303 skipping to change at line 288
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_asin<P_numtype1> > > _bz_asin<P_numtype1> > >
asin(const TinyVector<P_numtype1, N_length1>& d1) asin(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_asin<P_numtype1> > T_expr; _bz_asin<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* asinh * asinh
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_asinh<P_numtype1> > > _bz_asinh<P_numtype1> > >
asinh(const Vector<P_numtype1>& d1) asinh(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_asinh<P_numtype1> > T_expr; _bz_asinh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_asinh<_bz_typename P_expr1::T_numtype> > > _bz_asinh<typename P_expr1::T_numtype> > >
asinh(_bz_VecExpr<P_expr1> d1) asinh(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_asinh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_asinh<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_asinh<P_numtype1> > > _bz_asinh<P_numtype1> > >
asinh(const VectorPick<P_numtype1>& d1) asinh(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_asinh<P_numtype1> > T_expr; _bz_asinh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_asinh<int> > > _bz_asinh<int> > >
asinh(Range d1) asinh(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_asinh<int> > T_expr; _bz_asinh<int> > T_expr;
skipping to change at line 367 skipping to change at line 352
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_asinh<P_numtype1> > > _bz_asinh<P_numtype1> > >
asinh(const TinyVector<P_numtype1, N_length1>& d1) asinh(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_asinh<P_numtype1> > T_expr; _bz_asinh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* atan * atan
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_atan<P_numtype1> > > _bz_atan<P_numtype1> > >
atan(const Vector<P_numtype1>& d1) atan(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_atan<P_numtype1> > T_expr; _bz_atan<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_atan<_bz_typename P_expr1::T_numtype> > > _bz_atan<typename P_expr1::T_numtype> > >
atan(_bz_VecExpr<P_expr1> d1) atan(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_atan<_bz_typename P_expr1::T_numtype> > T_expr; _bz_atan<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_atan<P_numtype1> > > _bz_atan<P_numtype1> > >
atan(const VectorPick<P_numtype1>& d1) atan(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_atan<P_numtype1> > T_expr; _bz_atan<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_atan<int> > > _bz_atan<int> > >
atan(Range d1) atan(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_atan<int> > T_expr; _bz_atan<int> > T_expr;
skipping to change at line 432 skipping to change at line 417
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_atan<P_numtype1> > > _bz_atan<P_numtype1> > >
atan(const TinyVector<P_numtype1, N_length1>& d1) atan(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_atan<P_numtype1> > T_expr; _bz_atan<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
}
/**************************************************************************
**
* atan2
**************************************************************************
**/
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_atan2<P_numtype1,P_numtype2> > >
atan2(const Vector<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_atan2<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_atan2<P_numtype1,typename P_expr2::T_numtype> > >
atan2(const Vector<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_atan2<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_atan2<P_numtype1,P_numtype2> > >
atan2(const Vector<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_atan2<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_atan2<P_numtype1,int> > >
atan2(const Vector<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_atan2<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_atan2<P_numtype1,P_numtype2> > >
atan2(const Vector<P_numtype1>& d1, const TinyVector<P_numtype2, N_length2>
& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_atan2<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_atan2<P_numtype1,int> > >
atan2(const Vector<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_atan2<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_atan2<P_numtype1,float> > >
atan2(const Vector<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_atan2<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_atan2<P_numtype1,double> > >
atan2(const Vector<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_atan2<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_atan2<P_numtype1,long double> > >
atan2(const Vector<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_atan2<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_atan2<P_numtype1,complex<T2> > > >
atan2(const Vector<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_atan2<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_atan2<typename P_expr1::T_numtype,P_numtype2> > >
atan2(_bz_VecExpr<P_expr1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_atan2<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_atan2<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
atan2(_bz_VecExpr<P_expr1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_atan2<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_atan2<typename P_expr1::T_numtype,P_numtype2> > >
atan2(_bz_VecExpr<P_expr1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_atan2<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_atan2<typename P_expr1::T_numtype,int> > >
atan2(_bz_VecExpr<P_expr1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_atan2<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_atan2<typename P_expr1::T_numtype,P_numtype2> > >
atan2(_bz_VecExpr<P_expr1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_atan2<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_atan2<typename P_expr1::T_numtype,int> > >
atan2(_bz_VecExpr<P_expr1> d1, int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_atan2<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_atan2<typename P_expr1::T_numtype,float> > >
atan2(_bz_VecExpr<P_expr1> d1, float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_atan2<typename P_expr1::T_numtype,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_atan2<typename P_expr1::T_numtype,double> > >
atan2(_bz_VecExpr<P_expr1> d1, double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_atan2<typename P_expr1::T_numtype,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_atan2<typename P_expr1::T_numtype,long double> > >
atan2(_bz_VecExpr<P_expr1> d1, long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_atan2<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_atan2<typename P_expr1::T_numtype,complex<T2> > > >
atan2(_bz_VecExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_atan2<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_atan2<P_numtype1,P_numtype2> > >
atan2(const VectorPick<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_atan2<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_atan2<P_numtype1,typename P_expr2::T_numtype> > >
atan2(const VectorPick<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_atan2<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_atan2<P_numtype1,P_numtype2> > >
atan2(const VectorPick<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_atan2<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_atan2<P_numtype1,int> > >
atan2(const VectorPick<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_atan2<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_atan2<P_numtype1,P_numtype2> > >
atan2(const VectorPick<P_numtype1>& d1, const TinyVector<P_numtype2, N_leng
th2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_atan2<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_atan2<P_numtype1,int> > >
atan2(const VectorPick<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_atan2<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_atan2<P_numtype1,float> > >
atan2(const VectorPick<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_atan2<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_atan2<P_numtype1,double> > >
atan2(const VectorPick<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_atan2<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_atan2<P_numtype1,long double> > >
atan2(const VectorPick<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_atan2<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_atan2<P_numtype1,complex<T2> > > >
atan2(const VectorPick<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_atan2<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_atan2<int,P_numtype2> > >
atan2(Range d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_atan2<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_atan2<int,typename P_expr2::T_numtype> > >
atan2(Range d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_atan2<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_atan2<int,P_numtype2> > >
atan2(Range d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_atan2<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, Range,
_bz_atan2<int,int> > >
atan2(Range d1, Range d2)
{
typedef _bz_VecExprOp<Range, Range,
_bz_atan2<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_atan2<int,P_numtype2> > >
atan2(Range d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_atan2<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_atan2<int,int> > >
atan2(Range d1, int d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_atan2<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_atan2<int,float> > >
atan2(Range d1, float d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_atan2<int,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_atan2<int,double> > >
atan2(Range d1, double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_atan2<int,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_atan2<int,long double> > >
atan2(Range d1, long double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_atan2<int,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_atan2<int,complex<T2> > > >
atan2(Range d1, complex<T2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_atan2<int,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_atan2<P_numtype1,P_numtype2> > >
atan2(const TinyVector<P_numtype1, N_length1>& d1, const Vector<P_numtype2>
& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_atan2<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_atan2<P_numtype1,typename P_expr2::T_numtype> > >
atan2(const TinyVector<P_numtype1, N_length1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_atan2<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_atan2<P_numtype1,P_numtype2> > >
atan2(const TinyVector<P_numtype1, N_length1>& d1, const VectorPick<P_numty
pe2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_atan2<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_atan2<P_numtype1,int> > >
atan2(const TinyVector<P_numtype1, N_length1>& d1, Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_atan2<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_atan2<P_numtype1,P_numtype2> > >
atan2(const TinyVector<P_numtype1, N_length1>& d1, const TinyVector<P_numty
pe2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_atan2<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_atan2<P_numtype1,int> > >
atan2(const TinyVector<P_numtype1, N_length1>& d1, int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_atan2<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_atan2<P_numtype1,float> > >
atan2(const TinyVector<P_numtype1, N_length1>& d1, float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_atan2<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_atan2<P_numtype1,double> > >
atan2(const TinyVector<P_numtype1, N_length1>& d1, double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_atan2<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_atan2<P_numtype1,long double> > >
atan2(const TinyVector<P_numtype1, N_length1>& d1, long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_atan2<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_atan2<P_numtype1,complex<T2> > > >
atan2(const TinyVector<P_numtype1, N_length1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_atan2<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_atan2<int,P_numtype2> > >
atan2(int d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_atan2<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_atan2<int,typename P_expr2::T_numtype> > >
atan2(int d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_atan2<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_atan2<int,P_numtype2> > >
atan2(int d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_atan2<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_atan2<int,int> > >
atan2(int d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_atan2<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_atan2<int,P_numtype2> > >
atan2(int d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_atan2<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_atan2<float,P_numtype2> > >
atan2(float d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_atan2<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_atan2<float,typename P_expr2::T_numtype> > >
atan2(float d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_atan2<float,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_atan2<float,P_numtype2> > >
atan2(float d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_atan2<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_atan2<float,int> > >
atan2(float d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_atan2<float,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_atan2<float,P_numtype2> > >
atan2(float d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_atan2<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_atan2<double,P_numtype2> > >
atan2(double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_atan2<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_atan2<double,typename P_expr2::T_numtype> > >
atan2(double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_atan2<double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_atan2<double,P_numtype2> > >
atan2(double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_atan2<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_atan2<double,int> > >
atan2(double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_atan2<double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_atan2<double,P_numtype2> > >
atan2(double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_atan2<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_atan2<long double,P_numtype2> > >
atan2(long double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_atan2<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_atan2<long double,typename P_expr2::T_numtype> > >
atan2(long double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_atan2<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_atan2<long double,P_numtype2> > >
atan2(long double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_atan2<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_atan2<long double,int> > >
atan2(long double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_atan2<long double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_atan2<long double,P_numtype2> > >
atan2(long double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_atan2<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_atan2<complex<T1> ,P_numtype2> > >
atan2(complex<T1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_atan2<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_atan2<complex<T1> ,typename P_expr2::T_numtype> > >
atan2(complex<T1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_atan2<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_atan2<complex<T1> ,P_numtype2> > >
atan2(complex<T1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_atan2<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_atan2<complex<T1> ,int> > >
atan2(complex<T1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_atan2<complex<T1> ,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_atan2<complex<T1> ,P_numtype2> > >
atan2(complex<T1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_atan2<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* atanh * atanh
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_atanh<P_numtype1> > > _bz_atanh<P_numtype1> > >
atanh(const Vector<P_numtype1>& d1) atanh(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_atanh<P_numtype1> > T_expr; _bz_atanh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_atanh<_bz_typename P_expr1::T_numtype> > > _bz_atanh<typename P_expr1::T_numtype> > >
atanh(_bz_VecExpr<P_expr1> d1) atanh(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_atanh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_atanh<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_atanh<P_numtype1> > > _bz_atanh<P_numtype1> > >
atanh(const VectorPick<P_numtype1>& d1) atanh(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_atanh<P_numtype1> > T_expr; _bz_atanh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_atanh<int> > > _bz_atanh<int> > >
atanh(Range d1) atanh(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_atanh<int> > T_expr; _bz_atanh<int> > T_expr;
skipping to change at line 496 skipping to change at line 1376
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_atanh<P_numtype1> > > _bz_atanh<P_numtype1> > >
atanh(const TinyVector<P_numtype1, N_length1>& d1) atanh(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_atanh<P_numtype1> > T_expr; _bz_atanh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* _class * _class
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz__class<P_numtype1> > > _bz__class<P_numtype1> > >
_class(const Vector<P_numtype1>& d1) _class(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz__class<P_numtype1> > T_expr; _bz__class<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz__class<_bz_typename P_expr1::T_numtype> > > _bz__class<typename P_expr1::T_numtype> > >
_class(_bz_VecExpr<P_expr1> d1) _class(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz__class<_bz_typename P_expr1::T_numtype> > T_expr; _bz__class<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz__class<P_numtype1> > > _bz__class<P_numtype1> > >
_class(const VectorPick<P_numtype1>& d1) _class(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz__class<P_numtype1> > T_expr; _bz__class<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz__class<int> > > _bz__class<int> > >
_class(Range d1) _class(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz__class<int> > T_expr; _bz__class<int> > T_expr;
skipping to change at line 562 skipping to change at line 1442
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz__class<P_numtype1> > > _bz__class<P_numtype1> > >
_class(const TinyVector<P_numtype1, N_length1>& d1) _class(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz__class<P_numtype1> > T_expr; _bz__class<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* cbrt * cbrt
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_cbrt<P_numtype1> > > _bz_cbrt<P_numtype1> > >
cbrt(const Vector<P_numtype1>& d1) cbrt(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_cbrt<P_numtype1> > T_expr; _bz_cbrt<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_cbrt<_bz_typename P_expr1::T_numtype> > > _bz_cbrt<typename P_expr1::T_numtype> > >
cbrt(_bz_VecExpr<P_expr1> d1) cbrt(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_cbrt<_bz_typename P_expr1::T_numtype> > T_expr; _bz_cbrt<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_cbrt<P_numtype1> > > _bz_cbrt<P_numtype1> > >
cbrt(const VectorPick<P_numtype1>& d1) cbrt(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_cbrt<P_numtype1> > T_expr; _bz_cbrt<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_cbrt<int> > > _bz_cbrt<int> > >
cbrt(Range d1) cbrt(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_cbrt<int> > T_expr; _bz_cbrt<int> > T_expr;
skipping to change at line 628 skipping to change at line 1508
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_cbrt<P_numtype1> > > _bz_cbrt<P_numtype1> > >
cbrt(const TinyVector<P_numtype1, N_length1>& d1) cbrt(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_cbrt<P_numtype1> > T_expr; _bz_cbrt<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* ceil * ceil
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_ceil<P_numtype1> > > _bz_ceil<P_numtype1> > >
ceil(const Vector<P_numtype1>& d1) ceil(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_ceil<P_numtype1> > T_expr; _bz_ceil<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_ceil<_bz_typename P_expr1::T_numtype> > > _bz_ceil<typename P_expr1::T_numtype> > >
ceil(_bz_VecExpr<P_expr1> d1) ceil(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_ceil<_bz_typename P_expr1::T_numtype> > T_expr; _bz_ceil<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_ceil<P_numtype1> > > _bz_ceil<P_numtype1> > >
ceil(const VectorPick<P_numtype1>& d1) ceil(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_ceil<P_numtype1> > T_expr; _bz_ceil<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_ceil<int> > > _bz_ceil<int> > >
ceil(Range d1) ceil(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_ceil<int> > T_expr; _bz_ceil<int> > T_expr;
skipping to change at line 693 skipping to change at line 1573
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_ceil<P_numtype1> > > _bz_ceil<P_numtype1> > >
ceil(const TinyVector<P_numtype1, N_length1>& d1) ceil(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_ceil<P_numtype1> > T_expr; _bz_ceil<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
}
/**************************************************************************
**
* conj
**************************************************************************
**/
#ifdef BZ_HAVE_COMPLEX_FCNS
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_conj<P_numtype1> > >
conj(const Vector<P_numtype1>& d1)
{
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_conj<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_conj<typename P_expr1::T_numtype> > >
conj(_bz_VecExpr<P_expr1> d1)
{
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_conj<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_conj<P_numtype1> > >
conj(const VectorPick<P_numtype1>& d1)
{
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_conj<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_conj<int> > >
conj(Range d1)
{
typedef _bz_VecExprUnaryOp<Range,
_bz_conj<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_conj<P_numtype1> > >
conj(const TinyVector<P_numtype1, N_length1>& d1)
{
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_conj<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
}
#endif
/**************************************************************************
**
* copysign
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_copysign<P_numtype1,P_numtype2> > >
copysign(const Vector<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_copysign<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_copysign<P_numtype1,typename P_expr2::T_numtype> > >
copysign(const Vector<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_copysign<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_copysign<P_numtype1,P_numtype2> > >
copysign(const Vector<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_copysign<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_copysign<P_numtype1,int> > >
copysign(const Vector<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_copysign<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_copysign<P_numtype1,P_numtype2> > >
copysign(const Vector<P_numtype1>& d1, const TinyVector<P_numtype2, N_lengt
h2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_copysign<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_copysign<P_numtype1,int> > >
copysign(const Vector<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_copysign<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_copysign<P_numtype1,float> > >
copysign(const Vector<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_copysign<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_copysign<P_numtype1,double> > >
copysign(const Vector<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_copysign<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_copysign<P_numtype1,long double> > >
copysign(const Vector<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_copysign<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_copysign<P_numtype1,complex<T2> > > >
copysign(const Vector<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_copysign<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_copysign<typename P_expr1::T_numtype,P_numtype2> > >
copysign(_bz_VecExpr<P_expr1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_copysign<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_copysign<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >
>
copysign(_bz_VecExpr<P_expr1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_copysign<typename P_expr1::T_numtype,typename P_expr2::T_numtyp
e> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_copysign<typename P_expr1::T_numtype,P_numtype2> > >
copysign(_bz_VecExpr<P_expr1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_copysign<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_copysign<typename P_expr1::T_numtype,int> > >
copysign(_bz_VecExpr<P_expr1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_copysign<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_copysign<typename P_expr1::T_numtype,P_numtype2> > >
copysign(_bz_VecExpr<P_expr1> d1, const TinyVector<P_numtype2, N_length2>&
d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_copysign<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_copysign<typename P_expr1::T_numtype,int> > >
copysign(_bz_VecExpr<P_expr1> d1, int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_copysign<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_copysign<typename P_expr1::T_numtype,float> > >
copysign(_bz_VecExpr<P_expr1> d1, float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_copysign<typename P_expr1::T_numtype,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_copysign<typename P_expr1::T_numtype,double> > >
copysign(_bz_VecExpr<P_expr1> d1, double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_copysign<typename P_expr1::T_numtype,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_copysign<typename P_expr1::T_numtype,long double> > >
copysign(_bz_VecExpr<P_expr1> d1, long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_copysign<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_copysign<typename P_expr1::T_numtype,complex<T2> > > >
copysign(_bz_VecExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_copysign<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_copysign<P_numtype1,P_numtype2> > >
copysign(const VectorPick<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_copysign<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_copysign<P_numtype1,typename P_expr2::T_numtype> > >
copysign(const VectorPick<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_copysign<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_copysign<P_numtype1,P_numtype2> > >
copysign(const VectorPick<P_numtype1>& d1, const VectorPick<P_numtype2>& d2
)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_copysign<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_copysign<P_numtype1,int> > >
copysign(const VectorPick<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_copysign<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_copysign<P_numtype1,P_numtype2> > >
copysign(const VectorPick<P_numtype1>& d1, const TinyVector<P_numtype2, N_l
ength2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_copysign<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_copysign<P_numtype1,int> > >
copysign(const VectorPick<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_copysign<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_copysign<P_numtype1,float> > >
copysign(const VectorPick<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_copysign<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_copysign<P_numtype1,double> > >
copysign(const VectorPick<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_copysign<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_copysign<P_numtype1,long double> > >
copysign(const VectorPick<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_copysign<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_copysign<P_numtype1,complex<T2> > > >
copysign(const VectorPick<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_copysign<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_copysign<int,P_numtype2> > >
copysign(Range d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_copysign<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_copysign<int,typename P_expr2::T_numtype> > >
copysign(Range d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_copysign<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_copysign<int,P_numtype2> > >
copysign(Range d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_copysign<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, Range,
_bz_copysign<int,int> > >
copysign(Range d1, Range d2)
{
typedef _bz_VecExprOp<Range, Range,
_bz_copysign<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_copysign<int,P_numtype2> > >
copysign(Range d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_copysign<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_copysign<int,int> > >
copysign(Range d1, int d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_copysign<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_copysign<int,float> > >
copysign(Range d1, float d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_copysign<int,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_copysign<int,double> > >
copysign(Range d1, double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_copysign<int,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_copysign<int,long double> > >
copysign(Range d1, long double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_copysign<int,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_copysign<int,complex<T2> > > >
copysign(Range d1, complex<T2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_copysign<int,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_copysign<P_numtype1,P_numtype2> > >
copysign(const TinyVector<P_numtype1, N_length1>& d1, const Vector<P_numtyp
e2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_copysign<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_copysign<P_numtype1,typename P_expr2::T_numtype> > >
copysign(const TinyVector<P_numtype1, N_length1>& d1, _bz_VecExpr<P_expr2>
d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_copysign<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_copysign<P_numtype1,P_numtype2> > >
copysign(const TinyVector<P_numtype1, N_length1>& d1, const VectorPick<P_nu
mtype2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_copysign<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_copysign<P_numtype1,int> > >
copysign(const TinyVector<P_numtype1, N_length1>& d1, Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_copysign<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_copysign<P_numtype1,P_numtype2> > >
copysign(const TinyVector<P_numtype1, N_length1>& d1, const TinyVector<P_nu
mtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_copysign<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_copysign<P_numtype1,int> > >
copysign(const TinyVector<P_numtype1, N_length1>& d1, int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_copysign<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_copysign<P_numtype1,float> > >
copysign(const TinyVector<P_numtype1, N_length1>& d1, float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_copysign<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_copysign<P_numtype1,double> > >
copysign(const TinyVector<P_numtype1, N_length1>& d1, double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_copysign<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_copysign<P_numtype1,long double> > >
copysign(const TinyVector<P_numtype1, N_length1>& d1, long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_copysign<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_copysign<P_numtype1,complex<T2> > > >
copysign(const TinyVector<P_numtype1, N_length1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_copysign<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_copysign<int,P_numtype2> > >
copysign(int d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_copysign<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_copysign<int,typename P_expr2::T_numtype> > >
copysign(int d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_copysign<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_copysign<int,P_numtype2> > >
copysign(int d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_copysign<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_copysign<int,int> > >
copysign(int d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_copysign<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_copysign<int,P_numtype2> > >
copysign(int d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_copysign<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_copysign<float,P_numtype2> > >
copysign(float d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_copysign<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_copysign<float,typename P_expr2::T_numtype> > >
copysign(float d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_copysign<float,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_copysign<float,P_numtype2> > >
copysign(float d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_copysign<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_copysign<float,int> > >
copysign(float d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_copysign<float,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_copysign<float,P_numtype2> > >
copysign(float d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_copysign<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_copysign<double,P_numtype2> > >
copysign(double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_copysign<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_copysign<double,typename P_expr2::T_numtype> > >
copysign(double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_copysign<double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_copysign<double,P_numtype2> > >
copysign(double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_copysign<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_copysign<double,int> > >
copysign(double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_copysign<double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_copysign<double,P_numtype2> > >
copysign(double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_copysign<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_copysign<long double,P_numtype2> > >
copysign(long double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_copysign<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_copysign<long double,typename P_expr2::T_numtype> > >
copysign(long double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_copysign<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_copysign<long double,P_numtype2> > >
copysign(long double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_copysign<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_copysign<long double,int> > >
copysign(long double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_copysign<long double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_copysign<long double,P_numtype2> > >
copysign(long double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_copysign<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_copysign<complex<T1> ,P_numtype2> > >
copysign(complex<T1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_copysign<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_copysign<complex<T1> ,typename P_expr2::T_numtype> > >
copysign(complex<T1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_copysign<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_copysign<complex<T1> ,P_numtype2> > >
copysign(complex<T1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_copysign<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_copysign<complex<T1> ,int> > >
copysign(complex<T1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_copysign<complex<T1> ,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
} }
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_copysign<complex<T1> ,P_numtype2> > >
copysign(complex<T1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_copysign<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
#endif
/************************************************************************** ** /************************************************************************** **
* cos * cos
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_cos<P_numtype1> > > _bz_cos<P_numtype1> > >
cos(const Vector<P_numtype1>& d1) cos(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_cos<P_numtype1> > T_expr; _bz_cos<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_cos<_bz_typename P_expr1::T_numtype> > > _bz_cos<typename P_expr1::T_numtype> > >
cos(_bz_VecExpr<P_expr1> d1) cos(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_cos<_bz_typename P_expr1::T_numtype> > T_expr; _bz_cos<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_cos<P_numtype1> > > _bz_cos<P_numtype1> > >
cos(const VectorPick<P_numtype1>& d1) cos(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_cos<P_numtype1> > T_expr; _bz_cos<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_cos<int> > > _bz_cos<int> > >
cos(Range d1) cos(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_cos<int> > T_expr; _bz_cos<int> > T_expr;
skipping to change at line 756 skipping to change at line 2600
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_cos<P_numtype1> > > _bz_cos<P_numtype1> > >
cos(const TinyVector<P_numtype1, N_length1>& d1) cos(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_cos<P_numtype1> > T_expr; _bz_cos<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* cosh * cosh
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_cosh<P_numtype1> > > _bz_cosh<P_numtype1> > >
cosh(const Vector<P_numtype1>& d1) cosh(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_cosh<P_numtype1> > T_expr; _bz_cosh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_cosh<_bz_typename P_expr1::T_numtype> > > _bz_cosh<typename P_expr1::T_numtype> > >
cosh(_bz_VecExpr<P_expr1> d1) cosh(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_cosh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_cosh<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_cosh<P_numtype1> > > _bz_cosh<P_numtype1> > >
cosh(const VectorPick<P_numtype1>& d1) cosh(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_cosh<P_numtype1> > T_expr; _bz_cosh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_cosh<int> > > _bz_cosh<int> > >
cosh(Range d1) cosh(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_cosh<int> > T_expr; _bz_cosh<int> > T_expr;
skipping to change at line 819 skipping to change at line 2663
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_cosh<P_numtype1> > > _bz_cosh<P_numtype1> > >
cosh(const TinyVector<P_numtype1, N_length1>& d1) cosh(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_cosh<P_numtype1> > T_expr; _bz_cosh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
}
/**************************************************************************
**
* drem
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_drem<P_numtype1,P_numtype2> > >
drem(const Vector<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_drem<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_drem<P_numtype1,typename P_expr2::T_numtype> > >
drem(const Vector<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_drem<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_drem<P_numtype1,P_numtype2> > >
drem(const Vector<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_drem<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_drem<P_numtype1,int> > >
drem(const Vector<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_drem<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_drem<P_numtype1,P_numtype2> > >
drem(const Vector<P_numtype1>& d1, const TinyVector<P_numtype2, N_length2>&
d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_drem<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_drem<P_numtype1,int> > >
drem(const Vector<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_drem<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_drem<P_numtype1,float> > >
drem(const Vector<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_drem<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_drem<P_numtype1,double> > >
drem(const Vector<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_drem<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_drem<P_numtype1,long double> > >
drem(const Vector<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_drem<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_drem<P_numtype1,complex<T2> > > >
drem(const Vector<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_drem<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_drem<typename P_expr1::T_numtype,P_numtype2> > >
drem(_bz_VecExpr<P_expr1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_drem<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_drem<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
drem(_bz_VecExpr<P_expr1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_drem<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >
T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_drem<typename P_expr1::T_numtype,P_numtype2> > >
drem(_bz_VecExpr<P_expr1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_drem<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_drem<typename P_expr1::T_numtype,int> > >
drem(_bz_VecExpr<P_expr1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_drem<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_drem<typename P_expr1::T_numtype,P_numtype2> > >
drem(_bz_VecExpr<P_expr1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_drem<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_drem<typename P_expr1::T_numtype,int> > >
drem(_bz_VecExpr<P_expr1> d1, int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_drem<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_drem<typename P_expr1::T_numtype,float> > >
drem(_bz_VecExpr<P_expr1> d1, float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_drem<typename P_expr1::T_numtype,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_drem<typename P_expr1::T_numtype,double> > >
drem(_bz_VecExpr<P_expr1> d1, double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_drem<typename P_expr1::T_numtype,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_drem<typename P_expr1::T_numtype,long double> > >
drem(_bz_VecExpr<P_expr1> d1, long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_drem<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_drem<typename P_expr1::T_numtype,complex<T2> > > >
drem(_bz_VecExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_drem<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_drem<P_numtype1,P_numtype2> > >
drem(const VectorPick<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_drem<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_drem<P_numtype1,typename P_expr2::T_numtype> > >
drem(const VectorPick<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_drem<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_drem<P_numtype1,P_numtype2> > >
drem(const VectorPick<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_drem<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_drem<P_numtype1,int> > >
drem(const VectorPick<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_drem<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_drem<P_numtype1,P_numtype2> > >
drem(const VectorPick<P_numtype1>& d1, const TinyVector<P_numtype2, N_lengt
h2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_drem<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_drem<P_numtype1,int> > >
drem(const VectorPick<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_drem<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_drem<P_numtype1,float> > >
drem(const VectorPick<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_drem<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_drem<P_numtype1,double> > >
drem(const VectorPick<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_drem<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_drem<P_numtype1,long double> > >
drem(const VectorPick<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_drem<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_drem<P_numtype1,complex<T2> > > >
drem(const VectorPick<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_drem<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_drem<int,P_numtype2> > >
drem(Range d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_drem<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_drem<int,typename P_expr2::T_numtype> > >
drem(Range d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_drem<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_drem<int,P_numtype2> > >
drem(Range d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_drem<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, Range,
_bz_drem<int,int> > >
drem(Range d1, Range d2)
{
typedef _bz_VecExprOp<Range, Range,
_bz_drem<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_drem<int,P_numtype2> > >
drem(Range d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_drem<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_drem<int,int> > >
drem(Range d1, int d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_drem<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_drem<int,float> > >
drem(Range d1, float d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_drem<int,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_drem<int,double> > >
drem(Range d1, double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_drem<int,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_drem<int,long double> > >
drem(Range d1, long double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_drem<int,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_drem<int,complex<T2> > > >
drem(Range d1, complex<T2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_drem<int,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_drem<P_numtype1,P_numtype2> > >
drem(const TinyVector<P_numtype1, N_length1>& d1, const Vector<P_numtype2>&
d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_drem<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_drem<P_numtype1,typename P_expr2::T_numtype> > >
drem(const TinyVector<P_numtype1, N_length1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_drem<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_drem<P_numtype1,P_numtype2> > >
drem(const TinyVector<P_numtype1, N_length1>& d1, const VectorPick<P_numtyp
e2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_drem<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_drem<P_numtype1,int> > >
drem(const TinyVector<P_numtype1, N_length1>& d1, Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_drem<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_drem<P_numtype1,P_numtype2> > >
drem(const TinyVector<P_numtype1, N_length1>& d1, const TinyVector<P_numtyp
e2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_drem<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_drem<P_numtype1,int> > >
drem(const TinyVector<P_numtype1, N_length1>& d1, int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_drem<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_drem<P_numtype1,float> > >
drem(const TinyVector<P_numtype1, N_length1>& d1, float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_drem<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_drem<P_numtype1,double> > >
drem(const TinyVector<P_numtype1, N_length1>& d1, double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_drem<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_drem<P_numtype1,long double> > >
drem(const TinyVector<P_numtype1, N_length1>& d1, long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_drem<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
} }
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_drem<P_numtype1,complex<T2> > > >
drem(const TinyVector<P_numtype1, N_length1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_drem<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_drem<int,P_numtype2> > >
drem(int d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_drem<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_drem<int,typename P_expr2::T_numtype> > >
drem(int d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_drem<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_drem<int,P_numtype2> > >
drem(int d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_drem<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_drem<int,int> > >
drem(int d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_drem<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_drem<int,P_numtype2> > >
drem(int d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_drem<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_drem<float,P_numtype2> > >
drem(float d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_drem<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_drem<float,typename P_expr2::T_numtype> > >
drem(float d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_drem<float,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_drem<float,P_numtype2> > >
drem(float d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_drem<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_drem<float,int> > >
drem(float d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_drem<float,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_drem<float,P_numtype2> > >
drem(float d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_drem<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_drem<double,P_numtype2> > >
drem(double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_drem<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_drem<double,typename P_expr2::T_numtype> > >
drem(double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_drem<double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_drem<double,P_numtype2> > >
drem(double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_drem<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_drem<double,int> > >
drem(double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_drem<double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_drem<double,P_numtype2> > >
drem(double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_drem<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_drem<long double,P_numtype2> > >
drem(long double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_drem<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_drem<long double,typename P_expr2::T_numtype> > >
drem(long double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_drem<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_drem<long double,P_numtype2> > >
drem(long double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_drem<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_drem<long double,int> > >
drem(long double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_drem<long double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_drem<long double,P_numtype2> > >
drem(long double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_drem<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_drem<complex<T1> ,P_numtype2> > >
drem(complex<T1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_drem<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_drem<complex<T1> ,typename P_expr2::T_numtype> > >
drem(complex<T1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_drem<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_drem<complex<T1> ,P_numtype2> > >
drem(complex<T1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_drem<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_drem<complex<T1> ,int> > >
drem(complex<T1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_drem<complex<T1> ,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_drem<complex<T1> ,P_numtype2> > >
drem(complex<T1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_drem<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
#endif
/************************************************************************** ** /************************************************************************** **
* exp * exp
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_exp<P_numtype1> > > _bz_exp<P_numtype1> > >
exp(const Vector<P_numtype1>& d1) exp(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_exp<P_numtype1> > T_expr; _bz_exp<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_exp<_bz_typename P_expr1::T_numtype> > > _bz_exp<typename P_expr1::T_numtype> > >
exp(_bz_VecExpr<P_expr1> d1) exp(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_exp<_bz_typename P_expr1::T_numtype> > T_expr; _bz_exp<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_exp<P_numtype1> > > _bz_exp<P_numtype1> > >
exp(const VectorPick<P_numtype1>& d1) exp(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_exp<P_numtype1> > T_expr; _bz_exp<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_exp<int> > > _bz_exp<int> > >
exp(Range d1) exp(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_exp<int> > T_expr; _bz_exp<int> > T_expr;
skipping to change at line 882 skipping to change at line 3624
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_exp<P_numtype1> > > _bz_exp<P_numtype1> > >
exp(const TinyVector<P_numtype1, N_length1>& d1) exp(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_exp<P_numtype1> > T_expr; _bz_exp<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* expm1 * expm1
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_expm1<P_numtype1> > > _bz_expm1<P_numtype1> > >
expm1(const Vector<P_numtype1>& d1) expm1(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_expm1<P_numtype1> > T_expr; _bz_expm1<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_expm1<_bz_typename P_expr1::T_numtype> > > _bz_expm1<typename P_expr1::T_numtype> > >
expm1(_bz_VecExpr<P_expr1> d1) expm1(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_expm1<_bz_typename P_expr1::T_numtype> > T_expr; _bz_expm1<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_expm1<P_numtype1> > > _bz_expm1<P_numtype1> > >
expm1(const VectorPick<P_numtype1>& d1) expm1(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_expm1<P_numtype1> > T_expr; _bz_expm1<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_expm1<int> > > _bz_expm1<int> > >
expm1(Range d1) expm1(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_expm1<int> > T_expr; _bz_expm1<int> > T_expr;
skipping to change at line 946 skipping to change at line 3688
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_expm1<P_numtype1> > > _bz_expm1<P_numtype1> > >
expm1(const TinyVector<P_numtype1, N_length1>& d1) expm1(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_expm1<P_numtype1> > T_expr; _bz_expm1<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* erf * erf
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_erf<P_numtype1> > > _bz_erf<P_numtype1> > >
erf(const Vector<P_numtype1>& d1) erf(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_erf<P_numtype1> > T_expr; _bz_erf<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_erf<_bz_typename P_expr1::T_numtype> > > _bz_erf<typename P_expr1::T_numtype> > >
erf(_bz_VecExpr<P_expr1> d1) erf(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_erf<_bz_typename P_expr1::T_numtype> > T_expr; _bz_erf<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_erf<P_numtype1> > > _bz_erf<P_numtype1> > >
erf(const VectorPick<P_numtype1>& d1) erf(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_erf<P_numtype1> > T_expr; _bz_erf<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_erf<int> > > _bz_erf<int> > >
erf(Range d1) erf(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_erf<int> > T_expr; _bz_erf<int> > T_expr;
skipping to change at line 1012 skipping to change at line 3754
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_erf<P_numtype1> > > _bz_erf<P_numtype1> > >
erf(const TinyVector<P_numtype1, N_length1>& d1) erf(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_erf<P_numtype1> > T_expr; _bz_erf<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* erfc * erfc
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_erfc<P_numtype1> > > _bz_erfc<P_numtype1> > >
erfc(const Vector<P_numtype1>& d1) erfc(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_erfc<P_numtype1> > T_expr; _bz_erfc<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_erfc<_bz_typename P_expr1::T_numtype> > > _bz_erfc<typename P_expr1::T_numtype> > >
erfc(_bz_VecExpr<P_expr1> d1) erfc(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_erfc<_bz_typename P_expr1::T_numtype> > T_expr; _bz_erfc<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_erfc<P_numtype1> > > _bz_erfc<P_numtype1> > >
erfc(const VectorPick<P_numtype1>& d1) erfc(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_erfc<P_numtype1> > T_expr; _bz_erfc<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_erfc<int> > > _bz_erfc<int> > >
erfc(Range d1) erfc(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_erfc<int> > T_expr; _bz_erfc<int> > T_expr;
skipping to change at line 1078 skipping to change at line 3820
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_erfc<P_numtype1> > > _bz_erfc<P_numtype1> > >
erfc(const TinyVector<P_numtype1, N_length1>& d1) erfc(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_erfc<P_numtype1> > T_expr; _bz_erfc<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* fabs * fabs
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_abs<P_numtype1> > > _bz_abs<P_numtype1> > >
fabs(const Vector<P_numtype1>& d1) fabs(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_abs<P_numtype1> > T_expr; _bz_abs<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > > _bz_abs<typename P_expr1::T_numtype> > >
fabs(_bz_VecExpr<P_expr1> d1) fabs(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > T_expr; _bz_abs<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_abs<P_numtype1> > > _bz_abs<P_numtype1> > >
fabs(const VectorPick<P_numtype1>& d1) fabs(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_abs<P_numtype1> > T_expr; _bz_abs<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_abs<int> > > _bz_abs<int> > >
fabs(Range d1) fabs(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_abs<int> > T_expr; _bz_abs<int> > T_expr;
skipping to change at line 1143 skipping to change at line 3885
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_abs<P_numtype1> > > _bz_abs<P_numtype1> > >
fabs(const TinyVector<P_numtype1, N_length1>& d1) fabs(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_abs<P_numtype1> > T_expr; _bz_abs<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* floor * floor
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_floor<P_numtype1> > > _bz_floor<P_numtype1> > >
floor(const Vector<P_numtype1>& d1) floor(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_floor<P_numtype1> > T_expr; _bz_floor<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_floor<_bz_typename P_expr1::T_numtype> > > _bz_floor<typename P_expr1::T_numtype> > >
floor(_bz_VecExpr<P_expr1> d1) floor(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_floor<_bz_typename P_expr1::T_numtype> > T_expr; _bz_floor<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_floor<P_numtype1> > > _bz_floor<P_numtype1> > >
floor(const VectorPick<P_numtype1>& d1) floor(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_floor<P_numtype1> > T_expr; _bz_floor<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_floor<int> > > _bz_floor<int> > >
floor(Range d1) floor(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_floor<int> > T_expr; _bz_floor<int> > T_expr;
skipping to change at line 1206 skipping to change at line 3948
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_floor<P_numtype1> > > _bz_floor<P_numtype1> > >
floor(const TinyVector<P_numtype1, N_length1>& d1) floor(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_floor<P_numtype1> > T_expr; _bz_floor<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
}
/**************************************************************************
**
* fmod
**************************************************************************
**/
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_fmod<P_numtype1,P_numtype2> > >
fmod(const Vector<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_fmod<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_fmod<P_numtype1,typename P_expr2::T_numtype> > >
fmod(const Vector<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_fmod<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_fmod<P_numtype1,P_numtype2> > >
fmod(const Vector<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_fmod<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_fmod<P_numtype1,int> > >
fmod(const Vector<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_fmod<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_fmod<P_numtype1,P_numtype2> > >
fmod(const Vector<P_numtype1>& d1, const TinyVector<P_numtype2, N_length2>&
d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_fmod<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_fmod<P_numtype1,int> > >
fmod(const Vector<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_fmod<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_fmod<P_numtype1,float> > >
fmod(const Vector<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_fmod<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_fmod<P_numtype1,double> > >
fmod(const Vector<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_fmod<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_fmod<P_numtype1,long double> > >
fmod(const Vector<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_fmod<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_fmod<P_numtype1,complex<T2> > > >
fmod(const Vector<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_fmod<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_fmod<typename P_expr1::T_numtype,P_numtype2> > >
fmod(_bz_VecExpr<P_expr1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_fmod<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_fmod<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
fmod(_bz_VecExpr<P_expr1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_fmod<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >
T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_fmod<typename P_expr1::T_numtype,P_numtype2> > >
fmod(_bz_VecExpr<P_expr1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_fmod<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_fmod<typename P_expr1::T_numtype,int> > >
fmod(_bz_VecExpr<P_expr1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_fmod<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_fmod<typename P_expr1::T_numtype,P_numtype2> > >
fmod(_bz_VecExpr<P_expr1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_fmod<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_fmod<typename P_expr1::T_numtype,int> > >
fmod(_bz_VecExpr<P_expr1> d1, int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_fmod<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_fmod<typename P_expr1::T_numtype,float> > >
fmod(_bz_VecExpr<P_expr1> d1, float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_fmod<typename P_expr1::T_numtype,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_fmod<typename P_expr1::T_numtype,double> > >
fmod(_bz_VecExpr<P_expr1> d1, double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_fmod<typename P_expr1::T_numtype,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_fmod<typename P_expr1::T_numtype,long double> > >
fmod(_bz_VecExpr<P_expr1> d1, long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_fmod<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_fmod<typename P_expr1::T_numtype,complex<T2> > > >
fmod(_bz_VecExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_fmod<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_fmod<P_numtype1,P_numtype2> > >
fmod(const VectorPick<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_fmod<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_fmod<P_numtype1,typename P_expr2::T_numtype> > >
fmod(const VectorPick<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_fmod<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_fmod<P_numtype1,P_numtype2> > >
fmod(const VectorPick<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_fmod<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_fmod<P_numtype1,int> > >
fmod(const VectorPick<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_fmod<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_fmod<P_numtype1,P_numtype2> > >
fmod(const VectorPick<P_numtype1>& d1, const TinyVector<P_numtype2, N_lengt
h2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_fmod<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_fmod<P_numtype1,int> > >
fmod(const VectorPick<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_fmod<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_fmod<P_numtype1,float> > >
fmod(const VectorPick<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_fmod<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_fmod<P_numtype1,double> > >
fmod(const VectorPick<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_fmod<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_fmod<P_numtype1,long double> > >
fmod(const VectorPick<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_fmod<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_fmod<P_numtype1,complex<T2> > > >
fmod(const VectorPick<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_fmod<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_fmod<int,P_numtype2> > >
fmod(Range d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_fmod<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_fmod<int,typename P_expr2::T_numtype> > >
fmod(Range d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_fmod<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_fmod<int,P_numtype2> > >
fmod(Range d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_fmod<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, Range,
_bz_fmod<int,int> > >
fmod(Range d1, Range d2)
{
typedef _bz_VecExprOp<Range, Range,
_bz_fmod<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_fmod<int,P_numtype2> > >
fmod(Range d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_fmod<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_fmod<int,int> > >
fmod(Range d1, int d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_fmod<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_fmod<int,float> > >
fmod(Range d1, float d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_fmod<int,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_fmod<int,double> > >
fmod(Range d1, double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_fmod<int,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_fmod<int,long double> > >
fmod(Range d1, long double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_fmod<int,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_fmod<int,complex<T2> > > >
fmod(Range d1, complex<T2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_fmod<int,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_fmod<P_numtype1,P_numtype2> > >
fmod(const TinyVector<P_numtype1, N_length1>& d1, const Vector<P_numtype2>&
d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_fmod<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_fmod<P_numtype1,typename P_expr2::T_numtype> > >
fmod(const TinyVector<P_numtype1, N_length1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_fmod<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_fmod<P_numtype1,P_numtype2> > >
fmod(const TinyVector<P_numtype1, N_length1>& d1, const VectorPick<P_numtyp
e2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_fmod<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_fmod<P_numtype1,int> > >
fmod(const TinyVector<P_numtype1, N_length1>& d1, Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_fmod<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_fmod<P_numtype1,P_numtype2> > >
fmod(const TinyVector<P_numtype1, N_length1>& d1, const TinyVector<P_numtyp
e2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_fmod<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_fmod<P_numtype1,int> > >
fmod(const TinyVector<P_numtype1, N_length1>& d1, int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_fmod<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_fmod<P_numtype1,float> > >
fmod(const TinyVector<P_numtype1, N_length1>& d1, float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_fmod<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_fmod<P_numtype1,double> > >
fmod(const TinyVector<P_numtype1, N_length1>& d1, double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_fmod<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_fmod<P_numtype1,long double> > >
fmod(const TinyVector<P_numtype1, N_length1>& d1, long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_fmod<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_fmod<P_numtype1,complex<T2> > > >
fmod(const TinyVector<P_numtype1, N_length1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_fmod<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_fmod<int,P_numtype2> > >
fmod(int d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_fmod<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_fmod<int,typename P_expr2::T_numtype> > >
fmod(int d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_fmod<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_fmod<int,P_numtype2> > >
fmod(int d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_fmod<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_fmod<int,int> > >
fmod(int d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_fmod<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_fmod<int,P_numtype2> > >
fmod(int d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_fmod<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_fmod<float,P_numtype2> > >
fmod(float d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_fmod<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_fmod<float,typename P_expr2::T_numtype> > >
fmod(float d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_fmod<float,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_fmod<float,P_numtype2> > >
fmod(float d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_fmod<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_fmod<float,int> > >
fmod(float d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_fmod<float,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_fmod<float,P_numtype2> > >
fmod(float d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_fmod<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_fmod<double,P_numtype2> > >
fmod(double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_fmod<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_fmod<double,typename P_expr2::T_numtype> > >
fmod(double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_fmod<double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_fmod<double,P_numtype2> > >
fmod(double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_fmod<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_fmod<double,int> > >
fmod(double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_fmod<double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_fmod<double,P_numtype2> > >
fmod(double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_fmod<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_fmod<long double,P_numtype2> > >
fmod(long double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_fmod<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_fmod<long double,typename P_expr2::T_numtype> > >
fmod(long double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_fmod<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_fmod<long double,P_numtype2> > >
fmod(long double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_fmod<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_fmod<long double,int> > >
fmod(long double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_fmod<long double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_fmod<long double,P_numtype2> > >
fmod(long double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_fmod<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_fmod<complex<T1> ,P_numtype2> > >
fmod(complex<T1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_fmod<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_fmod<complex<T1> ,typename P_expr2::T_numtype> > >
fmod(complex<T1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_fmod<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_fmod<complex<T1> ,P_numtype2> > >
fmod(complex<T1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_fmod<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_fmod<complex<T1> ,int> > >
fmod(complex<T1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_fmod<complex<T1> ,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_fmod<complex<T1> ,P_numtype2> > >
fmod(complex<T1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_fmod<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
/**************************************************************************
**
* hypot
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_hypot<P_numtype1,P_numtype2> > >
hypot(const Vector<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_hypot<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_hypot<P_numtype1,typename P_expr2::T_numtype> > >
hypot(const Vector<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_hypot<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_hypot<P_numtype1,P_numtype2> > >
hypot(const Vector<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_hypot<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_hypot<P_numtype1,int> > >
hypot(const Vector<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_hypot<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_hypot<P_numtype1,P_numtype2> > >
hypot(const Vector<P_numtype1>& d1, const TinyVector<P_numtype2, N_length2>
& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_hypot<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_hypot<P_numtype1,int> > >
hypot(const Vector<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_hypot<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_hypot<P_numtype1,float> > >
hypot(const Vector<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_hypot<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_hypot<P_numtype1,double> > >
hypot(const Vector<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_hypot<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_hypot<P_numtype1,long double> > >
hypot(const Vector<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_hypot<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_hypot<P_numtype1,complex<T2> > > >
hypot(const Vector<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_hypot<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_hypot<typename P_expr1::T_numtype,P_numtype2> > >
hypot(_bz_VecExpr<P_expr1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_hypot<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_hypot<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
hypot(_bz_VecExpr<P_expr1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_hypot<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_hypot<typename P_expr1::T_numtype,P_numtype2> > >
hypot(_bz_VecExpr<P_expr1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_hypot<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_hypot<typename P_expr1::T_numtype,int> > >
hypot(_bz_VecExpr<P_expr1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_hypot<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_hypot<typename P_expr1::T_numtype,P_numtype2> > >
hypot(_bz_VecExpr<P_expr1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_hypot<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_hypot<typename P_expr1::T_numtype,int> > >
hypot(_bz_VecExpr<P_expr1> d1, int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_hypot<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_hypot<typename P_expr1::T_numtype,float> > >
hypot(_bz_VecExpr<P_expr1> d1, float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_hypot<typename P_expr1::T_numtype,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_hypot<typename P_expr1::T_numtype,double> > >
hypot(_bz_VecExpr<P_expr1> d1, double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_hypot<typename P_expr1::T_numtype,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_hypot<typename P_expr1::T_numtype,long double> > >
hypot(_bz_VecExpr<P_expr1> d1, long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_hypot<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_hypot<typename P_expr1::T_numtype,complex<T2> > > >
hypot(_bz_VecExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_hypot<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_hypot<P_numtype1,P_numtype2> > >
hypot(const VectorPick<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_hypot<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_hypot<P_numtype1,typename P_expr2::T_numtype> > >
hypot(const VectorPick<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_hypot<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_hypot<P_numtype1,P_numtype2> > >
hypot(const VectorPick<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_hypot<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_hypot<P_numtype1,int> > >
hypot(const VectorPick<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_hypot<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_hypot<P_numtype1,P_numtype2> > >
hypot(const VectorPick<P_numtype1>& d1, const TinyVector<P_numtype2, N_leng
th2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_hypot<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_hypot<P_numtype1,int> > >
hypot(const VectorPick<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_hypot<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_hypot<P_numtype1,float> > >
hypot(const VectorPick<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_hypot<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_hypot<P_numtype1,double> > >
hypot(const VectorPick<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_hypot<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_hypot<P_numtype1,long double> > >
hypot(const VectorPick<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_hypot<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_hypot<P_numtype1,complex<T2> > > >
hypot(const VectorPick<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_hypot<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_hypot<int,P_numtype2> > >
hypot(Range d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_hypot<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_hypot<int,typename P_expr2::T_numtype> > >
hypot(Range d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_hypot<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_hypot<int,P_numtype2> > >
hypot(Range d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_hypot<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, Range,
_bz_hypot<int,int> > >
hypot(Range d1, Range d2)
{
typedef _bz_VecExprOp<Range, Range,
_bz_hypot<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_hypot<int,P_numtype2> > >
hypot(Range d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_hypot<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_hypot<int,int> > >
hypot(Range d1, int d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_hypot<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_hypot<int,float> > >
hypot(Range d1, float d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_hypot<int,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_hypot<int,double> > >
hypot(Range d1, double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_hypot<int,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_hypot<int,long double> > >
hypot(Range d1, long double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_hypot<int,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_hypot<int,complex<T2> > > >
hypot(Range d1, complex<T2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_hypot<int,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_hypot<P_numtype1,P_numtype2> > >
hypot(const TinyVector<P_numtype1, N_length1>& d1, const Vector<P_numtype2>
& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_hypot<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_hypot<P_numtype1,typename P_expr2::T_numtype> > >
hypot(const TinyVector<P_numtype1, N_length1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_hypot<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_hypot<P_numtype1,P_numtype2> > >
hypot(const TinyVector<P_numtype1, N_length1>& d1, const VectorPick<P_numty
pe2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_hypot<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_hypot<P_numtype1,int> > >
hypot(const TinyVector<P_numtype1, N_length1>& d1, Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_hypot<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_hypot<P_numtype1,P_numtype2> > >
hypot(const TinyVector<P_numtype1, N_length1>& d1, const TinyVector<P_numty
pe2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_hypot<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_hypot<P_numtype1,int> > >
hypot(const TinyVector<P_numtype1, N_length1>& d1, int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_hypot<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_hypot<P_numtype1,float> > >
hypot(const TinyVector<P_numtype1, N_length1>& d1, float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_hypot<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_hypot<P_numtype1,double> > >
hypot(const TinyVector<P_numtype1, N_length1>& d1, double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_hypot<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_hypot<P_numtype1,long double> > >
hypot(const TinyVector<P_numtype1, N_length1>& d1, long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_hypot<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_hypot<P_numtype1,complex<T2> > > >
hypot(const TinyVector<P_numtype1, N_length1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_hypot<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_hypot<int,P_numtype2> > >
hypot(int d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_hypot<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_hypot<int,typename P_expr2::T_numtype> > >
hypot(int d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_hypot<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_hypot<int,P_numtype2> > >
hypot(int d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_hypot<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_hypot<int,int> > >
hypot(int d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_hypot<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_hypot<int,P_numtype2> > >
hypot(int d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_hypot<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_hypot<float,P_numtype2> > >
hypot(float d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_hypot<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_hypot<float,typename P_expr2::T_numtype> > >
hypot(float d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_hypot<float,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_hypot<float,P_numtype2> > >
hypot(float d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_hypot<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_hypot<float,int> > >
hypot(float d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_hypot<float,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_hypot<float,P_numtype2> > >
hypot(float d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_hypot<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_hypot<double,P_numtype2> > >
hypot(double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_hypot<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_hypot<double,typename P_expr2::T_numtype> > >
hypot(double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_hypot<double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_hypot<double,P_numtype2> > >
hypot(double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_hypot<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_hypot<double,int> > >
hypot(double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_hypot<double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_hypot<double,P_numtype2> > >
hypot(double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_hypot<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_hypot<long double,P_numtype2> > >
hypot(long double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_hypot<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_hypot<long double,typename P_expr2::T_numtype> > >
hypot(long double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_hypot<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_hypot<long double,P_numtype2> > >
hypot(long double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_hypot<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_hypot<long double,int> > >
hypot(long double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_hypot<long double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_hypot<long double,P_numtype2> > >
hypot(long double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_hypot<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_hypot<complex<T1> ,P_numtype2> > >
hypot(complex<T1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_hypot<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_hypot<complex<T1> ,typename P_expr2::T_numtype> > >
hypot(complex<T1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_hypot<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_hypot<complex<T1> ,P_numtype2> > >
hypot(complex<T1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_hypot<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_hypot<complex<T1> ,int> > >
hypot(complex<T1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_hypot<complex<T1> ,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_hypot<complex<T1> ,P_numtype2> > >
hypot(complex<T1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_hypot<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
} }
#endif
/************************************************************************** ** /************************************************************************** **
* ilogb * ilogb
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_ilogb<P_numtype1> > > _bz_ilogb<P_numtype1> > >
ilogb(const Vector<P_numtype1>& d1) ilogb(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_ilogb<P_numtype1> > T_expr; _bz_ilogb<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_ilogb<_bz_typename P_expr1::T_numtype> > > _bz_ilogb<typename P_expr1::T_numtype> > >
ilogb(_bz_VecExpr<P_expr1> d1) ilogb(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_ilogb<_bz_typename P_expr1::T_numtype> > T_expr; _bz_ilogb<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_ilogb<P_numtype1> > > _bz_ilogb<P_numtype1> > >
ilogb(const VectorPick<P_numtype1>& d1) ilogb(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_ilogb<P_numtype1> > T_expr; _bz_ilogb<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_ilogb<int> > > _bz_ilogb<int> > >
ilogb(Range d1) ilogb(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_ilogb<int> > T_expr; _bz_ilogb<int> > T_expr;
skipping to change at line 1270 skipping to change at line 5805
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_ilogb<P_numtype1> > > _bz_ilogb<P_numtype1> > >
ilogb(const TinyVector<P_numtype1, N_length1>& d1) ilogb(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_ilogb<P_numtype1> > T_expr; _bz_ilogb<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* blitz_isnan * blitz_isnan
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_blitz_isnan<P_numtype1> > > _bz_blitz_isnan<P_numtype1> > >
blitz_isnan(const Vector<P_numtype1>& d1) blitz_isnan(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_blitz_isnan<P_numtype1> > T_expr; _bz_blitz_isnan<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_blitz_isnan<_bz_typename P_expr1::T_numtype> > > _bz_blitz_isnan<typename P_expr1::T_numtype> > >
blitz_isnan(_bz_VecExpr<P_expr1> d1) blitz_isnan(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_blitz_isnan<_bz_typename P_expr1::T_numtype> > T_expr; _bz_blitz_isnan<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_blitz_isnan<P_numtype1> > > _bz_blitz_isnan<P_numtype1> > >
blitz_isnan(const VectorPick<P_numtype1>& d1) blitz_isnan(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_blitz_isnan<P_numtype1> > T_expr; _bz_blitz_isnan<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_blitz_isnan<int> > > _bz_blitz_isnan<int> > >
blitz_isnan(Range d1) blitz_isnan(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_blitz_isnan<int> > T_expr; _bz_blitz_isnan<int> > T_expr;
skipping to change at line 1336 skipping to change at line 5871
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_blitz_isnan<P_numtype1> > > _bz_blitz_isnan<P_numtype1> > >
blitz_isnan(const TinyVector<P_numtype1, N_length1>& d1) blitz_isnan(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_blitz_isnan<P_numtype1> > T_expr; _bz_blitz_isnan<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* itrunc * itrunc
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_itrunc<P_numtype1> > > _bz_itrunc<P_numtype1> > >
itrunc(const Vector<P_numtype1>& d1) itrunc(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_itrunc<P_numtype1> > T_expr; _bz_itrunc<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_itrunc<_bz_typename P_expr1::T_numtype> > > _bz_itrunc<typename P_expr1::T_numtype> > >
itrunc(_bz_VecExpr<P_expr1> d1) itrunc(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_itrunc<_bz_typename P_expr1::T_numtype> > T_expr; _bz_itrunc<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_itrunc<P_numtype1> > > _bz_itrunc<P_numtype1> > >
itrunc(const VectorPick<P_numtype1>& d1) itrunc(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_itrunc<P_numtype1> > T_expr; _bz_itrunc<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_itrunc<int> > > _bz_itrunc<int> > >
itrunc(Range d1) itrunc(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_itrunc<int> > T_expr; _bz_itrunc<int> > T_expr;
skipping to change at line 1402 skipping to change at line 5937
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_itrunc<P_numtype1> > > _bz_itrunc<P_numtype1> > >
itrunc(const TinyVector<P_numtype1, N_length1>& d1) itrunc(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_itrunc<P_numtype1> > T_expr; _bz_itrunc<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* j0 * j0
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_j0<P_numtype1> > > _bz_j0<P_numtype1> > >
j0(const Vector<P_numtype1>& d1) j0(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_j0<P_numtype1> > T_expr; _bz_j0<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_j0<_bz_typename P_expr1::T_numtype> > > _bz_j0<typename P_expr1::T_numtype> > >
j0(_bz_VecExpr<P_expr1> d1) j0(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_j0<_bz_typename P_expr1::T_numtype> > T_expr; _bz_j0<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_j0<P_numtype1> > > _bz_j0<P_numtype1> > >
j0(const VectorPick<P_numtype1>& d1) j0(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_j0<P_numtype1> > T_expr; _bz_j0<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_j0<int> > > _bz_j0<int> > >
j0(Range d1) j0(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_j0<int> > T_expr; _bz_j0<int> > T_expr;
skipping to change at line 1468 skipping to change at line 6003
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_j0<P_numtype1> > > _bz_j0<P_numtype1> > >
j0(const TinyVector<P_numtype1, N_length1>& d1) j0(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_j0<P_numtype1> > T_expr; _bz_j0<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* j1 * j1
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_j1<P_numtype1> > > _bz_j1<P_numtype1> > >
j1(const Vector<P_numtype1>& d1) j1(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_j1<P_numtype1> > T_expr; _bz_j1<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_j1<_bz_typename P_expr1::T_numtype> > > _bz_j1<typename P_expr1::T_numtype> > >
j1(_bz_VecExpr<P_expr1> d1) j1(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_j1<_bz_typename P_expr1::T_numtype> > T_expr; _bz_j1<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_j1<P_numtype1> > > _bz_j1<P_numtype1> > >
j1(const VectorPick<P_numtype1>& d1) j1(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_j1<P_numtype1> > T_expr; _bz_j1<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_j1<int> > > _bz_j1<int> > >
j1(Range d1) j1(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_j1<int> > T_expr; _bz_j1<int> > T_expr;
skipping to change at line 1534 skipping to change at line 6069
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_j1<P_numtype1> > > _bz_j1<P_numtype1> > >
j1(const TinyVector<P_numtype1, N_length1>& d1) j1(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_j1<P_numtype1> > T_expr; _bz_j1<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* lgamma * lgamma
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_lgamma<P_numtype1> > > _bz_lgamma<P_numtype1> > >
lgamma(const Vector<P_numtype1>& d1) lgamma(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_lgamma<P_numtype1> > T_expr; _bz_lgamma<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_lgamma<_bz_typename P_expr1::T_numtype> > > _bz_lgamma<typename P_expr1::T_numtype> > >
lgamma(_bz_VecExpr<P_expr1> d1) lgamma(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_lgamma<_bz_typename P_expr1::T_numtype> > T_expr; _bz_lgamma<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_lgamma<P_numtype1> > > _bz_lgamma<P_numtype1> > >
lgamma(const VectorPick<P_numtype1>& d1) lgamma(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_lgamma<P_numtype1> > T_expr; _bz_lgamma<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_lgamma<int> > > _bz_lgamma<int> > >
lgamma(Range d1) lgamma(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_lgamma<int> > T_expr; _bz_lgamma<int> > T_expr;
skipping to change at line 1600 skipping to change at line 6135
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_lgamma<P_numtype1> > > _bz_lgamma<P_numtype1> > >
lgamma(const TinyVector<P_numtype1, N_length1>& d1) lgamma(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_lgamma<P_numtype1> > T_expr; _bz_lgamma<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* log * log
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_log<P_numtype1> > > _bz_log<P_numtype1> > >
log(const Vector<P_numtype1>& d1) log(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_log<P_numtype1> > T_expr; _bz_log<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_log<_bz_typename P_expr1::T_numtype> > > _bz_log<typename P_expr1::T_numtype> > >
log(_bz_VecExpr<P_expr1> d1) log(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_log<_bz_typename P_expr1::T_numtype> > T_expr; _bz_log<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_log<P_numtype1> > > _bz_log<P_numtype1> > >
log(const VectorPick<P_numtype1>& d1) log(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_log<P_numtype1> > T_expr; _bz_log<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_log<int> > > _bz_log<int> > >
log(Range d1) log(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_log<int> > T_expr; _bz_log<int> > T_expr;
skipping to change at line 1665 skipping to change at line 6200
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_log<P_numtype1> > > _bz_log<P_numtype1> > >
log(const TinyVector<P_numtype1, N_length1>& d1) log(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_log<P_numtype1> > T_expr; _bz_log<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* logb * logb
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_logb<P_numtype1> > > _bz_logb<P_numtype1> > >
logb(const Vector<P_numtype1>& d1) logb(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_logb<P_numtype1> > T_expr; _bz_logb<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_logb<_bz_typename P_expr1::T_numtype> > > _bz_logb<typename P_expr1::T_numtype> > >
logb(_bz_VecExpr<P_expr1> d1) logb(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_logb<_bz_typename P_expr1::T_numtype> > T_expr; _bz_logb<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_logb<P_numtype1> > > _bz_logb<P_numtype1> > >
logb(const VectorPick<P_numtype1>& d1) logb(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_logb<P_numtype1> > T_expr; _bz_logb<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_logb<int> > > _bz_logb<int> > >
logb(Range d1) logb(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_logb<int> > T_expr; _bz_logb<int> > T_expr;
skipping to change at line 1729 skipping to change at line 6264
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_logb<P_numtype1> > > _bz_logb<P_numtype1> > >
logb(const TinyVector<P_numtype1, N_length1>& d1) logb(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_logb<P_numtype1> > T_expr; _bz_logb<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* log1p * log1p
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_log1p<P_numtype1> > > _bz_log1p<P_numtype1> > >
log1p(const Vector<P_numtype1>& d1) log1p(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_log1p<P_numtype1> > T_expr; _bz_log1p<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_log1p<_bz_typename P_expr1::T_numtype> > > _bz_log1p<typename P_expr1::T_numtype> > >
log1p(_bz_VecExpr<P_expr1> d1) log1p(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_log1p<_bz_typename P_expr1::T_numtype> > T_expr; _bz_log1p<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_log1p<P_numtype1> > > _bz_log1p<P_numtype1> > >
log1p(const VectorPick<P_numtype1>& d1) log1p(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_log1p<P_numtype1> > T_expr; _bz_log1p<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_log1p<int> > > _bz_log1p<int> > >
log1p(Range d1) log1p(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_log1p<int> > T_expr; _bz_log1p<int> > T_expr;
skipping to change at line 1795 skipping to change at line 6330
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_log1p<P_numtype1> > > _bz_log1p<P_numtype1> > >
log1p(const TinyVector<P_numtype1, N_length1>& d1) log1p(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_log1p<P_numtype1> > T_expr; _bz_log1p<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* log10 * log10
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_log10<P_numtype1> > > _bz_log10<P_numtype1> > >
log10(const Vector<P_numtype1>& d1) log10(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_log10<P_numtype1> > T_expr; _bz_log10<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_log10<_bz_typename P_expr1::T_numtype> > > _bz_log10<typename P_expr1::T_numtype> > >
log10(_bz_VecExpr<P_expr1> d1) log10(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_log10<_bz_typename P_expr1::T_numtype> > T_expr; _bz_log10<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_log10<P_numtype1> > > _bz_log10<P_numtype1> > >
log10(const VectorPick<P_numtype1>& d1) log10(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_log10<P_numtype1> > T_expr; _bz_log10<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_log10<int> > > _bz_log10<int> > >
log10(Range d1) log10(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_log10<int> > T_expr; _bz_log10<int> > T_expr;
skipping to change at line 1860 skipping to change at line 6395
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_log10<P_numtype1> > > _bz_log10<P_numtype1> > >
log10(const TinyVector<P_numtype1, N_length1>& d1) log10(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_log10<P_numtype1> > T_expr; _bz_log10<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* nearest * nearest
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_nearest<P_numtype1> > > _bz_nearest<P_numtype1> > >
nearest(const Vector<P_numtype1>& d1) nearest(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_nearest<P_numtype1> > T_expr; _bz_nearest<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_nearest<_bz_typename P_expr1::T_numtype> > > _bz_nearest<typename P_expr1::T_numtype> > >
nearest(_bz_VecExpr<P_expr1> d1) nearest(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_nearest<_bz_typename P_expr1::T_numtype> > T_expr; _bz_nearest<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_nearest<P_numtype1> > > _bz_nearest<P_numtype1> > >
nearest(const VectorPick<P_numtype1>& d1) nearest(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_nearest<P_numtype1> > T_expr; _bz_nearest<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_nearest<int> > > _bz_nearest<int> > >
nearest(Range d1) nearest(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_nearest<int> > T_expr; _bz_nearest<int> > T_expr;
skipping to change at line 1924 skipping to change at line 6459
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_nearest<P_numtype1> > > _bz_nearest<P_numtype1> > >
nearest(const TinyVector<P_numtype1, N_length1>& d1) nearest(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_nearest<P_numtype1> > T_expr; _bz_nearest<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
}
#endif
/**************************************************************************
**
* nextafter
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > >
nextafter(const Vector<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_nextafter<P_numtype1,typename P_expr2::T_numtype> > >
nextafter(const Vector<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_nextafter<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > >
nextafter(const Vector<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_nextafter<P_numtype1,int> > >
nextafter(const Vector<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_nextafter<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_nextafter<P_numtype1,P_numtype2> > >
nextafter(const Vector<P_numtype1>& d1, const TinyVector<P_numtype2, N_leng
th2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_nextafter<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_nextafter<P_numtype1,int> > >
nextafter(const Vector<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_nextafter<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_nextafter<P_numtype1,float> > >
nextafter(const Vector<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_nextafter<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_nextafter<P_numtype1,double> > >
nextafter(const Vector<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_nextafter<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_nextafter<P_numtype1,long double> > >
nextafter(const Vector<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_nextafter<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_nextafter<P_numtype1,complex<T2> > > >
nextafter(const Vector<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_nextafter<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_nextafter<typename P_expr1::T_numtype,P_numtype2> > >
nextafter(_bz_VecExpr<P_expr1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_nextafter<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_nextafter<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> >
nextafter(_bz_VecExpr<P_expr1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_nextafter<typename P_expr1::T_numtype,typename P_expr2::T_numty
pe> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_nextafter<typename P_expr1::T_numtype,P_numtype2> > >
nextafter(_bz_VecExpr<P_expr1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_nextafter<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_nextafter<typename P_expr1::T_numtype,int> > >
nextafter(_bz_VecExpr<P_expr1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_nextafter<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_nextafter<typename P_expr1::T_numtype,P_numtype2> > >
nextafter(_bz_VecExpr<P_expr1> d1, const TinyVector<P_numtype2, N_length2>&
d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_nextafter<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_nextafter<typename P_expr1::T_numtype,int> > >
nextafter(_bz_VecExpr<P_expr1> d1, int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_nextafter<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_nextafter<typename P_expr1::T_numtype,float> > >
nextafter(_bz_VecExpr<P_expr1> d1, float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_nextafter<typename P_expr1::T_numtype,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_nextafter<typename P_expr1::T_numtype,double> > >
nextafter(_bz_VecExpr<P_expr1> d1, double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_nextafter<typename P_expr1::T_numtype,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_nextafter<typename P_expr1::T_numtype,long double> > >
nextafter(_bz_VecExpr<P_expr1> d1, long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_nextafter<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_nextafter<typename P_expr1::T_numtype,complex<T2> > > >
nextafter(_bz_VecExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_nextafter<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > >
nextafter(const VectorPick<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_nextafter<P_numtype1,typename P_expr2::T_numtype> > >
nextafter(const VectorPick<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_nextafter<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > >
nextafter(const VectorPick<P_numtype1>& d1, const VectorPick<P_numtype2>& d
2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_nextafter<P_numtype1,int> > >
nextafter(const VectorPick<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_nextafter<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_nextafter<P_numtype1,P_numtype2> > >
nextafter(const VectorPick<P_numtype1>& d1, const TinyVector<P_numtype2, N_
length2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_nextafter<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_nextafter<P_numtype1,int> > >
nextafter(const VectorPick<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_nextafter<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_nextafter<P_numtype1,float> > >
nextafter(const VectorPick<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_nextafter<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_nextafter<P_numtype1,double> > >
nextafter(const VectorPick<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_nextafter<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_nextafter<P_numtype1,long double> > >
nextafter(const VectorPick<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_nextafter<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_nextafter<P_numtype1,complex<T2> > > >
nextafter(const VectorPick<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_nextafter<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_nextafter<int,P_numtype2> > >
nextafter(Range d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_nextafter<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_nextafter<int,typename P_expr2::T_numtype> > >
nextafter(Range d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_nextafter<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_nextafter<int,P_numtype2> > >
nextafter(Range d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_nextafter<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, Range,
_bz_nextafter<int,int> > >
nextafter(Range d1, Range d2)
{
typedef _bz_VecExprOp<Range, Range,
_bz_nextafter<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_nextafter<int,P_numtype2> > >
nextafter(Range d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_nextafter<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_nextafter<int,int> > >
nextafter(Range d1, int d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_nextafter<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_nextafter<int,float> > >
nextafter(Range d1, float d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_nextafter<int,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_nextafter<int,double> > >
nextafter(Range d1, double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_nextafter<int,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_nextafter<int,long double> > >
nextafter(Range d1, long double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_nextafter<int,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_nextafter<int,complex<T2> > > >
nextafter(Range d1, complex<T2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_nextafter<int,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > >
nextafter(const TinyVector<P_numtype1, N_length1>& d1, const Vector<P_numty
pe2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_nextafter<P_numtype1,typename P_expr2::T_numtype> > >
nextafter(const TinyVector<P_numtype1, N_length1>& d1, _bz_VecExpr<P_expr2>
d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_nextafter<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > >
nextafter(const TinyVector<P_numtype1, N_length1>& d1, const VectorPick<P_n
umtype2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_nextafter<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_nextafter<P_numtype1,int> > >
nextafter(const TinyVector<P_numtype1, N_length1>& d1, Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_nextafter<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_nextafter<P_numtype1,P_numtype2> > >
nextafter(const TinyVector<P_numtype1, N_length1>& d1, const TinyVector<P_n
umtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_nextafter<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_nextafter<P_numtype1,int> > >
nextafter(const TinyVector<P_numtype1, N_length1>& d1, int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_nextafter<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_nextafter<P_numtype1,float> > >
nextafter(const TinyVector<P_numtype1, N_length1>& d1, float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_nextafter<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_nextafter<P_numtype1,double> > >
nextafter(const TinyVector<P_numtype1, N_length1>& d1, double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_nextafter<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_nextafter<P_numtype1,long double> > >
nextafter(const TinyVector<P_numtype1, N_length1>& d1, long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_nextafter<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_nextafter<P_numtype1,complex<T2> > > >
nextafter(const TinyVector<P_numtype1, N_length1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_nextafter<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_nextafter<int,P_numtype2> > >
nextafter(int d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_nextafter<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_nextafter<int,typename P_expr2::T_numtype> > >
nextafter(int d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_nextafter<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_nextafter<int,P_numtype2> > >
nextafter(int d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_nextafter<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_nextafter<int,int> > >
nextafter(int d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_nextafter<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_nextafter<int,P_numtype2> > >
nextafter(int d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_nextafter<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_nextafter<float,P_numtype2> > >
nextafter(float d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_nextafter<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_nextafter<float,typename P_expr2::T_numtype> > >
nextafter(float d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_nextafter<float,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_nextafter<float,P_numtype2> > >
nextafter(float d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_nextafter<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_nextafter<float,int> > >
nextafter(float d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_nextafter<float,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_nextafter<float,P_numtype2> > >
nextafter(float d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_nextafter<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_nextafter<double,P_numtype2> > >
nextafter(double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_nextafter<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_nextafter<double,typename P_expr2::T_numtype> > >
nextafter(double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_nextafter<double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_nextafter<double,P_numtype2> > >
nextafter(double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_nextafter<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_nextafter<double,int> > >
nextafter(double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_nextafter<double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_nextafter<double,P_numtype2> > >
nextafter(double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_nextafter<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_nextafter<long double,P_numtype2> > >
nextafter(long double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_nextafter<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_nextafter<long double,typename P_expr2::T_numtype> > >
nextafter(long double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_nextafter<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_nextafter<long double,P_numtype2> > >
nextafter(long double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_nextafter<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_nextafter<long double,int> > >
nextafter(long double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_nextafter<long double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_nextafter<long double,P_numtype2> > >
nextafter(long double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_nextafter<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_nextafter<complex<T1> ,P_numtype2> > >
nextafter(complex<T1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_nextafter<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_nextafter<complex<T1> ,typename P_expr2::T_numtype> > >
nextafter(complex<T1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_nextafter<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_nextafter<complex<T1> ,P_numtype2> > >
nextafter(complex<T1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_nextafter<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_nextafter<complex<T1> ,int> > >
nextafter(complex<T1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_nextafter<complex<T1> ,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_nextafter<complex<T1> ,P_numtype2> > >
nextafter(complex<T1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_nextafter<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
#endif
/**************************************************************************
**
* pow
**************************************************************************
**/
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_pow<P_numtype1,P_numtype2> > >
pow(const Vector<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_pow<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_pow<P_numtype1,typename P_expr2::T_numtype> > >
pow(const Vector<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_pow<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_pow<P_numtype1,P_numtype2> > >
pow(const Vector<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_pow<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_pow<P_numtype1,int> > >
pow(const Vector<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_pow<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_pow<P_numtype1,P_numtype2> > >
pow(const Vector<P_numtype1>& d1, const TinyVector<P_numtype2, N_length2>&
d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_pow<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_pow<P_numtype1,int> > >
pow(const Vector<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_pow<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_pow<P_numtype1,float> > >
pow(const Vector<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_pow<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_pow<P_numtype1,double> > >
pow(const Vector<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_pow<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_pow<P_numtype1,long double> > >
pow(const Vector<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_pow<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_pow<P_numtype1,complex<T2> > > >
pow(const Vector<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_pow<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_pow<typename P_expr1::T_numtype,P_numtype2> > >
pow(_bz_VecExpr<P_expr1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_pow<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_pow<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
pow(_bz_VecExpr<P_expr1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_pow<typename P_expr1::T_numtype,typename P_expr2::T_numtype> >
T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_pow<typename P_expr1::T_numtype,P_numtype2> > >
pow(_bz_VecExpr<P_expr1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_pow<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_pow<typename P_expr1::T_numtype,int> > >
pow(_bz_VecExpr<P_expr1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_pow<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_pow<typename P_expr1::T_numtype,P_numtype2> > >
pow(_bz_VecExpr<P_expr1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_pow<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_pow<typename P_expr1::T_numtype,int> > >
pow(_bz_VecExpr<P_expr1> d1, int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_pow<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_pow<typename P_expr1::T_numtype,float> > >
pow(_bz_VecExpr<P_expr1> d1, float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_pow<typename P_expr1::T_numtype,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_pow<typename P_expr1::T_numtype,double> > >
pow(_bz_VecExpr<P_expr1> d1, double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_pow<typename P_expr1::T_numtype,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_pow<typename P_expr1::T_numtype,long double> > >
pow(_bz_VecExpr<P_expr1> d1, long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_pow<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_pow<typename P_expr1::T_numtype,complex<T2> > > >
pow(_bz_VecExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_pow<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_pow<P_numtype1,P_numtype2> > >
pow(const VectorPick<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_pow<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_pow<P_numtype1,typename P_expr2::T_numtype> > >
pow(const VectorPick<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_pow<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_pow<P_numtype1,P_numtype2> > >
pow(const VectorPick<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_pow<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_pow<P_numtype1,int> > >
pow(const VectorPick<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_pow<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_pow<P_numtype1,P_numtype2> > >
pow(const VectorPick<P_numtype1>& d1, const TinyVector<P_numtype2, N_length
2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_pow<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_pow<P_numtype1,int> > >
pow(const VectorPick<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_pow<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_pow<P_numtype1,float> > >
pow(const VectorPick<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_pow<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_pow<P_numtype1,double> > >
pow(const VectorPick<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_pow<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_pow<P_numtype1,long double> > >
pow(const VectorPick<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_pow<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_pow<P_numtype1,complex<T2> > > >
pow(const VectorPick<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_pow<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_pow<int,P_numtype2> > >
pow(Range d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_pow<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_pow<int,typename P_expr2::T_numtype> > >
pow(Range d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_pow<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_pow<int,P_numtype2> > >
pow(Range d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_pow<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, Range,
_bz_pow<int,int> > >
pow(Range d1, Range d2)
{
typedef _bz_VecExprOp<Range, Range,
_bz_pow<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_pow<int,P_numtype2> > >
pow(Range d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_pow<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_pow<int,int> > >
pow(Range d1, int d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_pow<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_pow<int,float> > >
pow(Range d1, float d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_pow<int,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_pow<int,double> > >
pow(Range d1, double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_pow<int,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_pow<int,long double> > >
pow(Range d1, long double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_pow<int,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_pow<int,complex<T2> > > >
pow(Range d1, complex<T2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_pow<int,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_pow<P_numtype1,P_numtype2> > >
pow(const TinyVector<P_numtype1, N_length1>& d1, const Vector<P_numtype2>&
d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_pow<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_pow<P_numtype1,typename P_expr2::T_numtype> > >
pow(const TinyVector<P_numtype1, N_length1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_pow<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_pow<P_numtype1,P_numtype2> > >
pow(const TinyVector<P_numtype1, N_length1>& d1, const VectorPick<P_numtype
2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_pow<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_pow<P_numtype1,int> > >
pow(const TinyVector<P_numtype1, N_length1>& d1, Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_pow<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_pow<P_numtype1,P_numtype2> > >
pow(const TinyVector<P_numtype1, N_length1>& d1, const TinyVector<P_numtype
2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_pow<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_pow<P_numtype1,int> > >
pow(const TinyVector<P_numtype1, N_length1>& d1, int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_pow<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_pow<P_numtype1,float> > >
pow(const TinyVector<P_numtype1, N_length1>& d1, float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_pow<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_pow<P_numtype1,double> > >
pow(const TinyVector<P_numtype1, N_length1>& d1, double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_pow<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_pow<P_numtype1,long double> > >
pow(const TinyVector<P_numtype1, N_length1>& d1, long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_pow<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_pow<P_numtype1,complex<T2> > > >
pow(const TinyVector<P_numtype1, N_length1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_pow<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_pow<int,P_numtype2> > >
pow(int d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_pow<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_pow<int,typename P_expr2::T_numtype> > >
pow(int d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_pow<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_pow<int,P_numtype2> > >
pow(int d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_pow<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_pow<int,int> > >
pow(int d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_pow<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_pow<int,P_numtype2> > >
pow(int d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_pow<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_pow<float,P_numtype2> > >
pow(float d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_pow<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_pow<float,typename P_expr2::T_numtype> > >
pow(float d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_pow<float,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_pow<float,P_numtype2> > >
pow(float d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_pow<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_pow<float,int> > >
pow(float d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_pow<float,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_pow<float,P_numtype2> > >
pow(float d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_pow<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_pow<double,P_numtype2> > >
pow(double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_pow<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_pow<double,typename P_expr2::T_numtype> > >
pow(double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_pow<double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_pow<double,P_numtype2> > >
pow(double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_pow<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_pow<double,int> > >
pow(double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_pow<double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_pow<double,P_numtype2> > >
pow(double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_pow<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_pow<long double,P_numtype2> > >
pow(long double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_pow<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_pow<long double,typename P_expr2::T_numtype> > >
pow(long double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_pow<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_pow<long double,P_numtype2> > >
pow(long double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_pow<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_pow<long double,int> > >
pow(long double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_pow<long double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_pow<long double,P_numtype2> > >
pow(long double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_pow<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_pow<complex<T1> ,P_numtype2> > >
pow(complex<T1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_pow<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_pow<complex<T1> ,typename P_expr2::T_numtype> > >
pow(complex<T1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_pow<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_pow<complex<T1> ,P_numtype2> > >
pow(complex<T1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_pow<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_pow<complex<T1> ,int> > >
pow(complex<T1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_pow<complex<T1> ,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_pow<complex<T1> ,P_numtype2> > >
pow(complex<T1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_pow<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
/**************************************************************************
**
* remainder
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_remainder<P_numtype1,P_numtype2> > >
remainder(const Vector<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_remainder<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_remainder<P_numtype1,typename P_expr2::T_numtype> > >
remainder(const Vector<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_remainder<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_remainder<P_numtype1,P_numtype2> > >
remainder(const Vector<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_remainder<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_remainder<P_numtype1,int> > >
remainder(const Vector<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_remainder<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_remainder<P_numtype1,P_numtype2> > >
remainder(const Vector<P_numtype1>& d1, const TinyVector<P_numtype2, N_leng
th2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_remainder<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_remainder<P_numtype1,int> > >
remainder(const Vector<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_remainder<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_remainder<P_numtype1,float> > >
remainder(const Vector<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_remainder<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_remainder<P_numtype1,double> > >
remainder(const Vector<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_remainder<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_remainder<P_numtype1,long double> > >
remainder(const Vector<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_remainder<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_remainder<P_numtype1,complex<T2> > > >
remainder(const Vector<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_remainder<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_remainder<typename P_expr1::T_numtype,P_numtype2> > >
remainder(_bz_VecExpr<P_expr1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_remainder<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_remainder<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> >
remainder(_bz_VecExpr<P_expr1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_remainder<typename P_expr1::T_numtype,typename P_expr2::T_numty
pe> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_remainder<typename P_expr1::T_numtype,P_numtype2> > >
remainder(_bz_VecExpr<P_expr1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_remainder<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_remainder<typename P_expr1::T_numtype,int> > >
remainder(_bz_VecExpr<P_expr1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_remainder<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_remainder<typename P_expr1::T_numtype,P_numtype2> > >
remainder(_bz_VecExpr<P_expr1> d1, const TinyVector<P_numtype2, N_length2>&
d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_remainder<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_remainder<typename P_expr1::T_numtype,int> > >
remainder(_bz_VecExpr<P_expr1> d1, int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_remainder<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_remainder<typename P_expr1::T_numtype,float> > >
remainder(_bz_VecExpr<P_expr1> d1, float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_remainder<typename P_expr1::T_numtype,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_remainder<typename P_expr1::T_numtype,double> > >
remainder(_bz_VecExpr<P_expr1> d1, double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_remainder<typename P_expr1::T_numtype,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_remainder<typename P_expr1::T_numtype,long double> > >
remainder(_bz_VecExpr<P_expr1> d1, long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_remainder<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_remainder<typename P_expr1::T_numtype,complex<T2> > > >
remainder(_bz_VecExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_remainder<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_remainder<P_numtype1,P_numtype2> > >
remainder(const VectorPick<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_remainder<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_remainder<P_numtype1,typename P_expr2::T_numtype> > >
remainder(const VectorPick<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_remainder<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_remainder<P_numtype1,P_numtype2> > >
remainder(const VectorPick<P_numtype1>& d1, const VectorPick<P_numtype2>& d
2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_remainder<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_remainder<P_numtype1,int> > >
remainder(const VectorPick<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_remainder<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_remainder<P_numtype1,P_numtype2> > >
remainder(const VectorPick<P_numtype1>& d1, const TinyVector<P_numtype2, N_
length2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_remainder<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_remainder<P_numtype1,int> > >
remainder(const VectorPick<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_remainder<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_remainder<P_numtype1,float> > >
remainder(const VectorPick<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_remainder<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_remainder<P_numtype1,double> > >
remainder(const VectorPick<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_remainder<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_remainder<P_numtype1,long double> > >
remainder(const VectorPick<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_remainder<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_remainder<P_numtype1,complex<T2> > > >
remainder(const VectorPick<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_remainder<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_remainder<int,P_numtype2> > >
remainder(Range d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_remainder<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_remainder<int,typename P_expr2::T_numtype> > >
remainder(Range d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_remainder<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_remainder<int,P_numtype2> > >
remainder(Range d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_remainder<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, Range,
_bz_remainder<int,int> > >
remainder(Range d1, Range d2)
{
typedef _bz_VecExprOp<Range, Range,
_bz_remainder<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_remainder<int,P_numtype2> > >
remainder(Range d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_remainder<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_remainder<int,int> > >
remainder(Range d1, int d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_remainder<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_remainder<int,float> > >
remainder(Range d1, float d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_remainder<int,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_remainder<int,double> > >
remainder(Range d1, double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_remainder<int,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_remainder<int,long double> > >
remainder(Range d1, long double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_remainder<int,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_remainder<int,complex<T2> > > >
remainder(Range d1, complex<T2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_remainder<int,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_remainder<P_numtype1,P_numtype2> > >
remainder(const TinyVector<P_numtype1, N_length1>& d1, const Vector<P_numty
pe2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_remainder<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_remainder<P_numtype1,typename P_expr2::T_numtype> > >
remainder(const TinyVector<P_numtype1, N_length1>& d1, _bz_VecExpr<P_expr2>
d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_remainder<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_remainder<P_numtype1,P_numtype2> > >
remainder(const TinyVector<P_numtype1, N_length1>& d1, const VectorPick<P_n
umtype2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_remainder<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_remainder<P_numtype1,int> > >
remainder(const TinyVector<P_numtype1, N_length1>& d1, Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_remainder<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_remainder<P_numtype1,P_numtype2> > >
remainder(const TinyVector<P_numtype1, N_length1>& d1, const TinyVector<P_n
umtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_remainder<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_remainder<P_numtype1,int> > >
remainder(const TinyVector<P_numtype1, N_length1>& d1, int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_remainder<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_remainder<P_numtype1,float> > >
remainder(const TinyVector<P_numtype1, N_length1>& d1, float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_remainder<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_remainder<P_numtype1,double> > >
remainder(const TinyVector<P_numtype1, N_length1>& d1, double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_remainder<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_remainder<P_numtype1,long double> > >
remainder(const TinyVector<P_numtype1, N_length1>& d1, long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_remainder<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_remainder<P_numtype1,complex<T2> > > >
remainder(const TinyVector<P_numtype1, N_length1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_remainder<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_remainder<int,P_numtype2> > >
remainder(int d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_remainder<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_remainder<int,typename P_expr2::T_numtype> > >
remainder(int d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_remainder<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_remainder<int,P_numtype2> > >
remainder(int d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_remainder<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_remainder<int,int> > >
remainder(int d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_remainder<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_remainder<int,P_numtype2> > >
remainder(int d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_remainder<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_remainder<float,P_numtype2> > >
remainder(float d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_remainder<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_remainder<float,typename P_expr2::T_numtype> > >
remainder(float d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_remainder<float,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_remainder<float,P_numtype2> > >
remainder(float d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_remainder<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_remainder<float,int> > >
remainder(float d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_remainder<float,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_remainder<float,P_numtype2> > >
remainder(float d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_remainder<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_remainder<double,P_numtype2> > >
remainder(double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_remainder<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_remainder<double,typename P_expr2::T_numtype> > >
remainder(double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_remainder<double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_remainder<double,P_numtype2> > >
remainder(double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_remainder<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_remainder<double,int> > >
remainder(double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_remainder<double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_remainder<double,P_numtype2> > >
remainder(double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_remainder<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_remainder<long double,P_numtype2> > >
remainder(long double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_remainder<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_remainder<long double,typename P_expr2::T_numtype> > >
remainder(long double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_remainder<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_remainder<long double,P_numtype2> > >
remainder(long double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_remainder<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_remainder<long double,int> > >
remainder(long double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_remainder<long double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_remainder<long double,P_numtype2> > >
remainder(long double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_remainder<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_remainder<complex<T1> ,P_numtype2> > >
remainder(complex<T1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_remainder<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_remainder<complex<T1> ,typename P_expr2::T_numtype> > >
remainder(complex<T1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_remainder<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_remainder<complex<T1> ,P_numtype2> > >
remainder(complex<T1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_remainder<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_remainder<complex<T1> ,int> > >
remainder(complex<T1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_remainder<complex<T1> ,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_remainder<complex<T1> ,P_numtype2> > >
remainder(complex<T1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_remainder<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* rint * rint
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_rint<P_numtype1> > > _bz_rint<P_numtype1> > >
rint(const Vector<P_numtype1>& d1) rint(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_rint<P_numtype1> > T_expr; _bz_rint<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_rint<_bz_typename P_expr1::T_numtype> > > _bz_rint<typename P_expr1::T_numtype> > >
rint(_bz_VecExpr<P_expr1> d1) rint(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_rint<_bz_typename P_expr1::T_numtype> > T_expr; _bz_rint<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_rint<P_numtype1> > > _bz_rint<P_numtype1> > >
rint(const VectorPick<P_numtype1>& d1) rint(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_rint<P_numtype1> > T_expr; _bz_rint<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_rint<int> > > _bz_rint<int> > >
rint(Range d1) rint(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_rint<int> > T_expr; _bz_rint<int> > T_expr;
skipping to change at line 1990 skipping to change at line 9216
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_rint<P_numtype1> > > _bz_rint<P_numtype1> > >
rint(const TinyVector<P_numtype1, N_length1>& d1) rint(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_rint<P_numtype1> > T_expr; _bz_rint<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* rsqrt * rsqrt
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_rsqrt<P_numtype1> > > _bz_rsqrt<P_numtype1> > >
rsqrt(const Vector<P_numtype1>& d1) rsqrt(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_rsqrt<P_numtype1> > T_expr; _bz_rsqrt<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_rsqrt<_bz_typename P_expr1::T_numtype> > > _bz_rsqrt<typename P_expr1::T_numtype> > >
rsqrt(_bz_VecExpr<P_expr1> d1) rsqrt(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_rsqrt<_bz_typename P_expr1::T_numtype> > T_expr; _bz_rsqrt<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_rsqrt<P_numtype1> > > _bz_rsqrt<P_numtype1> > >
rsqrt(const VectorPick<P_numtype1>& d1) rsqrt(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_rsqrt<P_numtype1> > T_expr; _bz_rsqrt<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_rsqrt<int> > > _bz_rsqrt<int> > >
rsqrt(Range d1) rsqrt(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_rsqrt<int> > T_expr; _bz_rsqrt<int> > T_expr;
skipping to change at line 2056 skipping to change at line 9282
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_rsqrt<P_numtype1> > > _bz_rsqrt<P_numtype1> > >
rsqrt(const TinyVector<P_numtype1, N_length1>& d1) rsqrt(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_rsqrt<P_numtype1> > T_expr; _bz_rsqrt<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
}
#endif
/**************************************************************************
**
* scalb
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_scalb<P_numtype1,P_numtype2> > >
scalb(const Vector<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_scalb<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_scalb<P_numtype1,typename P_expr2::T_numtype> > >
scalb(const Vector<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_scalb<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_scalb<P_numtype1,P_numtype2> > >
scalb(const Vector<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_scalb<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_scalb<P_numtype1,int> > >
scalb(const Vector<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_scalb<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_scalb<P_numtype1,P_numtype2> > >
scalb(const Vector<P_numtype1>& d1, const TinyVector<P_numtype2, N_length2>
& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_scalb<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_scalb<P_numtype1,int> > >
scalb(const Vector<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_scalb<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_scalb<P_numtype1,float> > >
scalb(const Vector<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_scalb<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_scalb<P_numtype1,double> > >
scalb(const Vector<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_scalb<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_scalb<P_numtype1,long double> > >
scalb(const Vector<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_scalb<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_scalb<P_numtype1,complex<T2> > > >
scalb(const Vector<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_scalb<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_scalb<typename P_expr1::T_numtype,P_numtype2> > >
scalb(_bz_VecExpr<P_expr1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_scalb<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_scalb<typename P_expr1::T_numtype,typename P_expr2::T_numtype> > >
scalb(_bz_VecExpr<P_expr1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_scalb<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_scalb<typename P_expr1::T_numtype,P_numtype2> > >
scalb(_bz_VecExpr<P_expr1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_scalb<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_scalb<typename P_expr1::T_numtype,int> > >
scalb(_bz_VecExpr<P_expr1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_scalb<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_scalb<typename P_expr1::T_numtype,P_numtype2> > >
scalb(_bz_VecExpr<P_expr1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_scalb<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_scalb<typename P_expr1::T_numtype,int> > >
scalb(_bz_VecExpr<P_expr1> d1, int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_scalb<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_scalb<typename P_expr1::T_numtype,float> > >
scalb(_bz_VecExpr<P_expr1> d1, float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_scalb<typename P_expr1::T_numtype,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_scalb<typename P_expr1::T_numtype,double> > >
scalb(_bz_VecExpr<P_expr1> d1, double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_scalb<typename P_expr1::T_numtype,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_scalb<typename P_expr1::T_numtype,long double> > >
scalb(_bz_VecExpr<P_expr1> d1, long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_scalb<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_scalb<typename P_expr1::T_numtype,complex<T2> > > >
scalb(_bz_VecExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_scalb<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_scalb<P_numtype1,P_numtype2> > >
scalb(const VectorPick<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_scalb<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_scalb<P_numtype1,typename P_expr2::T_numtype> > >
scalb(const VectorPick<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_scalb<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_scalb<P_numtype1,P_numtype2> > >
scalb(const VectorPick<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_scalb<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_scalb<P_numtype1,int> > >
scalb(const VectorPick<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_scalb<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_scalb<P_numtype1,P_numtype2> > >
scalb(const VectorPick<P_numtype1>& d1, const TinyVector<P_numtype2, N_leng
th2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_scalb<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_scalb<P_numtype1,int> > >
scalb(const VectorPick<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_scalb<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_scalb<P_numtype1,float> > >
scalb(const VectorPick<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_scalb<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_scalb<P_numtype1,double> > >
scalb(const VectorPick<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_scalb<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_scalb<P_numtype1,long double> > >
scalb(const VectorPick<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_scalb<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_scalb<P_numtype1,complex<T2> > > >
scalb(const VectorPick<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_scalb<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_scalb<int,P_numtype2> > >
scalb(Range d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_scalb<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_scalb<int,typename P_expr2::T_numtype> > >
scalb(Range d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_scalb<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_scalb<int,P_numtype2> > >
scalb(Range d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_scalb<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, Range,
_bz_scalb<int,int> > >
scalb(Range d1, Range d2)
{
typedef _bz_VecExprOp<Range, Range,
_bz_scalb<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_scalb<int,P_numtype2> > >
scalb(Range d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_scalb<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_scalb<int,int> > >
scalb(Range d1, int d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_scalb<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_scalb<int,float> > >
scalb(Range d1, float d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_scalb<int,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_scalb<int,double> > >
scalb(Range d1, double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_scalb<int,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_scalb<int,long double> > >
scalb(Range d1, long double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_scalb<int,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_scalb<int,complex<T2> > > >
scalb(Range d1, complex<T2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_scalb<int,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_scalb<P_numtype1,P_numtype2> > >
scalb(const TinyVector<P_numtype1, N_length1>& d1, const Vector<P_numtype2>
& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_scalb<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_scalb<P_numtype1,typename P_expr2::T_numtype> > >
scalb(const TinyVector<P_numtype1, N_length1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_scalb<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_scalb<P_numtype1,P_numtype2> > >
scalb(const TinyVector<P_numtype1, N_length1>& d1, const VectorPick<P_numty
pe2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_scalb<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_scalb<P_numtype1,int> > >
scalb(const TinyVector<P_numtype1, N_length1>& d1, Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_scalb<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_scalb<P_numtype1,P_numtype2> > >
scalb(const TinyVector<P_numtype1, N_length1>& d1, const TinyVector<P_numty
pe2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_scalb<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_scalb<P_numtype1,int> > >
scalb(const TinyVector<P_numtype1, N_length1>& d1, int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_scalb<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_scalb<P_numtype1,float> > >
scalb(const TinyVector<P_numtype1, N_length1>& d1, float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_scalb<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_scalb<P_numtype1,double> > >
scalb(const TinyVector<P_numtype1, N_length1>& d1, double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_scalb<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_scalb<P_numtype1,long double> > >
scalb(const TinyVector<P_numtype1, N_length1>& d1, long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_scalb<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_scalb<P_numtype1,complex<T2> > > >
scalb(const TinyVector<P_numtype1, N_length1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_scalb<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_scalb<int,P_numtype2> > >
scalb(int d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_scalb<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_scalb<int,typename P_expr2::T_numtype> > >
scalb(int d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_scalb<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_scalb<int,P_numtype2> > >
scalb(int d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_scalb<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_scalb<int,int> > >
scalb(int d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_scalb<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_scalb<int,P_numtype2> > >
scalb(int d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_scalb<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_scalb<float,P_numtype2> > >
scalb(float d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_scalb<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_scalb<float,typename P_expr2::T_numtype> > >
scalb(float d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_scalb<float,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_scalb<float,P_numtype2> > >
scalb(float d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_scalb<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_scalb<float,int> > >
scalb(float d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_scalb<float,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_scalb<float,P_numtype2> > >
scalb(float d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_scalb<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_scalb<double,P_numtype2> > >
scalb(double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_scalb<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_scalb<double,typename P_expr2::T_numtype> > >
scalb(double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_scalb<double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_scalb<double,P_numtype2> > >
scalb(double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_scalb<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_scalb<double,int> > >
scalb(double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_scalb<double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_scalb<double,P_numtype2> > >
scalb(double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_scalb<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_scalb<long double,P_numtype2> > >
scalb(long double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_scalb<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_scalb<long double,typename P_expr2::T_numtype> > >
scalb(long double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_scalb<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_scalb<long double,P_numtype2> > >
scalb(long double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_scalb<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_scalb<long double,int> > >
scalb(long double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_scalb<long double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_scalb<long double,P_numtype2> > >
scalb(long double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_scalb<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_scalb<complex<T1> ,P_numtype2> > >
scalb(complex<T1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_scalb<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_scalb<complex<T1> ,typename P_expr2::T_numtype> > >
scalb(complex<T1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_scalb<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_scalb<complex<T1> ,P_numtype2> > >
scalb(complex<T1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_scalb<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_scalb<complex<T1> ,int> > >
scalb(complex<T1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_scalb<complex<T1> ,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_scalb<complex<T1> ,P_numtype2> > >
scalb(complex<T1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_scalb<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* sin * sin
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_sin<P_numtype1> > > _bz_sin<P_numtype1> > >
sin(const Vector<P_numtype1>& d1) sin(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_sin<P_numtype1> > T_expr; _bz_sin<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_sin<_bz_typename P_expr1::T_numtype> > > _bz_sin<typename P_expr1::T_numtype> > >
sin(_bz_VecExpr<P_expr1> d1) sin(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_sin<_bz_typename P_expr1::T_numtype> > T_expr; _bz_sin<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_sin<P_numtype1> > > _bz_sin<P_numtype1> > >
sin(const VectorPick<P_numtype1>& d1) sin(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_sin<P_numtype1> > T_expr; _bz_sin<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_sin<int> > > _bz_sin<int> > >
sin(Range d1) sin(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_sin<int> > T_expr; _bz_sin<int> > T_expr;
skipping to change at line 2121 skipping to change at line 10245
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_sin<P_numtype1> > > _bz_sin<P_numtype1> > >
sin(const TinyVector<P_numtype1, N_length1>& d1) sin(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_sin<P_numtype1> > T_expr; _bz_sin<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* sinh * sinh
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_sinh<P_numtype1> > > _bz_sinh<P_numtype1> > >
sinh(const Vector<P_numtype1>& d1) sinh(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_sinh<P_numtype1> > T_expr; _bz_sinh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_sinh<_bz_typename P_expr1::T_numtype> > > _bz_sinh<typename P_expr1::T_numtype> > >
sinh(_bz_VecExpr<P_expr1> d1) sinh(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_sinh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_sinh<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_sinh<P_numtype1> > > _bz_sinh<P_numtype1> > >
sinh(const VectorPick<P_numtype1>& d1) sinh(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_sinh<P_numtype1> > T_expr; _bz_sinh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_sinh<int> > > _bz_sinh<int> > >
sinh(Range d1) sinh(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_sinh<int> > T_expr; _bz_sinh<int> > T_expr;
skipping to change at line 2184 skipping to change at line 10308
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_sinh<P_numtype1> > > _bz_sinh<P_numtype1> > >
sinh(const TinyVector<P_numtype1, N_length1>& d1) sinh(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_sinh<P_numtype1> > T_expr; _bz_sinh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* sqr * sqr
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_sqr<P_numtype1> > > _bz_sqr<P_numtype1> > >
sqr(const Vector<P_numtype1>& d1) sqr(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_sqr<P_numtype1> > T_expr; _bz_sqr<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_sqr<_bz_typename P_expr1::T_numtype> > > _bz_sqr<typename P_expr1::T_numtype> > >
sqr(_bz_VecExpr<P_expr1> d1) sqr(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_sqr<_bz_typename P_expr1::T_numtype> > T_expr; _bz_sqr<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_sqr<P_numtype1> > > _bz_sqr<P_numtype1> > >
sqr(const VectorPick<P_numtype1>& d1) sqr(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_sqr<P_numtype1> > T_expr; _bz_sqr<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_sqr<int> > > _bz_sqr<int> > >
sqr(Range d1) sqr(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_sqr<int> > T_expr; _bz_sqr<int> > T_expr;
skipping to change at line 2247 skipping to change at line 10371
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_sqr<P_numtype1> > > _bz_sqr<P_numtype1> > >
sqr(const TinyVector<P_numtype1, N_length1>& d1) sqr(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_sqr<P_numtype1> > T_expr; _bz_sqr<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* sqrt * sqrt
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_sqrt<P_numtype1> > > _bz_sqrt<P_numtype1> > >
sqrt(const Vector<P_numtype1>& d1) sqrt(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_sqrt<P_numtype1> > T_expr; _bz_sqrt<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_sqrt<_bz_typename P_expr1::T_numtype> > > _bz_sqrt<typename P_expr1::T_numtype> > >
sqrt(_bz_VecExpr<P_expr1> d1) sqrt(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_sqrt<_bz_typename P_expr1::T_numtype> > T_expr; _bz_sqrt<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_sqrt<P_numtype1> > > _bz_sqrt<P_numtype1> > >
sqrt(const VectorPick<P_numtype1>& d1) sqrt(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_sqrt<P_numtype1> > T_expr; _bz_sqrt<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_sqrt<int> > > _bz_sqrt<int> > >
sqrt(Range d1) sqrt(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_sqrt<int> > T_expr; _bz_sqrt<int> > T_expr;
skipping to change at line 2310 skipping to change at line 10434
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_sqrt<P_numtype1> > > _bz_sqrt<P_numtype1> > >
sqrt(const TinyVector<P_numtype1, N_length1>& d1) sqrt(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_sqrt<P_numtype1> > T_expr; _bz_sqrt<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* tan * tan
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_tan<P_numtype1> > > _bz_tan<P_numtype1> > >
tan(const Vector<P_numtype1>& d1) tan(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_tan<P_numtype1> > T_expr; _bz_tan<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_tan<_bz_typename P_expr1::T_numtype> > > _bz_tan<typename P_expr1::T_numtype> > >
tan(_bz_VecExpr<P_expr1> d1) tan(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_tan<_bz_typename P_expr1::T_numtype> > T_expr; _bz_tan<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_tan<P_numtype1> > > _bz_tan<P_numtype1> > >
tan(const VectorPick<P_numtype1>& d1) tan(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_tan<P_numtype1> > T_expr; _bz_tan<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_tan<int> > > _bz_tan<int> > >
tan(Range d1) tan(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_tan<int> > T_expr; _bz_tan<int> > T_expr;
skipping to change at line 2373 skipping to change at line 10497
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_tan<P_numtype1> > > _bz_tan<P_numtype1> > >
tan(const TinyVector<P_numtype1, N_length1>& d1) tan(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_tan<P_numtype1> > T_expr; _bz_tan<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* tanh * tanh
************************************************************************** **/ ************************************************************************** **/
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_tanh<P_numtype1> > > _bz_tanh<P_numtype1> > >
tanh(const Vector<P_numtype1>& d1) tanh(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_tanh<P_numtype1> > T_expr; _bz_tanh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_tanh<_bz_typename P_expr1::T_numtype> > > _bz_tanh<typename P_expr1::T_numtype> > >
tanh(_bz_VecExpr<P_expr1> d1) tanh(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_tanh<_bz_typename P_expr1::T_numtype> > T_expr; _bz_tanh<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_tanh<P_numtype1> > > _bz_tanh<P_numtype1> > >
tanh(const VectorPick<P_numtype1>& d1) tanh(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_tanh<P_numtype1> > T_expr; _bz_tanh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_tanh<int> > > _bz_tanh<int> > >
tanh(Range d1) tanh(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_tanh<int> > T_expr; _bz_tanh<int> > T_expr;
skipping to change at line 2436 skipping to change at line 10560
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_tanh<P_numtype1> > > _bz_tanh<P_numtype1> > >
tanh(const TinyVector<P_numtype1, N_length1>& d1) tanh(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_tanh<P_numtype1> > T_expr; _bz_tanh<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
/************************************************************************** ** /************************************************************************** **
* uitrunc * uitrunc
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_SYSTEM_V_MATH #ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_uitrunc<P_numtype1> > > _bz_uitrunc<P_numtype1> > >
uitrunc(const Vector<P_numtype1>& d1) uitrunc(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_uitrunc<P_numtype1> > T_expr; _bz_uitrunc<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_uitrunc<_bz_typename P_expr1::T_numtype> > > _bz_uitrunc<typename P_expr1::T_numtype> > >
uitrunc(_bz_VecExpr<P_expr1> d1) uitrunc(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_uitrunc<_bz_typename P_expr1::T_numtype> > T_expr; _bz_uitrunc<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_uitrunc<P_numtype1> > > _bz_uitrunc<P_numtype1> > >
uitrunc(const VectorPick<P_numtype1>& d1) uitrunc(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_uitrunc<P_numtype1> > T_expr; _bz_uitrunc<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_uitrunc<int> > > _bz_uitrunc<int> > >
uitrunc(Range d1) uitrunc(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_uitrunc<int> > T_expr; _bz_uitrunc<int> > T_expr;
skipping to change at line 2500 skipping to change at line 10624
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_uitrunc<P_numtype1> > > _bz_uitrunc<P_numtype1> > >
uitrunc(const TinyVector<P_numtype1, N_length1>& d1) uitrunc(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_uitrunc<P_numtype1> > T_expr; _bz_uitrunc<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
}
#endif
/**************************************************************************
**
* unordered
**************************************************************************
**/
#ifdef BZ_HAVE_SYSTEM_V_MATH
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_unordered<P_numtype1,P_numtype2> > >
unordered(const Vector<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorIterConst<P_nu
mtype2>,
_bz_unordered<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_unordered<P_numtype1,typename P_expr2::T_numtype> > >
unordered(const Vector<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExpr<P_expr2>
,
_bz_unordered<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_unordered<P_numtype1,P_numtype2> > >
unordered(const Vector<P_numtype1>& d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, VectorPickIterConst<
P_numtype2>,
_bz_unordered<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_unordered<P_numtype1,int> > >
unordered(const Vector<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, Range,
_bz_unordered<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_unordered<P_numtype1,P_numtype2> > >
unordered(const Vector<P_numtype1>& d1, const TinyVector<P_numtype2, N_leng
th2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_unordered<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_unordered<P_numtype1,int> > >
unordered(const Vector<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
int>,
_bz_unordered<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_unordered<P_numtype1,float> > >
unordered(const Vector<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
float>,
_bz_unordered<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_unordered<P_numtype1,double> > >
unordered(const Vector<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
double>,
_bz_unordered<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_unordered<P_numtype1,long double> > >
unordered(const Vector<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
long double>,
_bz_unordered<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_unordered<P_numtype1,complex<T2> > > >
unordered(const Vector<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>, _bz_VecExprConstant<
complex<T2> > ,
_bz_unordered<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_unordered<typename P_expr1::T_numtype,P_numtype2> > >
unordered(_bz_VecExpr<P_expr1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorIterConst<P_numtype2>
,
_bz_unordered<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_unordered<typename P_expr1::T_numtype,typename P_expr2::T_numtype>
> >
unordered(_bz_VecExpr<P_expr1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>,
_bz_unordered<typename P_expr1::T_numtype,typename P_expr2::T_numty
pe> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_unordered<typename P_expr1::T_numtype,P_numtype2> > >
unordered(_bz_VecExpr<P_expr1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, VectorPickIterConst<P_numty
pe2>,
_bz_unordered<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_unordered<typename P_expr1::T_numtype,int> > >
unordered(_bz_VecExpr<P_expr1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, Range,
_bz_unordered<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_unordered<typename P_expr1::T_numtype,P_numtype2> > >
unordered(_bz_VecExpr<P_expr1> d1, const TinyVector<P_numtype2, N_length2>&
d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, TinyVectorIterConst<P_numty
pe2, N_length2>,
_bz_unordered<typename P_expr1::T_numtype,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_unordered<typename P_expr1::T_numtype,int> > >
unordered(_bz_VecExpr<P_expr1> d1, int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<int>,
_bz_unordered<typename P_expr1::T_numtype,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_unordered<typename P_expr1::T_numtype,float> > >
unordered(_bz_VecExpr<P_expr1> d1, float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<float>,
_bz_unordered<typename P_expr1::T_numtype,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_unordered<typename P_expr1::T_numtype,double> > >
unordered(_bz_VecExpr<P_expr1> d1, double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<double>
,
_bz_unordered<typename P_expr1::T_numtype,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_unordered<typename P_expr1::T_numtype,long double> > >
unordered(_bz_VecExpr<P_expr1> d1, long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<long do
uble>,
_bz_unordered<typename P_expr1::T_numtype,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_unordered<typename P_expr1::T_numtype,complex<T2> > > >
unordered(_bz_VecExpr<P_expr1> d1, complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>, _bz_VecExprConstant<complex
<T2> > ,
_bz_unordered<typename P_expr1::T_numtype,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_unordered<P_numtype1,P_numtype2> > >
unordered(const VectorPick<P_numtype1>& d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorIterConst<
P_numtype2>,
_bz_unordered<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_unordered<P_numtype1,typename P_expr2::T_numtype> > >
unordered(const VectorPick<P_numtype1>& d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<P_ex
pr2>,
_bz_unordered<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_unordered<P_numtype1,P_numtype2> > >
unordered(const VectorPick<P_numtype1>& d1, const VectorPick<P_numtype2>& d
2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, VectorPickIterCo
nst<P_numtype2>,
_bz_unordered<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_unordered<P_numtype1,int> > >
unordered(const VectorPick<P_numtype1>& d1, Range d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, Range,
_bz_unordered<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_unordered<P_numtype1,P_numtype2> > >
unordered(const VectorPick<P_numtype1>& d1, const TinyVector<P_numtype2, N_
length2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, TinyVectorIterCo
nst<P_numtype2, N_length2>,
_bz_unordered<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_unordered<P_numtype1,int> > >
unordered(const VectorPick<P_numtype1>& d1, int d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<int>,
_bz_unordered<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_unordered<P_numtype1,float> > >
unordered(const VectorPick<P_numtype1>& d1, float d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<float>,
_bz_unordered<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_unordered<P_numtype1,double> > >
unordered(const VectorPick<P_numtype1>& d1, double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<double>,
_bz_unordered<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_unordered<P_numtype1,long double> > >
unordered(const VectorPick<P_numtype1>& d1, long double d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<long double>,
_bz_unordered<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_unordered<P_numtype1,complex<T2> > > >
unordered(const VectorPick<P_numtype1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>, _bz_VecExprConst
ant<complex<T2> > ,
_bz_unordered<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_unordered<int,P_numtype2> > >
unordered(Range d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorIterConst<P_numtype2>,
_bz_unordered<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_unordered<int,typename P_expr2::T_numtype> > >
unordered(Range d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExpr<P_expr2>,
_bz_unordered<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_unordered<int,P_numtype2> > >
unordered(Range d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<Range, VectorPickIterConst<P_numtype2>,
_bz_unordered<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, Range,
_bz_unordered<int,int> > >
unordered(Range d1, Range d2)
{
typedef _bz_VecExprOp<Range, Range,
_bz_unordered<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_unordered<int,P_numtype2> > >
unordered(Range d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<Range, TinyVectorIterConst<P_numtype2, N_length2>
,
_bz_unordered<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_unordered<int,int> > >
unordered(Range d1, int d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<int>,
_bz_unordered<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<int>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_unordered<int,float> > >
unordered(Range d1, float d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<float>,
_bz_unordered<int,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<float>(d2)));
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_unordered<int,double> > >
unordered(Range d1, double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<double>,
_bz_unordered<int,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<double>(d2)))
;
}
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_unordered<int,long double> > >
unordered(Range d1, long double d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<long double>,
_bz_unordered<int,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<long double>(
d2)));
}
template<class T2>
inline
_bz_VecExpr<_bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_unordered<int,complex<T2> > > >
unordered(Range d1, complex<T2> d2)
{
typedef _bz_VecExprOp<Range, _bz_VecExprConstant<complex<T2> > ,
_bz_unordered<int,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, _bz_VecExprConstant<complex<T2> >
(d2)));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_unordered<P_numtype1,P_numtype2> > >
unordered(const TinyVector<P_numtype1, N_length1>& d1, const Vector<P_numty
pe2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rIterConst<P_numtype2>,
_bz_unordered<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_unordered<P_numtype1,typename P_expr2::T_numtype> > >
unordered(const TinyVector<P_numtype1, N_length1>& d1, _bz_VecExpr<P_expr2>
d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExpr<P_expr2>,
_bz_unordered<P_numtype1,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_unordered<P_numtype1,P_numtype2> > >
unordered(const TinyVector<P_numtype1, N_length1>& d1, const VectorPick<P_n
umtype2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Vecto
rPickIterConst<P_numtype2>,
_bz_unordered<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_unordered<P_numtype1,int> > >
unordered(const TinyVector<P_numtype1, N_length1>& d1, Range d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, Range
,
_bz_unordered<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2));
}
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_unordered<P_numtype1,P_numtype2> > >
unordered(const TinyVector<P_numtype1, N_length1>& d1, const TinyVector<P_n
umtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, TinyV
ectorIterConst<P_numtype2, N_length2>,
_bz_unordered<P_numtype1,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), d2.beginFast()));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_unordered<P_numtype1,int> > >
unordered(const TinyVector<P_numtype1, N_length1>& d1, int d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<int>,
_bz_unordered<P_numtype1,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<i
nt>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_unordered<P_numtype1,float> > >
unordered(const TinyVector<P_numtype1, N_length1>& d1, float d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<float>,
_bz_unordered<P_numtype1,float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<f
loat>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_unordered<P_numtype1,double> > >
unordered(const TinyVector<P_numtype1, N_length1>& d1, double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<double>,
_bz_unordered<P_numtype1,double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<d
ouble>(d2)));
}
template<class P_numtype1, int N_length1>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_unordered<P_numtype1,long double> > >
unordered(const TinyVector<P_numtype1, N_length1>& d1, long double d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<long double>,
_bz_unordered<P_numtype1,long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<l
ong double>(d2)));
}
template<class P_numtype1, int N_length1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_unordered<P_numtype1,complex<T2> > > >
unordered(const TinyVector<P_numtype1, N_length1>& d1, complex<T2> d2)
{
typedef _bz_VecExprOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_V
ecExprConstant<complex<T2> > ,
_bz_unordered<P_numtype1,complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(), _bz_VecExprConstant<c
omplex<T2> > (d2)));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_unordered<int,P_numtype2> > >
unordered(int d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorIterConst<P_numty
pe2>,
_bz_unordered<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_unordered<int,typename P_expr2::T_numtype> > >
unordered(int d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, _bz_VecExpr<P_expr2>,
_bz_unordered<int,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_unordered<int,P_numtype2> > >
unordered(int d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, VectorPickIterConst<P_n
umtype2>,
_bz_unordered<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_unordered<int,int> > >
unordered(int d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, Range,
_bz_unordered<int,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_unordered<int,P_numtype2> > >
unordered(int d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<int>, TinyVectorIterConst<P_n
umtype2, N_length2>,
_bz_unordered<int,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<int>(d1), d2.begi
nFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_unordered<float,P_numtype2> > >
unordered(float d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorIterConst<P_num
type2>,
_bz_unordered<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_unordered<float,typename P_expr2::T_numtype> > >
unordered(float d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, _bz_VecExpr<P_expr2>,
_bz_unordered<float,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_unordered<float,P_numtype2> > >
unordered(float d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, VectorPickIterConst<P
_numtype2>,
_bz_unordered<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_unordered<float,int> > >
unordered(float d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, Range,
_bz_unordered<float,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_unordered<float,P_numtype2> > >
unordered(float d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<float>, TinyVectorIterConst<P
_numtype2, N_length2>,
_bz_unordered<float,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<float>(d1), d2.be
ginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_unordered<double,P_numtype2> > >
unordered(double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorIterConst<P_nu
mtype2>,
_bz_unordered<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_unordered<double,typename P_expr2::T_numtype> > >
unordered(double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, _bz_VecExpr<P_expr2>
,
_bz_unordered<double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_unordered<double,P_numtype2> > >
unordered(double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, VectorPickIterConst<
P_numtype2>,
_bz_unordered<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_unordered<double,int> > >
unordered(double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, Range,
_bz_unordered<double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2))
;
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_unordered<double,P_numtype2> > >
unordered(double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<double>, TinyVectorIterConst<
P_numtype2, N_length2>,
_bz_unordered<double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<double>(d1), d2.b
eginFast()));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_unordered<long double,P_numtype2> > >
unordered(long double d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorIterConst
<P_numtype2>,
_bz_unordered<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_unordered<long double,typename P_expr2::T_numtype> > >
unordered(long double d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, _bz_VecExpr<P_e
xpr2>,
_bz_unordered<long double,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_unordered<long double,P_numtype2> > >
unordered(long double d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, VectorPickIterC
onst<P_numtype2>,
_bz_unordered<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_unordered<long double,int> > >
unordered(long double d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, Range,
_bz_unordered<long double,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2));
}
template<class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_unordered<long double,P_numtype2> > >
unordered(long double d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<long double>, TinyVectorIterC
onst<P_numtype2, N_length2>,
_bz_unordered<long double,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<long double>(d1),
d2.beginFast()));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_unordered<complex<T1> ,P_numtype2> > >
unordered(complex<T1> d1, const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorIterCon
st<P_numtype2>,
_bz_unordered<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_unordered<complex<T1> ,typename P_expr2::T_numtype> > >
unordered(complex<T1> d1, _bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , _bz_VecExpr<P
_expr2>,
_bz_unordered<complex<T1> ,typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_unordered<complex<T1> ,P_numtype2> > >
unordered(complex<T1> d1, const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , VectorPickIte
rConst<P_numtype2>,
_bz_unordered<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
}
template<class T1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_unordered<complex<T1> ,int> > >
unordered(complex<T1> d1, Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , Range,
_bz_unordered<complex<T1> ,int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2));
}
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_unordered<complex<T1> ,P_numtype2> > >
unordered(complex<T1> d1, const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > , TinyVectorIte
rConst<P_numtype2, N_length2>,
_bz_unordered<complex<T1> ,P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1
), d2.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* y0 * y0
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_y0<P_numtype1> > > _bz_y0<P_numtype1> > >
y0(const Vector<P_numtype1>& d1) y0(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_y0<P_numtype1> > T_expr; _bz_y0<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_y0<_bz_typename P_expr1::T_numtype> > > _bz_y0<typename P_expr1::T_numtype> > >
y0(_bz_VecExpr<P_expr1> d1) y0(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_y0<_bz_typename P_expr1::T_numtype> > T_expr; _bz_y0<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_y0<P_numtype1> > > _bz_y0<P_numtype1> > >
y0(const VectorPick<P_numtype1>& d1) y0(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_y0<P_numtype1> > T_expr; _bz_y0<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_y0<int> > > _bz_y0<int> > >
y0(Range d1) y0(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_y0<int> > T_expr; _bz_y0<int> > T_expr;
skipping to change at line 2566 skipping to change at line 11588
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_y0<P_numtype1> > > _bz_y0<P_numtype1> > >
y0(const TinyVector<P_numtype1, N_length1>& d1) y0(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_y0<P_numtype1> > T_expr; _bz_y0<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
/************************************************************************** ** /************************************************************************** **
* y1 * y1
************************************************************************** **/ ************************************************************************** **/
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_y1<P_numtype1> > > _bz_y1<P_numtype1> > >
y1(const Vector<P_numtype1>& d1) y1(const Vector<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>,
_bz_y1<P_numtype1> > T_expr; _bz_y1<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_y1<_bz_typename P_expr1::T_numtype> > > _bz_y1<typename P_expr1::T_numtype> > >
y1(_bz_VecExpr<P_expr1> d1) y1(_bz_VecExpr<P_expr1> d1)
{ {
typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>,
_bz_y1<_bz_typename P_expr1::T_numtype> > T_expr; _bz_y1<typename P_expr1::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1)); return _bz_VecExpr<T_expr>(T_expr(d1));
} }
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_y1<P_numtype1> > > _bz_y1<P_numtype1> > >
y1(const VectorPick<P_numtype1>& d1) y1(const VectorPick<P_numtype1>& d1)
{ {
typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>,
_bz_y1<P_numtype1> > T_expr; _bz_y1<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<Range, _bz_VecExpr<_bz_VecExprUnaryOp<Range,
_bz_y1<int> > > _bz_y1<int> > >
y1(Range d1) y1(Range d1)
{ {
typedef _bz_VecExprUnaryOp<Range, typedef _bz_VecExprUnaryOp<Range,
_bz_y1<int> > T_expr; _bz_y1<int> > T_expr;
skipping to change at line 2632 skipping to change at line 11654
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_y1<P_numtype1> > > _bz_y1<P_numtype1> > >
y1(const TinyVector<P_numtype1, N_length1>& d1) y1(const TinyVector<P_numtype1, N_length1>& d1)
{ {
typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_y1<P_numtype1> > T_expr; _bz_y1<P_numtype1> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin())); return _bz_VecExpr<T_expr>(T_expr(d1.beginFast()));
} }
#endif #endif
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif #endif
 End of changes. 206 change blocks. 
218 lines changed or deleted 10817 lines changed or added


 vecwhere.cc   vecwhere.cc 
/************************************************************************** * /************************************************************************** *
* blitz/vecwhere.cc where(X,Y,Z) function for vectors * blitz/../vecwhere.cc where(X,Y,Z) function for vectors
* *
* $Id: vecwhere.cc,v 1.1.1.1 2000/06/19 12:26:11 tveldhui Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* *
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * This program is distributed in the hope that it will be useful,
* All rights reserved. Please see <blitz/blitz.h> for terms and * but WITHOUT ANY WARRANTY; without even the implied warranty of
* conditions of use. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-suggest@cybervision.com
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@cybervision.com
* Licensing inquiries: blitz-licenses@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://seurat.uwaterloo.ca/blitz/
* *
************************************************************************** * ************************************************************************** *
* $Log: vecwhere.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:11 tveldhui
* Imported sources
*
* Revision 1.1 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
* *
*/ */
// Generated source file. Do not edit. // Generated source file. Do not edit.
// genvecwhere.cpp Feb 5 1997 09:52:29 // genvecwhere.cpp Oct 6 2005 15:58:49
#ifndef BZ_VECWHERE_CC #ifndef BZ_VECWHERE_CC
#define BZ_VECWHERE_CC #define BZ_VECWHERE_CC
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
// where(Vector<P_numtype1>, Vector<P_numtype2>, Vector<P_numtype3>) // where(Vector<P_numtype1>, Vector<P_numtype2>, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype2, class P_numtype3> template<class P_numtype1, class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, Vector<P_numtype2>, _bz_VecExpr<P_expr3>) // where(Vector<P_numtype1>, Vector<P_numtype2>, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_numtype2, class P_expr3> template<class P_numtype1, class P_numtype2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Vector<P_numtype1>, Vector<P_numtype2>, VectorPick<P_numtype3>) // where(Vector<P_numtype1>, Vector<P_numtype2>, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype2, class P_numtype3> template<class P_numtype1, class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, Vector<P_numtype2>, Range) // where(Vector<P_numtype1>, Vector<P_numtype2>, Range)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
Range > > Range > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Vector<P_numtype1>, Vector<P_numtype2>, TinyVector<P_numtype3, N_l ength3>) // where(Vector<P_numtype1>, Vector<P_numtype2>, TinyVector<P_numtype3, N_l ength3>)
template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length 3> template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length 3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, Vector<P_numtype2>, int) // where(Vector<P_numtype1>, Vector<P_numtype2>, int)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(Vector<P_numtype1>, Vector<P_numtype2>, float) // where(Vector<P_numtype1>, Vector<P_numtype2>, float)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(Vector<P_numtype1>, Vector<P_numtype2>, double) // where(Vector<P_numtype1>, Vector<P_numtype2>, double)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(Vector<P_numtype1>, Vector<P_numtype2>, long double) // where(Vector<P_numtype1>, Vector<P_numtype2>, long double)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(Vector<P_numtype1>, Vector<P_numtype2>, complex<T3>) // where(Vector<P_numtype1>, Vector<P_numtype2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class P_numtype2, class T3> template<class P_numtype1, class P_numtype2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, Vector<P_numtype3>) // where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, Vector<P_numtype3>)
template<class P_numtype1, class P_expr2, class P_numtype3> template<class P_numtype1, class P_expr2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>) // where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr2, class P_expr3> template<class P_numtype1, class P_expr2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, VectorPick<P_numtype3>) // where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, VectorPick<P_numtype3>)
template<class P_numtype1, class P_expr2, class P_numtype3> template<class P_numtype1, class P_expr2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, Range) // where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, Range)
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
Range > > Range > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, TinyVector<P_numtype3, N _length3>) // where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, TinyVector<P_numtype3, N _length3>)
template<class P_numtype1, class P_expr2, class P_numtype3, int N_length3> template<class P_numtype1, class P_expr2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, int) // where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, int)
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, float) // where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, float)
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, double) // where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, double)
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, long double) // where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, long double)
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, complex<T3>) // where(Vector<P_numtype1>, _bz_VecExpr<P_expr2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class P_expr2, class T3> template<class P_numtype1, class P_expr2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Vector<P_numtype1>, VectorPick<P_numtype2>, Vector<P_numtype3>) // where(Vector<P_numtype1>, VectorPick<P_numtype2>, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype2, class P_numtype3> template<class P_numtype1, class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3>) // where(Vector<P_numtype1>, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_numtype2, class P_expr3> template<class P_numtype1, class P_numtype2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Vector<P_numtype1>, VectorPick<P_numtype2>, VectorPick<P_numtype3> ) // where(Vector<P_numtype1>, VectorPick<P_numtype2>, VectorPick<P_numtype3> )
template<class P_numtype1, class P_numtype2, class P_numtype3> template<class P_numtype1, class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, VectorPick<P_numtype2>, Range) // where(Vector<P_numtype1>, VectorPick<P_numtype2>, Range)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
Range > > Range > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Vector<P_numtype1>, VectorPick<P_numtype2>, TinyVector<P_numtype3, N_length3>) // where(Vector<P_numtype1>, VectorPick<P_numtype2>, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length 3> template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length 3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, VectorPick<P_numtype2>, int) // where(Vector<P_numtype1>, VectorPick<P_numtype2>, int)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(Vector<P_numtype1>, VectorPick<P_numtype2>, float) // where(Vector<P_numtype1>, VectorPick<P_numtype2>, float)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(Vector<P_numtype1>, VectorPick<P_numtype2>, double) // where(Vector<P_numtype1>, VectorPick<P_numtype2>, double)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(Vector<P_numtype1>, VectorPick<P_numtype2>, long double) // where(Vector<P_numtype1>, VectorPick<P_numtype2>, long double)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(Vector<P_numtype1>, VectorPick<P_numtype2>, complex<T3>) // where(Vector<P_numtype1>, VectorPick<P_numtype2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class P_numtype2, class T3> template<class P_numtype1, class P_numtype2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Vector<P_numtype1>, Range, Vector<P_numtype3>) // where(Vector<P_numtype1>, Range, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
Range d2, Range d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, Range, _bz_VecExpr<P_expr3>) // where(Vector<P_numtype1>, Range, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr3> template<class P_numtype1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
Range d2, Range d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(Vector<P_numtype1>, Range, VectorPick<P_numtype3>) // where(Vector<P_numtype1>, Range, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
Range d2, Range d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, Range, Range) // where(Vector<P_numtype1>, Range, Range)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
Range > > Range > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
Range d2, Range d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(Vector<P_numtype1>, Range, TinyVector<P_numtype3, N_length3>) // where(Vector<P_numtype1>, Range, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype3, int N_length3> template<class P_numtype1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
Range d2, Range d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, Range, int) // where(Vector<P_numtype1>, Range, int)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
Range d2, Range d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(Vector<P_numtype1>, Range, float) // where(Vector<P_numtype1>, Range, float)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
Range d2, Range d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(Vector<P_numtype1>, Range, double) // where(Vector<P_numtype1>, Range, double)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
Range d2, Range d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(Vector<P_numtype1>, Range, long double) // where(Vector<P_numtype1>, Range, long double)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
Range d2, Range d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(Vector<P_numtype1>, Range, complex<T3>) // where(Vector<P_numtype1>, Range, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T3> template<class P_numtype1, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
Range d2, Range d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, Vector<P_nu mtype3>) // where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, Vector<P_nu mtype3>)
template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3> template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, _bz_VecExpr <P_expr3>) // where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, _bz_VecExpr <P_expr3>)
template<class P_numtype1, class P_numtype2, int N_length2, class P_expr3> template<class P_numtype1, class P_numtype2, int N_length2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, VectorPick< P_numtype3>) // where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, VectorPick< P_numtype3>)
template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3> template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, Range) // where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, Range)
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
Range > > Range > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, TinyVector< P_numtype3, N_length3>) // where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, TinyVector< P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3, int N_length3> template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, int) // where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, int)
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, float) // where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, float)
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, double) // where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, double)
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, long double ) // where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, long double )
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, complex<T3> ) // where(Vector<P_numtype1>, TinyVector<P_numtype2, N_length2>, complex<T3> )
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class P_numtype2, int N_length2, class T3> template<class P_numtype1, class P_numtype2, int N_length2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Vector<P_numtype1>, int, Vector<P_numtype3>) // where(Vector<P_numtype1>, int, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
int d2, int d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, int, _bz_VecExpr<P_expr3>) // where(Vector<P_numtype1>, int, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr3> template<class P_numtype1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
int d2, int d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3)); d3));
} }
// where(Vector<P_numtype1>, int, VectorPick<P_numtype3>) // where(Vector<P_numtype1>, int, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
int d2, int d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, int, Range) // where(Vector<P_numtype1>, int, Range)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
Range > > Range > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
int d2, int d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3)); d3));
} }
// where(Vector<P_numtype1>, int, TinyVector<P_numtype3, N_length3>) // where(Vector<P_numtype1>, int, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype3, int N_length3> template<class P_numtype1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
int d2, int d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, int, int) // where(Vector<P_numtype1>, int, int)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
int d2, int d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(Vector<P_numtype1>, float, Vector<P_numtype3>) // where(Vector<P_numtype1>, float, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
float d2, float d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, float, _bz_VecExpr<P_expr3>) // where(Vector<P_numtype1>, float, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr3> template<class P_numtype1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
float d2, float d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3)); d3));
} }
// where(Vector<P_numtype1>, float, VectorPick<P_numtype3>) // where(Vector<P_numtype1>, float, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
float d2, float d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, float, Range) // where(Vector<P_numtype1>, float, Range)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
Range > > Range > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
float d2, float d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3)); d3));
} }
// where(Vector<P_numtype1>, float, TinyVector<P_numtype3, N_length3>) // where(Vector<P_numtype1>, float, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype3, int N_length3> template<class P_numtype1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
float d2, float d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, float, float) // where(Vector<P_numtype1>, float, float)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
float d2, float d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(Vector<P_numtype1>, double, Vector<P_numtype3>) // where(Vector<P_numtype1>, double, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
double d2, double d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, double, _bz_VecExpr<P_expr3>) // where(Vector<P_numtype1>, double, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr3> template<class P_numtype1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
double d2, double d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3)); d3));
} }
// where(Vector<P_numtype1>, double, VectorPick<P_numtype3>) // where(Vector<P_numtype1>, double, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
double d2, double d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, double, Range) // where(Vector<P_numtype1>, double, Range)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
Range > > Range > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
double d2, double d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3)); d3));
} }
// where(Vector<P_numtype1>, double, TinyVector<P_numtype3, N_length3>) // where(Vector<P_numtype1>, double, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype3, int N_length3> template<class P_numtype1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
double d2, double d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, double, double) // where(Vector<P_numtype1>, double, double)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
double d2, double d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(Vector<P_numtype1>, long double, Vector<P_numtype3>) // where(Vector<P_numtype1>, long double, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
long double d2, long double d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, long double, _bz_VecExpr<P_expr3>) // where(Vector<P_numtype1>, long double, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr3> template<class P_numtype1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
long double d2, long double d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3)); d3));
} }
// where(Vector<P_numtype1>, long double, VectorPick<P_numtype3>) // where(Vector<P_numtype1>, long double, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
long double d2, long double d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, long double, Range) // where(Vector<P_numtype1>, long double, Range)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
Range > > Range > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
long double d2, long double d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3)); d3));
} }
// where(Vector<P_numtype1>, long double, TinyVector<P_numtype3, N_length3> ) // where(Vector<P_numtype1>, long double, TinyVector<P_numtype3, N_length3> )
template<class P_numtype1, class P_numtype3, int N_length3> template<class P_numtype1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
long double d2, long double d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Vector<P_numtype1>, long double, long double) // where(Vector<P_numtype1>, long double, long double)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
long double d2, long double d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(Vector<P_numtype1>, complex<T2>, Vector<P_numtype3>) // where(Vector<P_numtype1>, complex<T2>, Vector<P_numtype3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2, class P_numtype3> template<class P_numtype1, class T2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Vector<P_numtype1>, complex<T2>, _bz_VecExpr<P_expr3>) // where(Vector<P_numtype1>, complex<T2>, _bz_VecExpr<P_expr3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2, class P_expr3> template<class P_numtype1, class T2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3)); d3));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Vector<P_numtype1>, complex<T2>, VectorPick<P_numtype3>) // where(Vector<P_numtype1>, complex<T2>, VectorPick<P_numtype3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2, class P_numtype3> template<class P_numtype1, class T2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Vector<P_numtype1>, complex<T2>, Range) // where(Vector<P_numtype1>, complex<T2>, Range)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
Range > > Range > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3)); d3));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Vector<P_numtype1>, complex<T2>, TinyVector<P_numtype3, N_length3> ) // where(Vector<P_numtype1>, complex<T2>, TinyVector<P_numtype3, N_length3> )
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2, class P_numtype3, int N_length3> template<class P_numtype1, class T2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Vector<P_numtype1>, complex<T2>, complex<T3>) // where(Vector<P_numtype1>, complex<T2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2, class T3> template<class P_numtype1, class T2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const Vector<P_numtype1>& d1, where(const Vector<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorIterConst<P_numtype1>, typedef _bz_VecWhere<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, Vector<P_numtype3>) // where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, Vector<P_numtype3>)
template<class P_expr1, class P_numtype2, class P_numtype3> template<class P_expr1, class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, _bz_VecExpr<P_expr3>) // where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, _bz_VecExpr<P_expr3>)
template<class P_expr1, class P_numtype2, class P_expr3> template<class P_expr1, class P_numtype2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, VectorPick<P_numtype3>) // where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, VectorPick<P_numtype3>)
template<class P_expr1, class P_numtype2, class P_numtype3> template<class P_expr1, class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, Range) // where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, Range)
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
Range > > Range > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, TinyVector<P_numtype3, N _length3>) // where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, TinyVector<P_numtype3, N _length3>)
template<class P_expr1, class P_numtype2, class P_numtype3, int N_length3> template<class P_expr1, class P_numtype2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, int) // where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, int)
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, float) // where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, float)
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, double) // where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, double)
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, long double) // where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, long double)
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, complex<T3>) // where(_bz_VecExpr<P_expr1>, Vector<P_numtype2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class P_numtype2, class T3> template<class P_expr1, class P_numtype2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, Vector<P_numtype3>) // where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, Vector<P_numtype3>)
template<class P_expr1, class P_expr2, class P_numtype3> template<class P_expr1, class P_expr2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>) // where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>)
template<class P_expr1, class P_expr2, class P_expr3> template<class P_expr1, class P_expr2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
skipping to change at line 1823 skipping to change at line 1820
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, Range) // where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, Range)
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
Range > > Range > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
skipping to change at line 1861 skipping to change at line 1858
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, int) // where(_bz_VecExpr<P_expr1>, _bz_VecExpr<P_expr2>, int)
template<class P_expr1, class P_expr2> template<class P_expr1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
skipping to change at line 1976 skipping to change at line 1973
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3> ) // where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3> )
template<class P_expr1, class P_numtype2, class P_expr3> template<class P_expr1, class P_numtype2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, VectorPick<P_numtype 3>) // where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, VectorPick<P_numtype 3>)
template<class P_expr1, class P_numtype2, class P_numtype3> template<class P_expr1, class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, Range) // where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, Range)
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
Range > > Range > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, TinyVector<P_numtype 3, N_length3>) // where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, TinyVector<P_numtype 3, N_length3>)
template<class P_expr1, class P_numtype2, class P_numtype3, int N_length3> template<class P_expr1, class P_numtype2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, int) // where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, int)
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, float) // where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, float)
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, double) // where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, double)
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, long double) // where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, long double)
template<class P_expr1, class P_numtype2> template<class P_expr1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, complex<T3>) // where(_bz_VecExpr<P_expr1>, VectorPick<P_numtype2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class P_numtype2, class T3> template<class P_expr1, class P_numtype2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(_bz_VecExpr<P_expr1>, Range, Vector<P_numtype3>) // where(_bz_VecExpr<P_expr1>, Range, Vector<P_numtype3>)
template<class P_expr1, class P_numtype3> template<class P_expr1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
Range, Range,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
Range d2, Range d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
Range, Range,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, Range, _bz_VecExpr<P_expr3>) // where(_bz_VecExpr<P_expr1>, Range, _bz_VecExpr<P_expr3>)
template<class P_expr1, class P_expr3> template<class P_expr1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
Range d2, Range d2,
skipping to change at line 2207 skipping to change at line 2204
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
Range d2, Range d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
Range, Range,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, Range, Range) // where(_bz_VecExpr<P_expr1>, Range, Range)
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
Range, Range,
Range > > Range > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
Range d2, Range d2,
skipping to change at line 2245 skipping to change at line 2242
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
Range d2, Range d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
Range, Range,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, Range, int) // where(_bz_VecExpr<P_expr1>, Range, int)
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
Range, Range,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
Range d2, Range d2,
skipping to change at line 2360 skipping to change at line 2357
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, _bz_VecEx pr<P_expr3>) // where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, _bz_VecEx pr<P_expr3>)
template<class P_expr1, class P_numtype2, int N_length2, class P_expr3> template<class P_expr1, class P_numtype2, int N_length2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, VectorPic k<P_numtype3>) // where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, VectorPic k<P_numtype3>)
template<class P_expr1, class P_numtype2, int N_length2, class P_numtype3> template<class P_expr1, class P_numtype2, int N_length2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, Range) // where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, Range)
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
Range > > Range > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, TinyVecto r<P_numtype3, N_length3>) // where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, TinyVecto r<P_numtype3, N_length3>)
template<class P_expr1, class P_numtype2, int N_length2, class P_numtype3, int N_length3> template<class P_expr1, class P_numtype2, int N_length2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, int) // where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, int)
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, float) // where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, float)
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, double) // where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, double)
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, long doub le) // where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, long doub le)
template<class P_expr1, class P_numtype2, int N_length2> template<class P_expr1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, complex<T 3>) // where(_bz_VecExpr<P_expr1>, TinyVector<P_numtype2, N_length2>, complex<T 3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class P_numtype2, int N_length2, class T3> template<class P_expr1, class P_numtype2, int N_length2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(_bz_VecExpr<P_expr1>, int, Vector<P_numtype3>) // where(_bz_VecExpr<P_expr1>, int, Vector<P_numtype3>)
template<class P_expr1, class P_numtype3> template<class P_expr1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
int d2, int d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, int, _bz_VecExpr<P_expr3>) // where(_bz_VecExpr<P_expr1>, int, _bz_VecExpr<P_expr3>)
template<class P_expr1, class P_expr3> template<class P_expr1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
int d2, int d2,
skipping to change at line 2591 skipping to change at line 2588
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
int d2, int d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, int, Range) // where(_bz_VecExpr<P_expr1>, int, Range)
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
Range > > Range > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
int d2, int d2,
skipping to change at line 2629 skipping to change at line 2626
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
int d2, int d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, int, int) // where(_bz_VecExpr<P_expr1>, int, int)
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
int d2, int d2,
skipping to change at line 2667 skipping to change at line 2664
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
float d2, float d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, float, _bz_VecExpr<P_expr3>) // where(_bz_VecExpr<P_expr1>, float, _bz_VecExpr<P_expr3>)
template<class P_expr1, class P_expr3> template<class P_expr1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
float d2, float d2,
skipping to change at line 2705 skipping to change at line 2702
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
float d2, float d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, float, Range) // where(_bz_VecExpr<P_expr1>, float, Range)
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
Range > > Range > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
float d2, float d2,
skipping to change at line 2743 skipping to change at line 2740
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
float d2, float d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, float, float) // where(_bz_VecExpr<P_expr1>, float, float)
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
float d2, float d2,
skipping to change at line 2781 skipping to change at line 2778
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
double d2, double d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, double, _bz_VecExpr<P_expr3>) // where(_bz_VecExpr<P_expr1>, double, _bz_VecExpr<P_expr3>)
template<class P_expr1, class P_expr3> template<class P_expr1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
double d2, double d2,
skipping to change at line 2819 skipping to change at line 2816
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
double d2, double d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, double, Range) // where(_bz_VecExpr<P_expr1>, double, Range)
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
Range > > Range > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
double d2, double d2,
skipping to change at line 2857 skipping to change at line 2854
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
double d2, double d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, double, double) // where(_bz_VecExpr<P_expr1>, double, double)
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
double d2, double d2,
skipping to change at line 2895 skipping to change at line 2892
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
long double d2, long double d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, long double, _bz_VecExpr<P_expr3>) // where(_bz_VecExpr<P_expr1>, long double, _bz_VecExpr<P_expr3>)
template<class P_expr1, class P_expr3> template<class P_expr1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
long double d2, long double d2,
skipping to change at line 2933 skipping to change at line 2930
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
long double d2, long double d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, long double, Range) // where(_bz_VecExpr<P_expr1>, long double, Range)
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
Range > > Range > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
long double d2, long double d2,
skipping to change at line 2971 skipping to change at line 2968
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
long double d2, long double d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(_bz_VecExpr<P_expr1>, long double, long double) // where(_bz_VecExpr<P_expr1>, long double, long double)
template<class P_expr1> template<class P_expr1>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
long double d2, long double d2,
skipping to change at line 3010 skipping to change at line 3007
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
complex<T2> d2, complex<T2> d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(_bz_VecExpr<P_expr1>, complex<T2>, _bz_VecExpr<P_expr3>) // where(_bz_VecExpr<P_expr1>, complex<T2>, _bz_VecExpr<P_expr3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2, class P_expr3> template<class P_expr1, class T2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
skipping to change at line 3052 skipping to change at line 3049
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
complex<T2> d2, complex<T2> d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(_bz_VecExpr<P_expr1>, complex<T2>, Range) // where(_bz_VecExpr<P_expr1>, complex<T2>, Range)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2> template<class P_expr1, class T2>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
Range > > Range > >
skipping to change at line 3094 skipping to change at line 3091
where(_bz_VecExpr<P_expr1> d1, where(_bz_VecExpr<P_expr1> d1,
complex<T2> d2, complex<T2> d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<_bz_VecExpr<P_expr1>, typedef _bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(_bz_VecExpr<P_expr1>, complex<T2>, complex<T3>) // where(_bz_VecExpr<P_expr1>, complex<T2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_expr1, class T2, class T3> template<class P_expr1, class T2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>, _bz_VecExpr<_bz_VecWhere<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
skipping to change at line 3133 skipping to change at line 3130
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, Vector<P_numtype2>, _bz_VecExpr<P_expr3>) // where(VectorPick<P_numtype1>, Vector<P_numtype2>, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_numtype2, class P_expr3> template<class P_numtype1, class P_numtype2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, Vector<P_numtype2>, VectorPick<P_numtype3> ) // where(VectorPick<P_numtype1>, Vector<P_numtype2>, VectorPick<P_numtype3> )
template<class P_numtype1, class P_numtype2, class P_numtype3> template<class P_numtype1, class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, Vector<P_numtype2>, Range) // where(VectorPick<P_numtype1>, Vector<P_numtype2>, Range)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
Range > > Range > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, Vector<P_numtype2>, TinyVector<P_numtype3, N_length3>) // where(VectorPick<P_numtype1>, Vector<P_numtype2>, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length 3> template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length 3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, Vector<P_numtype2>, int) // where(VectorPick<P_numtype1>, Vector<P_numtype2>, int)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(VectorPick<P_numtype1>, Vector<P_numtype2>, float) // where(VectorPick<P_numtype1>, Vector<P_numtype2>, float)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(VectorPick<P_numtype1>, Vector<P_numtype2>, double) // where(VectorPick<P_numtype1>, Vector<P_numtype2>, double)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(VectorPick<P_numtype1>, Vector<P_numtype2>, long double) // where(VectorPick<P_numtype1>, Vector<P_numtype2>, long double)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(VectorPick<P_numtype1>, Vector<P_numtype2>, complex<T3>) // where(VectorPick<P_numtype1>, Vector<P_numtype2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class P_numtype2, class T3> template<class P_numtype1, class P_numtype2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, Vector<P_numtype3>) // where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, Vector<P_numtype3>)
template<class P_numtype1, class P_expr2, class P_numtype3> template<class P_numtype1, class P_expr2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3> ) // where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3> )
template<class P_numtype1, class P_expr2, class P_expr3> template<class P_numtype1, class P_expr2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, VectorPick<P_numtype 3>) // where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, VectorPick<P_numtype 3>)
template<class P_numtype1, class P_expr2, class P_numtype3> template<class P_numtype1, class P_expr2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, Range) // where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, Range)
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
Range > > Range > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, TinyVector<P_numtype 3, N_length3>) // where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, TinyVector<P_numtype 3, N_length3>)
template<class P_numtype1, class P_expr2, class P_numtype3, int N_length3> template<class P_numtype1, class P_expr2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, int) // where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, int)
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, float) // where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, float)
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, double) // where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, double)
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, long double) // where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, long double)
template<class P_numtype1, class P_expr2> template<class P_numtype1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, complex<T3>) // where(VectorPick<P_numtype1>, _bz_VecExpr<P_expr2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class P_expr2, class T3> template<class P_numtype1, class P_expr2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, Vector<P_numtype3> ) // where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, Vector<P_numtype3> )
template<class P_numtype1, class P_numtype2, class P_numtype3> template<class P_numtype1, class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, _bz_VecExpr<P_expr 3>) // where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, _bz_VecExpr<P_expr 3>)
template<class P_numtype1, class P_numtype2, class P_expr3> template<class P_numtype1, class P_numtype2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, VectorPick<P_numty pe3>) // where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, VectorPick<P_numty pe3>)
template<class P_numtype1, class P_numtype2, class P_numtype3> template<class P_numtype1, class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, Range) // where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, Range)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
Range > > Range > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, TinyVector<P_numty pe3, N_length3>) // where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, TinyVector<P_numty pe3, N_length3>)
template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length 3> template<class P_numtype1, class P_numtype2, class P_numtype3, int N_length 3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, int) // where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, int)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, float) // where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, float)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, double) // where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, double)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, long double) // where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, long double)
template<class P_numtype1, class P_numtype2> template<class P_numtype1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, complex<T3>) // where(VectorPick<P_numtype1>, VectorPick<P_numtype2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class P_numtype2, class T3> template<class P_numtype1, class P_numtype2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(VectorPick<P_numtype1>, Range, Vector<P_numtype3>) // where(VectorPick<P_numtype1>, Range, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
Range d2, Range d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, Range, _bz_VecExpr<P_expr3>) // where(VectorPick<P_numtype1>, Range, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr3> template<class P_numtype1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
Range d2, Range d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(VectorPick<P_numtype1>, Range, VectorPick<P_numtype3>) // where(VectorPick<P_numtype1>, Range, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
Range d2, Range d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, Range, Range) // where(VectorPick<P_numtype1>, Range, Range)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
Range > > Range > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
Range d2, Range d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(VectorPick<P_numtype1>, Range, TinyVector<P_numtype3, N_length3>) // where(VectorPick<P_numtype1>, Range, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype3, int N_length3> template<class P_numtype1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
Range d2, Range d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, Range, int) // where(VectorPick<P_numtype1>, Range, int)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
Range d2, Range d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(VectorPick<P_numtype1>, Range, float) // where(VectorPick<P_numtype1>, Range, float)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
Range d2, Range d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(VectorPick<P_numtype1>, Range, double) // where(VectorPick<P_numtype1>, Range, double)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
Range d2, Range d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(VectorPick<P_numtype1>, Range, long double) // where(VectorPick<P_numtype1>, Range, long double)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
Range d2, Range d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(VectorPick<P_numtype1>, Range, complex<T3>) // where(VectorPick<P_numtype1>, Range, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T3> template<class P_numtype1, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
Range d2, Range d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
Range, Range,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, Vector< P_numtype3>) // where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, Vector< P_numtype3>)
template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3> template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, _bz_Vec Expr<P_expr3>) // where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, _bz_Vec Expr<P_expr3>)
template<class P_numtype1, class P_numtype2, int N_length2, class P_expr3> template<class P_numtype1, class P_numtype2, int N_length2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, VectorP ick<P_numtype3>) // where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, VectorP ick<P_numtype3>)
template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3> template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, Range) // where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, Range)
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
Range > > Range > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, TinyVec tor<P_numtype3, N_length3>) // where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, TinyVec tor<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3, int N_length3> template<class P_numtype1, class P_numtype2, int N_length2, class P_numtype 3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, int) // where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, int)
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, float) // where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, float)
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, double) // where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, double)
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, long do uble) // where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, long do uble)
template<class P_numtype1, class P_numtype2, int N_length2> template<class P_numtype1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, complex <T3>) // where(VectorPick<P_numtype1>, TinyVector<P_numtype2, N_length2>, complex <T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class P_numtype2, int N_length2, class T3> template<class P_numtype1, class P_numtype2, int N_length2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(VectorPick<P_numtype1>, int, Vector<P_numtype3>) // where(VectorPick<P_numtype1>, int, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
int d2, int d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, int, _bz_VecExpr<P_expr3>) // where(VectorPick<P_numtype1>, int, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr3> template<class P_numtype1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
int d2, int d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, int, VectorPick<P_numtype3>) // where(VectorPick<P_numtype1>, int, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
int d2, int d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, int, Range) // where(VectorPick<P_numtype1>, int, Range)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
Range > > Range > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
int d2, int d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, int, TinyVector<P_numtype3, N_length3>) // where(VectorPick<P_numtype1>, int, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype3, int N_length3> template<class P_numtype1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
int d2, int d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, int, int) // where(VectorPick<P_numtype1>, int, int)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
int d2, int d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(VectorPick<P_numtype1>, float, Vector<P_numtype3>) // where(VectorPick<P_numtype1>, float, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
float d2, float d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, float, _bz_VecExpr<P_expr3>) // where(VectorPick<P_numtype1>, float, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr3> template<class P_numtype1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
float d2, float d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, float, VectorPick<P_numtype3>) // where(VectorPick<P_numtype1>, float, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
float d2, float d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, float, Range) // where(VectorPick<P_numtype1>, float, Range)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
Range > > Range > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
float d2, float d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, float, TinyVector<P_numtype3, N_length3>) // where(VectorPick<P_numtype1>, float, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype3, int N_length3> template<class P_numtype1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
float d2, float d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, float, float) // where(VectorPick<P_numtype1>, float, float)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
float d2, float d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(VectorPick<P_numtype1>, double, Vector<P_numtype3>) // where(VectorPick<P_numtype1>, double, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
double d2, double d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, double, _bz_VecExpr<P_expr3>) // where(VectorPick<P_numtype1>, double, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr3> template<class P_numtype1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
double d2, double d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, double, VectorPick<P_numtype3>) // where(VectorPick<P_numtype1>, double, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
double d2, double d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, double, Range) // where(VectorPick<P_numtype1>, double, Range)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
Range > > Range > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
double d2, double d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, double, TinyVector<P_numtype3, N_length3>) // where(VectorPick<P_numtype1>, double, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, class P_numtype3, int N_length3> template<class P_numtype1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
double d2, double d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, double, double) // where(VectorPick<P_numtype1>, double, double)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
double d2, double d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(VectorPick<P_numtype1>, long double, Vector<P_numtype3>) // where(VectorPick<P_numtype1>, long double, Vector<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
long double d2, long double d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, long double, _bz_VecExpr<P_expr3>) // where(VectorPick<P_numtype1>, long double, _bz_VecExpr<P_expr3>)
template<class P_numtype1, class P_expr3> template<class P_numtype1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
long double d2, long double d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, long double, VectorPick<P_numtype3>) // where(VectorPick<P_numtype1>, long double, VectorPick<P_numtype3>)
template<class P_numtype1, class P_numtype3> template<class P_numtype1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
long double d2, long double d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, long double, Range) // where(VectorPick<P_numtype1>, long double, Range)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
Range > > Range > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
long double d2, long double d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3)); d3));
} }
// where(VectorPick<P_numtype1>, long double, TinyVector<P_numtype3, N_leng th3>) // where(VectorPick<P_numtype1>, long double, TinyVector<P_numtype3, N_leng th3>)
template<class P_numtype1, class P_numtype3, int N_length3> template<class P_numtype1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
long double d2, long double d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(VectorPick<P_numtype1>, long double, long double) // where(VectorPick<P_numtype1>, long double, long double)
template<class P_numtype1> template<class P_numtype1>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
long double d2, long double d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(VectorPick<P_numtype1>, complex<T2>, Vector<P_numtype3>) // where(VectorPick<P_numtype1>, complex<T2>, Vector<P_numtype3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2, class P_numtype3> template<class P_numtype1, class T2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(VectorPick<P_numtype1>, complex<T2>, _bz_VecExpr<P_expr3>) // where(VectorPick<P_numtype1>, complex<T2>, _bz_VecExpr<P_expr3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2, class P_expr3> template<class P_numtype1, class T2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3)); d3));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(VectorPick<P_numtype1>, complex<T2>, VectorPick<P_numtype3>) // where(VectorPick<P_numtype1>, complex<T2>, VectorPick<P_numtype3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2, class P_numtype3> template<class P_numtype1, class T2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(VectorPick<P_numtype1>, complex<T2>, Range) // where(VectorPick<P_numtype1>, complex<T2>, Range)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2> template<class P_numtype1, class T2>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
Range > > Range > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3)); d3));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(VectorPick<P_numtype1>, complex<T2>, TinyVector<P_numtype3, N_leng th3>) // where(VectorPick<P_numtype1>, complex<T2>, TinyVector<P_numtype3, N_leng th3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2, class P_numtype3, int N_length3> template<class P_numtype1, class T2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(VectorPick<P_numtype1>, complex<T2>, complex<T3>) // where(VectorPick<P_numtype1>, complex<T2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, class T2, class T3> template<class P_numtype1, class T2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>, _bz_VecExpr<_bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const VectorPick<P_numtype1>& d1, where(const VectorPick<P_numtype1>& d1,
complex<T2> d2, complex<T2> d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>, typedef _bz_VecWhere<VectorPickIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Range, Vector<P_numtype2>, Vector<P_numtype3>) // where(Range, Vector<P_numtype2>, Vector<P_numtype3>)
template<class P_numtype2, class P_numtype3> template<class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(Range d1, where(Range d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Range, Vector<P_numtype2>, _bz_VecExpr<P_expr3>) // where(Range, Vector<P_numtype2>, _bz_VecExpr<P_expr3>)
template<class P_numtype2, class P_expr3> template<class P_numtype2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(Range d1, where(Range d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Range, Vector<P_numtype2>, VectorPick<P_numtype3>) // where(Range, Vector<P_numtype2>, VectorPick<P_numtype3>)
template<class P_numtype2, class P_numtype3> template<class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(Range d1, where(Range d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Range, Vector<P_numtype2>, Range) // where(Range, Vector<P_numtype2>, Range)
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
Range > > Range > >
where(Range d1, where(Range d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Range, Vector<P_numtype2>, TinyVector<P_numtype3, N_length3>) // where(Range, Vector<P_numtype2>, TinyVector<P_numtype3, N_length3>)
template<class P_numtype2, class P_numtype3, int N_length3> template<class P_numtype2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(Range d1, where(Range d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Range, Vector<P_numtype2>, int) // where(Range, Vector<P_numtype2>, int)
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(Range d1, where(Range d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(Range, Vector<P_numtype2>, float) // where(Range, Vector<P_numtype2>, float)
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(Range d1, where(Range d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(Range, Vector<P_numtype2>, double) // where(Range, Vector<P_numtype2>, double)
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(Range d1, where(Range d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(Range, Vector<P_numtype2>, long double) // where(Range, Vector<P_numtype2>, long double)
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(Range d1, where(Range d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(Range, Vector<P_numtype2>, complex<T3>) // where(Range, Vector<P_numtype2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype2, class T3> template<class P_numtype2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(Range d1, where(Range d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Range, _bz_VecExpr<P_expr2>, Vector<P_numtype3>) // where(Range, _bz_VecExpr<P_expr2>, Vector<P_numtype3>)
template<class P_expr2, class P_numtype3> template<class P_expr2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(Range d1, where(Range d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Range, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>) // where(Range, _bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr3>)
template<class P_expr2, class P_expr3> template<class P_expr2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(Range d1, where(Range d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
skipping to change at line 4907 skipping to change at line 4904
where(Range d1, where(Range d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Range, _bz_VecExpr<P_expr2>, Range) // where(Range, _bz_VecExpr<P_expr2>, Range)
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
Range > > Range > >
where(Range d1, where(Range d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
skipping to change at line 4945 skipping to change at line 4942
where(Range d1, where(Range d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Range, _bz_VecExpr<P_expr2>, int) // where(Range, _bz_VecExpr<P_expr2>, int)
template<class P_expr2> template<class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(Range d1, where(Range d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
skipping to change at line 5060 skipping to change at line 5057
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(Range d1, where(Range d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Range, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3>) // where(Range, VectorPick<P_numtype2>, _bz_VecExpr<P_expr3>)
template<class P_numtype2, class P_expr3> template<class P_numtype2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(Range d1, where(Range d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Range, VectorPick<P_numtype2>, VectorPick<P_numtype3>) // where(Range, VectorPick<P_numtype2>, VectorPick<P_numtype3>)
template<class P_numtype2, class P_numtype3> template<class P_numtype2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(Range d1, where(Range d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Range, VectorPick<P_numtype2>, Range) // where(Range, VectorPick<P_numtype2>, Range)
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
Range > > Range > >
where(Range d1, where(Range d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Range, VectorPick<P_numtype2>, TinyVector<P_numtype3, N_length3>) // where(Range, VectorPick<P_numtype2>, TinyVector<P_numtype3, N_length3>)
template<class P_numtype2, class P_numtype3, int N_length3> template<class P_numtype2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(Range d1, where(Range d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Range, VectorPick<P_numtype2>, int) // where(Range, VectorPick<P_numtype2>, int)
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(Range d1, where(Range d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(Range, VectorPick<P_numtype2>, float) // where(Range, VectorPick<P_numtype2>, float)
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(Range d1, where(Range d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(Range, VectorPick<P_numtype2>, double) // where(Range, VectorPick<P_numtype2>, double)
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(Range d1, where(Range d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(Range, VectorPick<P_numtype2>, long double) // where(Range, VectorPick<P_numtype2>, long double)
template<class P_numtype2> template<class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(Range d1, where(Range d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(Range, VectorPick<P_numtype2>, complex<T3>) // where(Range, VectorPick<P_numtype2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype2, class T3> template<class P_numtype2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(Range d1, where(Range d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Range, Range, Vector<P_numtype3>) // where(Range, Range, Vector<P_numtype3>)
template<class P_numtype3> template<class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
Range, Range,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(Range d1, where(Range d1,
Range d2, Range d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
Range, Range,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Range, Range, _bz_VecExpr<P_expr3>) // where(Range, Range, _bz_VecExpr<P_expr3>)
template<class P_expr3> template<class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
Range, Range,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(Range d1, where(Range d1,
Range d2, Range d2,
skipping to change at line 5291 skipping to change at line 5288
where(Range d1, where(Range d1,
Range d2, Range d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
Range, Range,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Range, Range, Range) // where(Range, Range, Range)
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
Range, Range,
Range > > Range > >
where(Range d1, where(Range d1,
Range d2, Range d2,
skipping to change at line 5329 skipping to change at line 5326
where(Range d1, where(Range d1,
Range d2, Range d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
Range, Range,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(Range, Range, int) // where(Range, Range, int)
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
Range, Range,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(Range d1, where(Range d1,
Range d2, Range d2,
skipping to change at line 5444 skipping to change at line 5441
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(Range d1, where(Range d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Range, TinyVector<P_numtype2, N_length2>, _bz_VecExpr<P_expr3>) // where(Range, TinyVector<P_numtype2, N_length2>, _bz_VecExpr<P_expr3>)
template<class P_numtype2, int N_length2, class P_expr3> template<class P_numtype2, int N_length2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(Range d1, where(Range d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Range, TinyVector<P_numtype2, N_length2>, VectorPick<P_numtype3>) // where(Range, TinyVector<P_numtype2, N_length2>, VectorPick<P_numtype3>)
template<class P_numtype2, int N_length2, class P_numtype3> template<class P_numtype2, int N_length2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(Range d1, where(Range d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Range, TinyVector<P_numtype2, N_length2>, Range) // where(Range, TinyVector<P_numtype2, N_length2>, Range)
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
Range > > Range > >
where(Range d1, where(Range d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(Range, TinyVector<P_numtype2, N_length2>, TinyVector<P_numtype3, N _length3>) // where(Range, TinyVector<P_numtype2, N_length2>, TinyVector<P_numtype3, N _length3>)
template<class P_numtype2, int N_length2, class P_numtype3, int N_length3> template<class P_numtype2, int N_length2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(Range d1, where(Range d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(Range, TinyVector<P_numtype2, N_length2>, int) // where(Range, TinyVector<P_numtype2, N_length2>, int)
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(Range d1, where(Range d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(Range, TinyVector<P_numtype2, N_length2>, float) // where(Range, TinyVector<P_numtype2, N_length2>, float)
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(Range d1, where(Range d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(Range, TinyVector<P_numtype2, N_length2>, double) // where(Range, TinyVector<P_numtype2, N_length2>, double)
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(Range d1, where(Range d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(Range, TinyVector<P_numtype2, N_length2>, long double) // where(Range, TinyVector<P_numtype2, N_length2>, long double)
template<class P_numtype2, int N_length2> template<class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(Range d1, where(Range d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(Range, TinyVector<P_numtype2, N_length2>, complex<T3>) // where(Range, TinyVector<P_numtype2, N_length2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype2, int N_length2, class T3> template<class P_numtype2, int N_length2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(Range d1, where(Range d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Range, int, Vector<P_numtype3>) // where(Range, int, Vector<P_numtype3>)
template<class P_numtype3> template<class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(Range d1, where(Range d1,
int d2, int d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, int, _bz_VecExpr<P_expr3>) // where(Range, int, _bz_VecExpr<P_expr3>)
template<class P_expr3> template<class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(Range d1, where(Range d1,
int d2, int d2,
skipping to change at line 5675 skipping to change at line 5672
where(Range d1, where(Range d1,
int d2, int d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, int, Range) // where(Range, int, Range)
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
Range > > Range > >
where(Range d1, where(Range d1,
int d2, int d2,
skipping to change at line 5713 skipping to change at line 5710
where(Range d1, where(Range d1,
int d2, int d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, int, int) // where(Range, int, int)
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(Range d1, where(Range d1,
int d2, int d2,
skipping to change at line 5751 skipping to change at line 5748
where(Range d1, where(Range d1,
float d2, float d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, float, _bz_VecExpr<P_expr3>) // where(Range, float, _bz_VecExpr<P_expr3>)
template<class P_expr3> template<class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(Range d1, where(Range d1,
float d2, float d2,
skipping to change at line 5789 skipping to change at line 5786
where(Range d1, where(Range d1,
float d2, float d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, float, Range) // where(Range, float, Range)
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
Range > > Range > >
where(Range d1, where(Range d1,
float d2, float d2,
skipping to change at line 5827 skipping to change at line 5824
where(Range d1, where(Range d1,
float d2, float d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, float, float) // where(Range, float, float)
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(Range d1, where(Range d1,
float d2, float d2,
skipping to change at line 5865 skipping to change at line 5862
where(Range d1, where(Range d1,
double d2, double d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, double, _bz_VecExpr<P_expr3>) // where(Range, double, _bz_VecExpr<P_expr3>)
template<class P_expr3> template<class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(Range d1, where(Range d1,
double d2, double d2,
skipping to change at line 5903 skipping to change at line 5900
where(Range d1, where(Range d1,
double d2, double d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, double, Range) // where(Range, double, Range)
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
Range > > Range > >
where(Range d1, where(Range d1,
double d2, double d2,
skipping to change at line 5941 skipping to change at line 5938
where(Range d1, where(Range d1,
double d2, double d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, double, double) // where(Range, double, double)
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(Range d1, where(Range d1,
double d2, double d2,
skipping to change at line 5979 skipping to change at line 5976
where(Range d1, where(Range d1,
long double d2, long double d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, long double, _bz_VecExpr<P_expr3>) // where(Range, long double, _bz_VecExpr<P_expr3>)
template<class P_expr3> template<class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(Range d1, where(Range d1,
long double d2, long double d2,
skipping to change at line 6017 skipping to change at line 6014
where(Range d1, where(Range d1,
long double d2, long double d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, long double, Range) // where(Range, long double, Range)
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
Range > > Range > >
where(Range d1, where(Range d1,
long double d2, long double d2,
skipping to change at line 6055 skipping to change at line 6052
where(Range d1, where(Range d1,
long double d2, long double d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(Range, long double, long double) // where(Range, long double, long double)
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(Range d1, where(Range d1,
long double d2, long double d2,
skipping to change at line 6094 skipping to change at line 6091
where(Range d1, where(Range d1,
complex<T2> d2, complex<T2> d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Range, complex<T2>, _bz_VecExpr<P_expr3>) // where(Range, complex<T2>, _bz_VecExpr<P_expr3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T2, class P_expr3> template<class T2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
skipping to change at line 6136 skipping to change at line 6133
where(Range d1, where(Range d1,
complex<T2> d2, complex<T2> d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Range, complex<T2>, Range) // where(Range, complex<T2>, Range)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T2> template<class T2>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
Range > > Range > >
skipping to change at line 6178 skipping to change at line 6175
where(Range d1, where(Range d1,
complex<T2> d2, complex<T2> d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<Range, typedef _bz_VecWhere<Range,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1, return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(Range, complex<T2>, complex<T3>) // where(Range, complex<T2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class T2, class T3> template<class T2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<Range, _bz_VecExpr<_bz_VecWhere<Range,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
skipping to change at line 6217 skipping to change at line 6214
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, _bz_VecExpr <P_expr3>) // where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, _bz_VecExpr <P_expr3>)
template<class P_numtype1, int N_length1, class P_numtype2, class P_expr3> template<class P_numtype1, int N_length1, class P_numtype2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, VectorPick< P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, VectorPick< P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype 3> template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype 3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, Range) // where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, Range)
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
Range > > Range > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, TinyVector< P_numtype3, N_length3>) // where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, TinyVector< P_numtype3, N_length3>)
template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype 3, int N_length3> template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype 3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, int) // where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, int)
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, float) // where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, float)
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, double) // where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, double)
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, long double ) // where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, long double )
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, complex<T3> ) // where(TinyVector<P_numtype1, N_length1>, Vector<P_numtype2>, complex<T3> )
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class P_numtype2, class T3> template<class P_numtype1, int N_length1, class P_numtype2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const Vector<P_numtype2>& d2, const Vector<P_numtype2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorIterConst<P_numtype2>, VectorIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, Vector<P_ numtype3>) // where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, Vector<P_ numtype3>)
template<class P_numtype1, int N_length1, class P_expr2, class P_numtype3> template<class P_numtype1, int N_length1, class P_expr2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, _bz_VecEx pr<P_expr3>) // where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, _bz_VecEx pr<P_expr3>)
template<class P_numtype1, int N_length1, class P_expr2, class P_expr3> template<class P_numtype1, int N_length1, class P_expr2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, VectorPic k<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, VectorPic k<P_numtype3>)
template<class P_numtype1, int N_length1, class P_expr2, class P_numtype3> template<class P_numtype1, int N_length1, class P_expr2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, Range) // where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, Range)
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
Range > > Range > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, TinyVecto r<P_numtype3, N_length3>) // where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, TinyVecto r<P_numtype3, N_length3>)
template<class P_numtype1, int N_length1, class P_expr2, class P_numtype3, int N_length3> template<class P_numtype1, int N_length1, class P_expr2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, int) // where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, int)
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, float) // where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, float)
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, double) // where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, double)
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, long doub le) // where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, long doub le)
template<class P_numtype1, int N_length1, class P_expr2> template<class P_numtype1, int N_length1, class P_expr2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, complex<T 3>) // where(TinyVector<P_numtype1, N_length1>, _bz_VecExpr<P_expr2>, complex<T 3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class P_expr2, class T3> template<class P_numtype1, int N_length1, class P_expr2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
_bz_VecExpr<P_expr2> d2, _bz_VecExpr<P_expr2> d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExpr<P_expr2>, _bz_VecExpr<P_expr2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, Vector< P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, Vector< P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype 3> template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype 3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, _bz_Vec Expr<P_expr3>) // where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, _bz_Vec Expr<P_expr3>)
template<class P_numtype1, int N_length1, class P_numtype2, class P_expr3> template<class P_numtype1, int N_length1, class P_numtype2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, VectorP ick<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, VectorP ick<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype 3> template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype 3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, Range) // where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, Range)
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
Range > > Range > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, TinyVec tor<P_numtype3, N_length3>) // where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, TinyVec tor<P_numtype3, N_length3>)
template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype 3, int N_length3> template<class P_numtype1, int N_length1, class P_numtype2, class P_numtype 3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, int) // where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, int)
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, float) // where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, float)
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, double) // where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, double)
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, long do uble) // where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, long do uble)
template<class P_numtype1, int N_length1, class P_numtype2> template<class P_numtype1, int N_length1, class P_numtype2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, complex <T3>) // where(TinyVector<P_numtype1, N_length1>, VectorPick<P_numtype2>, complex <T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class P_numtype2, class T3> template<class P_numtype1, int N_length1, class P_numtype2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const VectorPick<P_numtype2>& d2, const VectorPick<P_numtype2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
VectorPickIterConst<P_numtype2>, VectorPickIterConst<P_numtype2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(TinyVector<P_numtype1, N_length1>, Range, Vector<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, Range, Vector<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
Range d2, Range d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, Range, _bz_VecExpr<P_expr3>) // where(TinyVector<P_numtype1, N_length1>, Range, _bz_VecExpr<P_expr3>)
template<class P_numtype1, int N_length1, class P_expr3> template<class P_numtype1, int N_length1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
Range d2, Range d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, Range, VectorPick<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, Range, VectorPick<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
Range d2, Range d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, Range, Range) // where(TinyVector<P_numtype1, N_length1>, Range, Range)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
Range > > Range > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
Range d2, Range d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, Range, TinyVector<P_numtype3, N _length3>) // where(TinyVector<P_numtype1, N_length1>, Range, TinyVector<P_numtype3, N _length3>)
template<class P_numtype1, int N_length1, class P_numtype3, int N_length3> template<class P_numtype1, int N_length1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
Range d2, Range d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, Range, int) // where(TinyVector<P_numtype1, N_length1>, Range, int)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
Range d2, Range d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, Range, float) // where(TinyVector<P_numtype1, N_length1>, Range, float)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
Range d2, Range d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, Range, double) // where(TinyVector<P_numtype1, N_length1>, Range, double)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
Range d2, Range d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, Range, long double) // where(TinyVector<P_numtype1, N_length1>, Range, long double)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
Range d2, Range d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, Range, complex<T3>) // where(TinyVector<P_numtype1, N_length1>, Range, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class T3> template<class P_numtype1, int N_length1, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
Range d2, Range d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
Range, Range,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2, d2,
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, Vector<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, Vector<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, _bz_VecExpr<P_expr3>) // where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, _bz_VecExpr<P_expr3>)
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_expr3> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, VectorPick<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, VectorPick<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, Range) // where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, Range)
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
Range > > Range > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, TinyVector<P_numtype3, N_length3>) // where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_numtype3, int N_length3> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, int) // where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, int)
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, float) // where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, float)
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, double) // where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, double)
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, long double) // where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, long double)
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, complex<T3>) // where(TinyVector<P_numtype1, N_length1>, TinyVector<P_numtype2, N_length 2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class T3> template<class P_numtype1, int N_length1, class P_numtype2, int N_length2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
const TinyVector<P_numtype2, N_length2>& d2, const TinyVector<P_numtype2, N_length2>& d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
TinyVectorIterConst<P_numtype2, N_length2>, TinyVectorIterConst<P_numtype2, N_length2>,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
d2.begin(), d2.beginFast(),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(TinyVector<P_numtype1, N_length1>, int, Vector<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, int, Vector<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
int d2, int d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, int, _bz_VecExpr<P_expr3>) // where(TinyVector<P_numtype1, N_length1>, int, _bz_VecExpr<P_expr3>)
template<class P_numtype1, int N_length1, class P_expr3> template<class P_numtype1, int N_length1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
int d2, int d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, int, VectorPick<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, int, VectorPick<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
int d2, int d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, int, Range) // where(TinyVector<P_numtype1, N_length1>, int, Range)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
Range > > Range > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
int d2, int d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, int, TinyVector<P_numtype3, N_l ength3>) // where(TinyVector<P_numtype1, N_length1>, int, TinyVector<P_numtype3, N_l ength3>)
template<class P_numtype1, int N_length1, class P_numtype3, int N_length3> template<class P_numtype1, int N_length1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
int d2, int d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, int, int) // where(TinyVector<P_numtype1, N_length1>, int, int)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExprConstant<int> > > _bz_VecExprConstant<int> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
int d2, int d2,
int d3) int d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<int>, _bz_VecExprConstant<int>,
_bz_VecExprConstant<int> > T_expr; _bz_VecExprConstant<int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<int>(d2), _bz_VecExprConstant<int>(d2),
_bz_VecExprConstant<int>(d3))); _bz_VecExprConstant<int>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, float, Vector<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, float, Vector<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
float d2, float d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, float, _bz_VecExpr<P_expr3>) // where(TinyVector<P_numtype1, N_length1>, float, _bz_VecExpr<P_expr3>)
template<class P_numtype1, int N_length1, class P_expr3> template<class P_numtype1, int N_length1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
float d2, float d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, float, VectorPick<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, float, VectorPick<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
float d2, float d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, float, Range) // where(TinyVector<P_numtype1, N_length1>, float, Range)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
Range > > Range > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
float d2, float d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, float, TinyVector<P_numtype3, N _length3>) // where(TinyVector<P_numtype1, N_length1>, float, TinyVector<P_numtype3, N _length3>)
template<class P_numtype1, int N_length1, class P_numtype3, int N_length3> template<class P_numtype1, int N_length1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
float d2, float d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, float, float) // where(TinyVector<P_numtype1, N_length1>, float, float)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExprConstant<float> > > _bz_VecExprConstant<float> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
float d2, float d2,
float d3) float d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<float>, _bz_VecExprConstant<float>,
_bz_VecExprConstant<float> > T_expr; _bz_VecExprConstant<float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<float>(d2), _bz_VecExprConstant<float>(d2),
_bz_VecExprConstant<float>(d3))); _bz_VecExprConstant<float>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, double, Vector<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, double, Vector<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
double d2, double d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, double, _bz_VecExpr<P_expr3>) // where(TinyVector<P_numtype1, N_length1>, double, _bz_VecExpr<P_expr3>)
template<class P_numtype1, int N_length1, class P_expr3> template<class P_numtype1, int N_length1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
double d2, double d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, double, VectorPick<P_numtype3>) // where(TinyVector<P_numtype1, N_length1>, double, VectorPick<P_numtype3>)
template<class P_numtype1, int N_length1, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
double d2, double d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, double, Range) // where(TinyVector<P_numtype1, N_length1>, double, Range)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
Range > > Range > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
double d2, double d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, double, TinyVector<P_numtype3, N_length3>) // where(TinyVector<P_numtype1, N_length1>, double, TinyVector<P_numtype3, N_length3>)
template<class P_numtype1, int N_length1, class P_numtype3, int N_length3> template<class P_numtype1, int N_length1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
double d2, double d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, double, double) // where(TinyVector<P_numtype1, N_length1>, double, double)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExprConstant<double> > > _bz_VecExprConstant<double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
double d2, double d2,
double d3) double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<double>, _bz_VecExprConstant<double>,
_bz_VecExprConstant<double> > T_expr; _bz_VecExprConstant<double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<double>(d2), _bz_VecExprConstant<double>(d2),
_bz_VecExprConstant<double>(d3))); _bz_VecExprConstant<double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, long double, Vector<P_numtype3> ) // where(TinyVector<P_numtype1, N_length1>, long double, Vector<P_numtype3> )
template<class P_numtype1, int N_length1, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
long double d2, long double d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, long double, _bz_VecExpr<P_expr 3>) // where(TinyVector<P_numtype1, N_length1>, long double, _bz_VecExpr<P_expr 3>)
template<class P_numtype1, int N_length1, class P_expr3> template<class P_numtype1, int N_length1, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
long double d2, long double d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, long double, VectorPick<P_numty pe3>) // where(TinyVector<P_numtype1, N_length1>, long double, VectorPick<P_numty pe3>)
template<class P_numtype1, int N_length1, class P_numtype3> template<class P_numtype1, int N_length1, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
long double d2, long double d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, long double, Range) // where(TinyVector<P_numtype1, N_length1>, long double, Range)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
Range > > Range > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
long double d2, long double d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3)); d3));
} }
// where(TinyVector<P_numtype1, N_length1>, long double, TinyVector<P_numty pe3, N_length3>) // where(TinyVector<P_numtype1, N_length1>, long double, TinyVector<P_numty pe3, N_length3>)
template<class P_numtype1, int N_length1, class P_numtype3, int N_length3> template<class P_numtype1, int N_length1, class P_numtype3, int N_length3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
long double d2, long double d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
d3.begin())); d3.beginFast()));
} }
// where(TinyVector<P_numtype1, N_length1>, long double, long double) // where(TinyVector<P_numtype1, N_length1>, long double, long double)
template<class P_numtype1, int N_length1> template<class P_numtype1, int N_length1>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExprConstant<long double> > > _bz_VecExprConstant<long double> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
long double d2, long double d2,
long double d3) long double d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<long double>, _bz_VecExprConstant<long double>,
_bz_VecExprConstant<long double> > T_expr; _bz_VecExprConstant<long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<long double>(d2), _bz_VecExprConstant<long double>(d2),
_bz_VecExprConstant<long double>(d3))); _bz_VecExprConstant<long double>(d3)));
} }
// where(TinyVector<P_numtype1, N_length1>, complex<T2>, Vector<P_numtype3> ) // where(TinyVector<P_numtype1, N_length1>, complex<T2>, Vector<P_numtype3> )
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class T2, class P_numtype3> template<class P_numtype1, int N_length1, class T2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorIterConst<P_numtype3> > > VectorIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2, complex<T2> d2,
const Vector<P_numtype3>& d3) const Vector<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorIterConst<P_numtype3> > T_expr; VectorIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(TinyVector<P_numtype1, N_length1>, complex<T2>, _bz_VecExpr<P_expr 3>) // where(TinyVector<P_numtype1, N_length1>, complex<T2>, _bz_VecExpr<P_expr 3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class T2, class P_expr3> template<class P_numtype1, int N_length1, class T2, class P_expr3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExpr<P_expr3> > > _bz_VecExpr<P_expr3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2, complex<T2> d2,
_bz_VecExpr<P_expr3> d3) _bz_VecExpr<P_expr3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExpr<P_expr3> > T_expr; _bz_VecExpr<P_expr3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3)); d3));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(TinyVector<P_numtype1, N_length1>, complex<T2>, VectorPick<P_numty pe3>) // where(TinyVector<P_numtype1, N_length1>, complex<T2>, VectorPick<P_numty pe3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class T2, class P_numtype3> template<class P_numtype1, int N_length1, class T2, class P_numtype3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorPickIterConst<P_numtype3> > > VectorPickIterConst<P_numtype3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2, complex<T2> d2,
const VectorPick<P_numtype3>& d3) const VectorPick<P_numtype3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
VectorPickIterConst<P_numtype3> > T_expr; VectorPickIterConst<P_numtype3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(TinyVector<P_numtype1, N_length1>, complex<T2>, Range) // where(TinyVector<P_numtype1, N_length1>, complex<T2>, Range)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class T2> template<class P_numtype1, int N_length1, class T2>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
Range > > Range > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2, complex<T2> d2,
Range d3) Range d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
Range > T_expr; Range > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3)); d3));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(TinyVector<P_numtype1, N_length1>, complex<T2>, TinyVector<P_numty pe3, N_length3>) // where(TinyVector<P_numtype1, N_length1>, complex<T2>, TinyVector<P_numty pe3, N_length3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class T2, class P_numtype3, int N _length3> template<class P_numtype1, int N_length1, class T2, class P_numtype3, int N _length3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
TinyVectorIterConst<P_numtype3, N_length3> > > TinyVectorIterConst<P_numtype3, N_length3> > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2, complex<T2> d2,
const TinyVector<P_numtype3, N_length3>& d3) const TinyVector<P_numtype3, N_length3>& d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
TinyVectorIterConst<P_numtype3, N_length3> > T_expr; TinyVectorIterConst<P_numtype3, N_length3> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
d3.begin())); d3.beginFast()));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
// where(TinyVector<P_numtype1, N_length1>, complex<T2>, complex<T3>) // where(TinyVector<P_numtype1, N_length1>, complex<T2>, complex<T3>)
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
template<class P_numtype1, int N_length1, class T2, class T3> template<class P_numtype1, int N_length1, class T2, class T3>
inline inline
_bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, _bz_VecExpr<_bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExprConstant<complex<T3> > > > _bz_VecExprConstant<complex<T3> > > >
where(const TinyVector<P_numtype1, N_length1>& d1, where(const TinyVector<P_numtype1, N_length1>& d1,
complex<T2> d2, complex<T2> d2,
complex<T3> d3) complex<T3> d3)
{ {
typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>, typedef _bz_VecWhere<TinyVectorIterConst<P_numtype1, N_length1>,
_bz_VecExprConstant<complex<T2> > , _bz_VecExprConstant<complex<T2> > ,
_bz_VecExprConstant<complex<T3> > > T_expr; _bz_VecExprConstant<complex<T3> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(), return _bz_VecExpr<T_expr>(T_expr(d1.beginFast(),
_bz_VecExprConstant<complex<T2> > (d2), _bz_VecExprConstant<complex<T2> > (d2),
_bz_VecExprConstant<complex<T3> > (d3))); _bz_VecExprConstant<complex<T3> > (d3)));
} }
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif #endif
 End of changes. 412 change blocks. 
556 lines changed or deleted 553 lines changed or added


 vecwhere.h   vecwhere.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/vecwhere.h where(X,Y,Z) function for vectors * blitz/vecwhere.h where(X,Y,Z) function for vectors
* *
* $Id: vecwhere.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: vecwhere.h,v 1.5 2005/05/07 04:17:56 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: vecwhere.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/23 03:28:28 tveldhui
* Periodic RCS update
*
*/
#ifndef BZ_VECWHERE_H #ifndef BZ_VECWHERE_H
#define BZ_VECWHERE_H #define BZ_VECWHERE_H
#ifndef BZ_VECEXPR_H #ifndef BZ_VECEXPR_H
#error <blitz/vecwhere.h> must be included via <blitz/vector.h> #error <blitz/vecwhere.h> must be included via <blitz/vector.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr1, class P_expr2, class P_expr3> template<typename P_expr1, typename P_expr2, typename P_expr3>
class _bz_VecWhere { class _bz_VecWhere {
public: public:
typedef P_expr1 T_expr1; typedef P_expr1 T_expr1;
typedef P_expr2 T_expr2; typedef P_expr2 T_expr2;
typedef P_expr3 T_expr3; typedef P_expr3 T_expr3;
typedef _bz_typename T_expr2::T_numtype T_numtype2; typedef _bz_typename T_expr2::T_numtype T_numtype2;
typedef _bz_typename T_expr3::T_numtype T_numtype3; typedef _bz_typename T_expr3::T_numtype T_numtype3;
typedef BZ_PROMOTE(T_numtype2, T_numtype3) T_numtype; typedef BZ_PROMOTE(T_numtype2, T_numtype3) T_numtype;
skipping to change at line 87 skipping to change at line 68
_bz_VecWhere(const _bz_VecWhere<T_expr1, T_expr2, T_expr3>& x) _bz_VecWhere(const _bz_VecWhere<T_expr1, T_expr2, T_expr3>& x)
: iter1_(x.iter1_), iter2_(x.iter2_), iter3_(x.iter3_) : iter1_(x.iter1_), iter2_(x.iter2_), iter3_(x.iter3_)
{ } { }
#endif #endif
T_numtype operator[](int i) const T_numtype operator[](int i) const
{ {
return iter1_[i] ? iter2_[i] : iter3_[i]; return iter1_[i] ? iter2_[i] : iter3_[i];
} }
enum { static const int
_bz_staticLengthCount = _bz_staticLengthCount = P_expr1::_bz_staticLengthCount
P_expr1::_bz_staticLengthCount + P_expr2::_bz_staticLengthCount + P_expr2::_bz_staticLengthCount
+ P_expr3::_bz_staticLengthCount, + P_expr3::_bz_staticLengthCount,
_bz_dynamicLengthCount = P_expr1::_bz_dynamicLengthCount
_bz_dynamicLengthCount = + P_expr2::_bz_dynamicLengthCount
P_expr1::_bz_dynamicLengthCount + P_expr2::_bz_dynamicLengthCount + P_expr3::_bz_dynamicLengthCount,
+ P_expr3::_bz_dynamicLengthCount, _bz_staticLength =
_bz_meta_max<_bz_meta_max<P_expr1::_bz_staticLength,
_bz_staticLength = P_expr2::_bz_staticLength>::max, P_expr3::_bz_staticLength>::ma
_bz_meta_max<_bz_meta_max<P_expr1::_bz_staticLength, x;
P_expr2::_bz_staticLength>::max, P_expr3::_bz_staticLength>::ma
x
};
T_numtype _bz_fastAccess(int i) const T_numtype _bz_fastAccess(int i) const
{ {
return iter1_._bz_fastAccess(i) return iter1_._bz_fastAccess(i)
? iter2_._bz_fastAccess(i) ? iter2_._bz_fastAccess(i)
: iter3_._bz_fastAccess(i); : iter3_._bz_fastAccess(i);
} }
_bz_bool _bz_hasFastAccess() const bool _bz_hasFastAccess() const
{ {
return iter1_._bz_hasFastAccess() && return iter1_._bz_hasFastAccess() &&
iter2_._bz_hasFastAccess() && iter2_._bz_hasFastAccess() &&
iter3_._bz_hasFastAccess(); iter3_._bz_hasFastAccess();
} }
int length(int recommendedLength) const int length(int recommendedLength) const
{ {
return iter1_.length(recommendedLength); return iter1_.length(recommendedLength);
} }
 End of changes. 6 change blocks. 
39 lines changed or deleted 17 lines changed or added


 where.h   where.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/where.h where(X,Y,Z) operator for array expressions * blitz/array/where.h where(X,Y,Z) operator for array expressions
* *
* $Id: where.h,v 1.3 2002/03/06 17:12:26 patricg Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: where.h,v $
* Revision 1.3 2002/03/06 17:12:26 patricg
*
* minmax::max(minmax::max(stride1,stride2),stride3)
* replaced by
* stride1>(stride2=(stride2>stride3?stride2:stride3))?stride1:stride2
*
* Revision 1.2 2001/01/25 00:25:56 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYWHERE_H #ifndef BZ_ARRAYWHERE_H
#define BZ_ARRAYWHERE_H #define BZ_ARRAYWHERE_H
#ifndef BZ_ARRAYEXPR_H #ifndef BZ_ARRAYEXPR_H
#error <blitz/array/where.h> must be included via <blitz/array/expr.h> #error <blitz/array/where.h> must be included via <blitz/array/expr.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_expr1, class P_expr2, class P_expr3> template<typename P_expr1, typename P_expr2, typename P_expr3>
class _bz_ArrayWhere { class _bz_ArrayWhere {
public: public:
typedef P_expr1 T_expr1; typedef P_expr1 T_expr1;
typedef P_expr2 T_expr2; typedef P_expr2 T_expr2;
typedef P_expr3 T_expr3; typedef P_expr3 T_expr3;
typedef _bz_typename T_expr2::T_numtype T_numtype2; typedef _bz_typename T_expr2::T_numtype T_numtype2;
typedef _bz_typename T_expr3::T_numtype T_numtype3; typedef _bz_typename T_expr3::T_numtype T_numtype3;
typedef BZ_PROMOTE(T_numtype2, T_numtype3) T_numtype; typedef BZ_PROMOTE(T_numtype2, T_numtype3) T_numtype;
typedef T_expr1 T_ctorArg1; typedef T_expr1 T_ctorArg1;
typedef T_expr2 T_ctorArg2; typedef T_expr2 T_ctorArg2;
typedef T_expr3 T_ctorArg3; typedef T_expr3 T_ctorArg3;
enum { numArrayOperands = BZ_ENUM_CAST(P_expr1::numArrayOperands) static const int
+ BZ_ENUM_CAST(P_expr2::numArrayOperands) numArrayOperands = P_expr1::numArrayOperands
+ BZ_ENUM_CAST(P_expr3::numArrayOperands), + P_expr2::numArrayOperands
numIndexPlaceholders = BZ_ENUM_CAST(P_expr1::numIndexPlaceholder + P_expr3::numArrayOperands,
s) numIndexPlaceholders = P_expr1::numIndexPlaceholders
+ BZ_ENUM_CAST(P_expr2::numIndexPlaceholders) + P_expr2::numIndexPlaceholders
+ BZ_ENUM_CAST(P_expr3::numIndexPlaceholders), + P_expr3::numIndexPlaceholders,
rank = _bz_meta_max<_bz_meta_max<P_expr1::rank,P_expr2::rank>::m rank = _bz_meta_max<_bz_meta_max<P_expr1::rank,P_expr2::rank>::max,
ax, P_expr3::rank>::max;
P_expr3::rank>::max
};
_bz_ArrayWhere(const _bz_ArrayWhere<T_expr1,T_expr2,T_expr3>& a) _bz_ArrayWhere(const _bz_ArrayWhere<T_expr1,T_expr2,T_expr3>& a)
: iter1_(a.iter1_), iter2_(a.iter2_), iter3_(a.iter3_) : iter1_(a.iter1_), iter2_(a.iter2_), iter3_(a.iter3_)
{ } { }
template<class T1, class T2, class T3> template<typename T1, typename T2, typename T3>
_bz_ArrayWhere(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b, BZ_ETPARM(T3) c) _bz_ArrayWhere(BZ_ETPARM(T1) a, BZ_ETPARM(T2) b, BZ_ETPARM(T3) c)
: iter1_(a), iter2_(b), iter3_(c) : iter1_(a), iter2_(b), iter3_(c)
{ } { }
T_numtype operator*() T_numtype operator*()
{ return (*iter1_) ? (*iter2_) : (*iter3_); } { return (*iter1_) ? (*iter2_) : (*iter3_); }
template<int N_rank> template<int N_rank>
T_numtype operator()(const TinyVector<int, N_rank>& i) T_numtype operator()(const TinyVector<int, N_rank>& i)
{ return iter1_(i) ? iter2_(i) : iter3_(i); } { return iter1_(i) ? iter2_(i) : iter3_(i); }
skipping to change at line 149 skipping to change at line 136
iter3_.advance(n); iter3_.advance(n);
} }
void loadStride(int rank) void loadStride(int rank)
{ {
iter1_.loadStride(rank); iter1_.loadStride(rank);
iter2_.loadStride(rank); iter2_.loadStride(rank);
iter3_.loadStride(rank); iter3_.loadStride(rank);
} }
_bz_bool isUnitStride(int rank) const bool isUnitStride(int rank) const
{ {
return iter1_.isUnitStride(rank) return iter1_.isUnitStride(rank)
&& iter2_.isUnitStride(rank) && iter2_.isUnitStride(rank)
&& iter3_.isUnitStride(rank); && iter3_.isUnitStride(rank);
} }
void advanceUnitStride() void advanceUnitStride()
{ {
iter1_.advanceUnitStride(); iter1_.advanceUnitStride();
iter2_.advanceUnitStride(); iter2_.advanceUnitStride();
iter3_.advanceUnitStride(); iter3_.advanceUnitStride();
} }
_bz_bool canCollapse(int outerLoopRank, int innerLoopRank) const bool canCollapse(int outerLoopRank, int innerLoopRank) const
{ {
// BZ_DEBUG_MESSAGE("_bz_ArrayExprOp<>::canCollapse");
return iter1_.canCollapse(outerLoopRank, innerLoopRank) return iter1_.canCollapse(outerLoopRank, innerLoopRank)
&& iter2_.canCollapse(outerLoopRank, innerLoopRank) && iter2_.canCollapse(outerLoopRank, innerLoopRank)
&& iter3_.canCollapse(outerLoopRank, innerLoopRank); && iter3_.canCollapse(outerLoopRank, innerLoopRank);
} }
template<int N_rank> template<int N_rank>
void moveTo(const TinyVector<int,N_rank>& i) void moveTo(const TinyVector<int,N_rank>& i)
{ {
iter1_.moveTo(i); iter1_.moveTo(i);
iter2_.moveTo(i); iter2_.moveTo(i);
skipping to change at line 194 skipping to change at line 180
int suggestStride(int rank) const int suggestStride(int rank) const
{ {
int stride1 = iter1_.suggestStride(rank); int stride1 = iter1_.suggestStride(rank);
int stride2 = iter2_.suggestStride(rank); int stride2 = iter2_.suggestStride(rank);
int stride3 = iter3_.suggestStride(rank); int stride3 = iter3_.suggestStride(rank);
return stride1>(stride2=(stride2>stride3?stride2:stride3))?stride1: stride2; return stride1>(stride2=(stride2>stride3?stride2:stride3))?stride1: stride2;
//return minmax::max(minmax::max(stride1,stride2),stride3); //return minmax::max(minmax::max(stride1,stride2),stride3);
} }
_bz_bool isStride(int rank, int stride) const bool isStride(int rank, int stride) const
{ {
return iter1_.isStride(rank,stride) return iter1_.isStride(rank,stride)
&& iter2_.isStride(rank,stride) && iter2_.isStride(rank,stride)
&& iter3_.isStride(rank,stride); && iter3_.isStride(rank,stride);
} }
void prettyPrint(string& str, prettyPrintFormat& format) const void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format) const
{ {
str += "where("; str += "where(";
iter1_.prettyPrint(str,format); iter1_.prettyPrint(str,format);
str += ","; str += ",";
iter2_.prettyPrint(str,format); iter2_.prettyPrint(str,format);
str += ","; str += ",";
iter3_.prettyPrint(str,format); iter3_.prettyPrint(str,format);
str += ")"; str += ")";
} }
template<class T_shape> template<typename T_shape>
_bz_bool shapeCheck(const T_shape& shape) bool shapeCheck(const T_shape& shape)
{ {
int t1 = iter1_.shapeCheck(shape); int t1 = iter1_.shapeCheck(shape);
int t2 = iter2_.shapeCheck(shape); int t2 = iter2_.shapeCheck(shape);
int t3 = iter3_.shapeCheck(shape); int t3 = iter3_.shapeCheck(shape);
return t1 && t2 && t3; return t1 && t2 && t3;
} }
private: private:
_bz_ArrayWhere() { } _bz_ArrayWhere() { }
T_expr1 iter1_; T_expr1 iter1_;
T_expr2 iter2_; T_expr2 iter2_;
T_expr3 iter3_; T_expr3 iter3_;
}; };
template<class T1, class T2, class T3> template<typename T1, typename T2, typename T3>
inline inline
_bz_ArrayExpr<_bz_ArrayWhere<_bz_typename asExpr<T1>::T_expr, _bz_ArrayExpr<_bz_ArrayWhere<_bz_typename asExpr<T1>::T_expr,
_bz_typename asExpr<T2>::T_expr, _bz_typename asExpr<T3>::T_expr> > _bz_typename asExpr<T2>::T_expr, _bz_typename asExpr<T3>::T_expr> >
where(const T1& a, const T2& b, const T3& c) where(const T1& a, const T2& b, const T3& c)
{ {
return _bz_ArrayExpr<_bz_ArrayWhere<_bz_typename asExpr<T1>::T_expr, return _bz_ArrayExpr<_bz_ArrayWhere<_bz_typename asExpr<T1>::T_expr,
_bz_typename asExpr<T2>::T_expr, _bz_typename asExpr<T2>::T_expr,
_bz_typename asExpr<T3>::T_expr> >(a,b,c); _bz_typename asExpr<T3>::T_expr> >(a,b,c);
} }
 End of changes. 13 change blocks. 
37 lines changed or deleted 22 lines changed or added


 zero.cc   zero.cc 
/* /*
* $Id: zero.cc,v 1.1.1.1 2000/06/19 12:26:09 tveldhui Exp $
*
* Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997 Todd Veldhuizen <tveldhui@oonumerics.org>
* All rights reserved. Please see <blitz/blitz.h> for terms and * All rights reserved. Please see <blitz/blitz.h> for terms and
* conditions of use. * conditions of use.
* *
* $Log: zero.cc,v $
* Revision 1.1.1.1 2000/06/19 12:26:09 tveldhui
* Imported sources
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
*/ */
#ifndef BZ_ZERO_H #ifndef BZ_ZERO_H
#include <blitz/zero.h> #include <blitz/zero.h>
#endif #endif
#ifndef BZ_ZERO_CC #ifndef BZ_ZERO_CC
#define BZ_ZERO_CC #define BZ_ZERO_CC
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_numtype>
P_numtype ZeroElement<P_numtype>::zero_ = 0;
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
complex<float> ZeroElement<complex<float> >::zero_ = complex<float> ZeroElement<complex<float> >::zero_ =
complex<float>(0.0f, 0.0f); complex<float>(0.0f, 0.0f);
complex<double> ZeroElement<complex<double> >::zero_ = complex<double> ZeroElement<complex<double> >::zero_ =
complex<double>(0.,0.); complex<double>(0.,0.);
complex<long double> ZeroElement<complex<long double> >::zero_ = complex<long double> ZeroElement<complex<long double> >::zero_ =
complex<long double>(0.0L, 0.0L); complex<long double>(0.0L, 0.0L);
 End of changes. 3 change blocks. 
15 lines changed or deleted 0 lines changed or added


 zero.h   zero.h 
/************************************************************************** * /************************************************************************** *
* blitz/zero.h Zero elements * blitz/zero.h Zero elements
* *
* $Id: zero.h,v 1.2 2001/01/24 20:22:50 tveldhui Exp $ * $Id: zero.h,v 1.5 2003/12/11 03:44:22 julianc Exp $
* *
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* */
* $Log: zero.h,v $
* Revision 1.2 2001/01/24 20:22:50 tveldhui /*
* Updated copyright date in headers.
*
* Revision 1.1.1.1 2000/06/19 12:26:10 tveldhui
* Imported sources
*
* Revision 1.4 1998/03/14 00:04:47 tveldhui
* 0.2-alpha-05
*
* Revision 1.3 1997/07/16 14:51:20 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
* Revision 1.2 1997/01/24 14:42:00 tveldhui
* Periodic RCS update
*
* Revision 1.1 1997/01/13 22:19:58 tveldhui
* Periodic RCS update
*
*
**************************************************************************
*
*
* The purpose of the ZeroElement class is to provide an lvalue for * The purpose of the ZeroElement class is to provide an lvalue for
* non-const element access of matrices with zero elements. For * non-const element access of matrices with zero elements. For
* example, a tridiagonal matrix has many elements which are * example, a tridiagonal matrix has many elements which are
* always zero: * always zero:
* *
* [ x x 0 0 ] * [ x x 0 0 ]
* [ x x x 0 ] * [ x x x 0 ]
* [ 0 x x x ] * [ 0 x x x ]
* [ 0 0 x x ] * [ 0 0 x x ]
* *
skipping to change at line 83 skipping to change at line 63
#ifndef BZ_ZERO_H #ifndef BZ_ZERO_H
#define BZ_ZERO_H #define BZ_ZERO_H
#ifndef BZ_BLITZ_H #ifndef BZ_BLITZ_H
#include <blitz/blitz.h> #include <blitz/blitz.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_numtype> template<typename P_numtype>
class ZeroElement { class ZeroElement {
public: public:
typedef P_numtype T_numtype; typedef P_numtype T_numtype;
static T_numtype& zero() static T_numtype& zero()
{ {
return zero_; return zero_;
} }
private: private:
static T_numtype zero_; static T_numtype zero_;
}; };
// Specialization of ZeroElement for complex<float>, complex<double>, // Specialization of ZeroElement for complex<float>, complex<double>,
// and complex<long double> // and complex<long double>
#define BZZERO_DECLARE(T) \ #define BZZERO_DECLARE(T) \
template<> \ template<> \
class ZeroElement<T > { \ class ZeroElement<T > { \
public: \ public: \
static T& getZero() \ static T& zero() \
{ return zero_; } \ { return zero_; } \
private: \ private: \
static T zero_; \ static T zero_; \
} }
#ifdef BZ_HAVE_COMPLEX #ifdef BZ_HAVE_COMPLEX
BZZERO_DECLARE(complex<float>); BZZERO_DECLARE(complex<float>);
BZZERO_DECLARE(complex<double>); BZZERO_DECLARE(complex<double>);
BZZERO_DECLARE(complex<long double>); BZZERO_DECLARE(complex<long double>);
#endif // BZ_HAVE_COMPLEX #endif // BZ_HAVE_COMPLEX
BZ_NAMESPACE_END // initialization of static data member for general class template
#include <blitz/zero.cc> template<typename P_numtype>
P_numtype ZeroElement<P_numtype>::zero_ = 0;
BZ_NAMESPACE_END
#endif // BZ_ZERO_H #endif // BZ_ZERO_H
 End of changes. 6 change blocks. 
30 lines changed or deleted 12 lines changed or added


 zip.h   zip.h 
// -*- C++ -*-
/************************************************************************** * /************************************************************************** *
* blitz/array/zip.h "zip" scalar arrays into a multicomponent array expr * blitz/array/zip.h "zip" scalar arrays into a multicomponent array expr
* *
* $Id: zip.h,v 1.2 2001/01/25 00:25:56 tveldhui Exp $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* Suggestions: blitz-dev@oonumerics.org * Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org * Bugs: blitz-bugs@oonumerics.org
* *
* For more information, please see the Blitz++ Home Page: * For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/ * http://oonumerics.org/blitz/
* *
************************************************************************** **************************************************************************
* **/
* $Log: zip.h,v $
* Revision 1.2 2001/01/25 00:25:56 tveldhui
* Ensured that source files have cvs logs.
*
*/
#ifndef BZ_ARRAYZIP_H #ifndef BZ_ARRAYZIP_H
#define BZ_ARRAYZIP_H #define BZ_ARRAYZIP_H
#ifndef BZ_ARRAY_H #ifndef BZ_ARRAY_H
#error <blitz/array/zip.h> must be included via <blitz/array.h> #error <blitz/array/zip.h> must be included via <blitz/array.h>
#endif #endif
BZ_NAMESPACE(blitz) BZ_NAMESPACE(blitz)
template<class P_component, class T1, class T2> template<typename P_component, typename T1, typename T2>
struct Zip2 { struct Zip2 {
typedef P_component T_numtype; typedef P_component T_numtype;
static inline T_numtype apply(T1 a, T2 b) static inline T_numtype apply(T1 a, T2 b)
{ return T_numtype(a,b); } { return T_numtype(a,b); }
template<class T_left, class T_right> template<typename T_left, typename T_right>
static inline void prettyPrint(string& str, static inline void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format, const T_left& t1, prettyPrintFormat& format, const T_left& t1,
const T_right& t2) const T_right& t2)
{ {
str += "zip("; str += "zip(";
t1.prettyPrint(str, format); t1.prettyPrint(str, format);
str += ","; str += ",";
t2.prettyPrint(str, format); t2.prettyPrint(str, format);
str += ")"; str += ")";
} }
}; };
template<class T_component, class T1, class T2> template<typename T_component, typename T1, typename T2>
inline _bz_ArrayExpr<_bz_ArrayExprOp<_bz_typename asExpr<T1>::T_expr, inline _bz_ArrayExpr<_bz_ArrayExprBinaryOp<
_bz_typename asExpr<T2>::T_expr, Zip2<T_component, _bz_typename asExpr<T1>::T_expr,
_bz_typename asExpr<T1>::T_expr::T_numtype, _bz_typename asExpr<T2>::T_expr,
_bz_typename asExpr<T2>::T_expr::T_numtype> > > Zip2<T_component,
_bz_typename asExpr<T1>::T_expr::T_numtype,
_bz_typename asExpr<T2>::T_expr::T_numtype> > >
zip(const T1& a, const T2& b, T_component) zip(const T1& a, const T2& b, T_component)
{ {
return _bz_ArrayExpr<_bz_ArrayExprOp<_bz_typename asExpr<T1>::T_expr, return _bz_ArrayExpr<_bz_ArrayExprBinaryOp<
_bz_typename asExpr<T2>::T_expr, Zip2<T_component, _bz_typename asExpr<T1>::T_expr,
_bz_typename asExpr<T1>::T_expr::T_numtype, _bz_typename asExpr<T2>::T_expr,
_bz_typename asExpr<T2>::T_expr::T_numtype> > >(a,b); Zip2<T_component,
_bz_typename asExpr<T1>::T_expr::T_numtype,
_bz_typename asExpr<T2>::T_expr::T_numtype> > >(a,b);
} }
BZ_NAMESPACE_END BZ_NAMESPACE_END
#endif // BZ_ARRAYZIP_H #endif // BZ_ARRAYZIP_H
 End of changes. 7 change blocks. 
22 lines changed or deleted 19 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/