blitz/ops.h File Reference

#include <blitz/blitz.h>
#include <blitz/promote.h>
#include <blitz/prettyprint.h>

Include dependency graph for ops.h:

Go to the source code of this file.

Classes

struct  BitwiseNot< T_numtype1 >
struct  UnaryPlus< T_numtype1 >
struct  UnaryMinus< T_numtype1 >
struct  LogicalNot< T_numtype1 >
struct  Add< T_numtype1, T_numtype2 >
struct  Subtract< T_numtype1, T_numtype2 >
struct  Multiply< T_numtype1, T_numtype2 >
struct  Divide< T_numtype1, T_numtype2 >
struct  Modulo< T_numtype1, T_numtype2 >
struct  BitwiseXor< T_numtype1, T_numtype2 >
struct  BitwiseAnd< T_numtype1, T_numtype2 >
struct  BitwiseOr< T_numtype1, T_numtype2 >
struct  ShiftRight< T_numtype1, T_numtype2 >
struct  ShiftLeft< T_numtype1, T_numtype2 >
struct  Greater< T_numtype1, T_numtype2 >
struct  Less< T_numtype1, T_numtype2 >
struct  GreaterOrEqual< T_numtype1, T_numtype2 >
struct  LessOrEqual< T_numtype1, T_numtype2 >
struct  Equal< T_numtype1, T_numtype2 >
struct  NotEqual< T_numtype1, T_numtype2 >
struct  LogicalAnd< T_numtype1, T_numtype2 >
struct  LogicalOr< T_numtype1, T_numtype2 >

Defines

#define BZ_DEFINE_UNARY_OP(name, op)
#define BZ_DEFINE_UNARY_OP_RET(name, op, ret)
#define BZ_DEFINE_BINARY_OP(name, op)
#define BZ_DEFINE_BINARY_OP_RET(name, op, ret)


Define Documentation

#define BZ_DEFINE_BINARY_OP ( name,
op   ) 

Value:

template<typename T_numtype1, typename T_numtype2>                \
struct name {                                                     \
    typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype;         \
                                                                  \
    static inline T_numtype                                       \
    apply(T_numtype1 a, T_numtype2 b)                             \
    { return a op b; }                                            \
                        \
    template<typename T1, typename T2>                            \
    static inline void prettyPrint(BZ_STD_SCOPE(string) &str,     \
        prettyPrintFormat& format, const T1& t1,                  \
        const T2& t2)                                             \
    {                                                             \
        str += "(";                                               \
        t1.prettyPrint(str, format);                              \
        str += #op;                                               \
        t2.prettyPrint(str, format);                              \
        str += ")";                                               \
    }                                                             \
};

#define BZ_DEFINE_BINARY_OP_RET ( name,
op,
ret   ) 

Value:

template<typename T_numtype1, typename T_numtype2>                \
struct name {                                                     \
    typedef ret T_numtype;                                        \
    static inline T_numtype                                       \
    apply(T_numtype1 a, T_numtype2 b)                             \
    { return a op b; }                                            \
                                                                  \
    template<typename T1, typename T2>                            \
    static inline void prettyPrint(BZ_STD_SCOPE(string) &str,     \
        prettyPrintFormat& format, const T1& t1,                  \
        const T2& t2)                                             \
    {                                                             \
        str += "(";                                               \
        t1.prettyPrint(str, format);                              \
        str += #op;                                               \
        t2.prettyPrint(str, format);                              \
        str += ")";                                               \
    }                                                             \
};

#define BZ_DEFINE_UNARY_OP ( name,
op   ) 

Value:

template<typename T_numtype1>                                  \
struct name {                                                  \
    typedef T_numtype1 T_numtype;                              \
                                                               \
    static inline T_numtype                                    \
    apply(T_numtype1 a)                                        \
    { return op a; }                                           \
                     \
    template<typename T1>                                      \
    static inline void prettyPrint(BZ_STD_SCOPE(string) &str,  \
        prettyPrintFormat& format, const T1& t1)               \
    {                                                          \
        str += #op;                                            \
        t1.prettyPrint(str, format);                           \
    }                                                          \
};

#define BZ_DEFINE_UNARY_OP_RET ( name,
op,
ret   ) 

Value:

template<typename T_numtype1>                                  \
struct name {                                                  \
    typedef ret T_numtype;                                     \
    static inline T_numtype                                    \
    apply(T_numtype1 a)                                        \
    { return op a; }                                           \
                                                               \
    template<typename T1>                                      \
    static inline void prettyPrint(BZ_STD_SCOPE(string) &str,  \
        prettyPrintFormat& format, const T1& t1)               \
    {                                                          \
        str += #op;                                            \
        t1.prettyPrint(str, format);                           \
    }                                                          \
};


Generated on Mon May 5 10:37:07 2008 for blitz by  doxygen 1.5.5