Changeset 1037 for XIOS/dev/branch_yushan/src/parse_expr/operator_expr.hpp
- Timestamp:
- 01/25/17 16:25:17 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/src/parse_expr/operator_expr.hpp
r1019 r1037 43 43 opScalarScalar[string("le")] = le_ss; 44 44 opScalarScalar[string("ge")] = ge_ss; 45 opScalarScalar[string("ne")] = ne_ss;46 45 47 46 opField[string("neg")] = neg_f; … … 64 63 opFieldField[string("le")] = le_ff; 65 64 opFieldField[string("ge")] = ge_ff; 66 opFieldField[string("ne")] = ne_ff;67 65 68 66 opFieldScalar[string("add")] = add_fs; … … 76 74 opFieldScalar[string("le")] = le_fs; 77 75 opFieldScalar[string("ge")] = ge_fs; 78 opFieldScalar[string("ne")] = ne_fs;79 76 80 77 opScalarField[string("add")] = add_sf; … … 87 84 opScalarField[string("le")] = le_sf; 88 85 opScalarField[string("ge")] = ge_sf; 89 opScalarField[string("ne")] = ne_sf;90 86 } 91 87 … … 164 160 static inline double le_ss(double x, double y) { return x <= y; } 165 161 static inline double ge_ss(double x, double y) { return x >= y; } 166 static inline double ne_ss(double x, double y) { return x != y; }167 162 168 163 static inline CArray<double,1> neg_f(const CArray<double,1>& x) { return Array<double,1>(-x); } … … 185 180 static inline CArray<double,1> le_ff(const CArray<double,1>& x, const CArray<double,1>& y) { return Array<double,1>(x <= y); } 186 181 static inline CArray<double,1> ge_ff(const CArray<double,1>& x, const CArray<double,1>& y) { return Array<double,1>(x >= y); } 187 static inline CArray<double,1> ne_ff(const CArray<double,1>& x, const CArray<double,1>& y) { return Array<double,1>(x != y); }188 182 189 183 static inline CArray<double,1> add_fs(const CArray<double,1>& x, double y) { return Array<double,1>(x + y); } … … 197 191 static inline CArray<double,1> le_fs(const CArray<double,1>& x, double y) { return Array<double,1>(x <= y); } 198 192 static inline CArray<double,1> ge_fs(const CArray<double,1>& x, double y) { return Array<double,1>(x >= y); } 199 static inline CArray<double,1> ne_fs(const CArray<double,1>& x, double y) { return Array<double,1>(x != y); }200 193 201 194 static inline CArray<double,1> add_sf(double x, const CArray<double,1>& y) { return Array<double,1>(x + y); } … … 208 201 static inline CArray<double,1> le_sf(double x, const CArray<double,1>& y) { return Array<double,1>(x <= y); } 209 202 static inline CArray<double,1> ge_sf(double x, const CArray<double,1>& y) { return Array<double,1>(x >= y); } 210 static inline CArray<double,1> ne_sf(double x, const CArray<double,1>& y) { return Array<double,1>(x != y); }211 203 }; 212 204
Note: See TracChangeset
for help on using the changeset viewer.