Go to the documentation of this file.
31 #include <blitz/promote.h>
70 #define BZ_DEFINE_UNARY_OP(name,op) \
71 template<typename T_numtype1> \
73 typedef T_numtype1 T_numtype; \
75 static inline T_numtype \
79 template<typename T1> \
80 static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
81 prettyPrintFormat& format, const T1& t1) \
84 t1.prettyPrint(str, format); \
95 #define BZ_DEFINE_UNARY_OP_RET(name,op,ret) \
96 template<typename T_numtype1> \
98 typedef ret T_numtype; \
99 static inline T_numtype \
100 apply(T_numtype1 a) \
103 template<typename T1> \
104 static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
105 prettyPrintFormat& format, const T1& t1) \
108 t1.prettyPrint(str, format); \
117 #define BZ_DEFINE_BINARY_OP(name,op) \
118 template<typename T_numtype1, typename T_numtype2> \
120 typedef BZ_PROMOTE(T_numtype1, T_numtype2) T_numtype; \
122 static inline T_numtype \
123 apply(T_numtype1 a, T_numtype2 b) \
126 template<typename T1, typename T2> \
127 static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
128 prettyPrintFormat& format, const T1& t1, \
132 t1.prettyPrint(str, format); \
134 t2.prettyPrint(str, format); \
153 #define BZ_DEFINE_BINARY_OP_RET(name,op,ret) \
154 template<typename T_numtype1, typename T_numtype2> \
156 typedef ret T_numtype; \
157 static inline T_numtype \
158 apply(T_numtype1 a, T_numtype2 b) \
161 template<typename T1, typename T2> \
162 static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
163 prettyPrintFormat& format, const T1& t1, \
167 t1.prettyPrint(str, format); \
169 t2.prettyPrint(str, format); \