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;