36#include <blitz/promote.h>
75#define BZ_DEFINE_UNARY_OP(name,op) \
76template<typename T_numtype1> \
78 typedef T_numtype1 T_numtype; \
80 static inline T_numtype \
84 template<typename T1> \
85 static inline void prettyPrint(std::string &str, \
86 prettyPrintFormat& format, const T1& t1) \
89 t1.prettyPrint(str, format); \
100#define BZ_DEFINE_UNARY_OP_RET(name,op,ret) \
101template<typename T_numtype1> \
103 typedef ret T_numtype; \
104 static inline T_numtype \
105 apply(T_numtype1 a) \
108 template<typename T1> \
109 static inline void prettyPrint(std::string &str, \
110 prettyPrintFormat& format, const T1& t1) \
113 t1.prettyPrint(str, format); \
122#define BZ_DEFINE_BINARY_OP(name,op) \
123template<typename T_numtype1, typename T_numtype2> \
125 typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype; \
127 static inline T_numtype \
128 apply(T_numtype1 a, T_numtype2 b) \
131 template<typename T1, typename T2> \
132 static inline void prettyPrint(std::string &str, \
133 prettyPrintFormat& format, const T1& t1, \
137 t1.prettyPrint(str, format); \
139 t2.prettyPrint(str, format); \
158#define BZ_DEFINE_BINARY_OP_RET(name,op,ret) \
159template<typename T_numtype1, typename T_numtype2> \
161 typedef ret T_numtype; \
162 static inline T_numtype \
163 apply(T_numtype1 a, T_numtype2 b) \
166 template<typename T1, typename T2> \
167 static inline void prettyPrint(std::string &str, \
168 prettyPrintFormat& format, const T1& t1, \
172 t1.prettyPrint(str, format); \
174 t2.prettyPrint(str, format); \
Definition: array-impl.h:66
#define BZ_DEFINE_UNARY_OP(name, op)
Definition: ops.h:75
#define BZ_DEFINE_UNARY_OP_RET(name, op, ret)
Definition: ops.h:100
#define BZ_DEFINE_BINARY_OP(name, op)
Definition: ops.h:122
#define BZ_DEFINE_BINARY_OP_RET(name, op, ret)
Definition: ops.h:158