[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MSVC compiler support [patch 22]: mx-op-defs additional macros
From: |
John W. Eaton |
Subject: |
MSVC compiler support [patch 22]: mx-op-defs additional macros |
Date: |
Thu, 26 Oct 2006 22:41:30 -0400 |
On 17-Oct-2006, Michael Goffioul wrote:
| Additional macros to "help" MSVC compiler when trying to find the correct
| template (and avoid compiler crash)
|
| Index: liboctave/mx-op-defs.h
| ===================================================================
| RCS file: /cvs/octave/liboctave/mx-op-defs.h,v
| retrieving revision 1.12
| diff -p -c -r1.12 mx-op-defs.h
| *** liboctave/mx-op-defs.h 26 Apr 2005 19:24:29 -0000 1.12
| --- liboctave/mx-op-defs.h 17 Oct 2006 11:07:42 -0000
| *************** class boolNDArray;
| *** 541,546 ****
| --- 541,594 ----
| NDS_CMP_OP (mx_el_eq, ==, ND, , S, ) \
| NDS_CMP_OP (mx_el_ne, !=, ND, , S, )
|
| + #define NDS_CMP_OP1(F, OP, ND, NDC, S, SC, SPEC) \
| + boolNDArray \
| + F (const ND& m, const S& s) \
| + { \
| + boolNDArray r; \
| + \
| + int len = m.length (); \
| + \
| + r.resize (m.dims ()); \
| + \
| + for (int i = 0; i < len; i++) \
| + r.elem(i) = operator OP <SPEC> (NDC (m.elem(i)), SC (s)); \
| + \
| + return r; \
| + }
| +
| + #define NDS_CMP_OPS1(ND, NDC, S, SC, SPEC) \
| + NDS_CMP_OP1 (mx_el_lt, <, ND, NDC, S, SC, SPEC) \
| + NDS_CMP_OP1 (mx_el_le, <=, ND, NDC, S, SC, SPEC) \
| + NDS_CMP_OP1 (mx_el_ge, >=, ND, NDC, S, SC, SPEC) \
| + NDS_CMP_OP1 (mx_el_gt, >, ND, NDC, S, SC, SPEC) \
| + NDS_CMP_OP1 (mx_el_eq, ==, ND, , S, , SPEC) \
| + NDS_CMP_OP1 (mx_el_ne, !=, ND, , S, , SPEC)
| +
| + #define NDS_CMP_OP2(F, OP, ND, NDC, S, SC, SPEC1, SPEC2) \
| + boolNDArray \
| + F (const ND& m, const S& s) \
| + { \
| + boolNDArray r; \
| + \
| + int len = m.length (); \
| + \
| + r.resize (m.dims ()); \
| + \
| + for (int i = 0; i < len; i++) \
| + r.elem(i) = operator OP <SPEC1,SPEC2> (NDC (m.elem(i)), SC (s)); \
| + \
| + return r; \
| + }
| +
| + #define NDS_CMP_OPS2(ND, NDC, S, SC, SPEC1, SPEC2) \
| + NDS_CMP_OP2 (mx_el_lt, <, ND, NDC, S, SC, SPEC1, SPEC2) \
| + NDS_CMP_OP2 (mx_el_le, <=, ND, NDC, S, SC, SPEC1, SPEC2) \
| + NDS_CMP_OP2 (mx_el_ge, >=, ND, NDC, S, SC, SPEC1, SPEC2) \
| + NDS_CMP_OP2 (mx_el_gt, >, ND, NDC, S, SC, SPEC1, SPEC2) \
| + NDS_CMP_OP2 (mx_el_eq, ==, ND, , S, , SPEC1, SPEC2) \
| + NDS_CMP_OP2 (mx_el_ne, !=, ND, , S, , SPEC1, SPEC2)
| +
| #define NDS_BOOL_OP_DECLS(ND, S) \
| NDBOOL_OP_DECL (mx_el_and, ND, S); \
| NDBOOL_OP_DECL (mx_el_or, ND, S);
Maybe I've missed something, but I don't see any places in your
patches where these new macros are used.
jwe
- MSVC compiler support [patch 18]: recursion stack overflow, (continued)
- MSVC compiler support [patch 19]: strncasecmp needed in liboctave, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 19]: strncasecmp needed in liboctave, John W. Eaton, 2006/10/26
- MSVC compiler support [patch 20]: opendir, readdir, ..., Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 20]: opendir, readdir, ..., John W. Eaton, 2006/10/25
- MSVC compiler support [patch 21]: glob_match ctor, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 21]: glob_match ctor, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 22]: mx-op-defs additional macros, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 22]: mx-op-defs additional macros,
John W. Eaton <=
- MSVC compiler support [patch 32]: waitpid, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 32]: waitpid, John W. Eaton, 2006/10/17
- MSVC compiler support [patch 25]: INFINITE, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 25]: INFINITE, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 24]: strftime crash, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 24]: strftime crash, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 24]: strftime crash, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 26]: MinGW code share, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 26]: MinGW code share, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 27]: OCTAVE_HOME, Michael Goffioul, 2006/10/17