Mercurial > hg > octave-nkf
comparison liboctave/MArray-defs.h @ 4646:eff8f977508c
[project @ 2003-11-23 18:13:19 by jwe]
author | jwe |
---|---|
date | Sun, 23 Nov 2003 18:13:19 +0000 |
parents | 79df15d4470c |
children | 23b37da9fd5b |
comparison
equal
deleted
inserted
replaced
4645:bd2067547b40 | 4646:eff8f977508c |
---|---|
29 { \ | 29 { \ |
30 for (int i = 0; i < l; i++) \ | 30 for (int i = 0; i < l; i++) \ |
31 r[i] = -x[i]; \ | 31 r[i] = -x[i]; \ |
32 } | 32 } |
33 | 33 |
34 #define DO_VS_OP2(OP) \ | 34 #define DO_VS_OP2(T, a, OP, s) \ |
35 int l = a.length (); \ | 35 int l = a.length (); \ |
36 if (l > 0) \ | 36 if (l > 0) \ |
37 { \ | 37 { \ |
38 T *tmp = a.fortran_vec (); \ | 38 T *tmp = a.fortran_vec (); \ |
39 for (int i = 0; i < l; i++) \ | 39 for (int i = 0; i < l; i++) \ |
40 tmp[i] OP s; \ | 40 tmp[i] OP s; \ |
41 } | 41 } |
42 | 42 |
43 #define DO_VV_OP2(OP) \ | 43 #define DO_VV_OP2(T, a, OP, b) \ |
44 do \ | 44 do \ |
45 { \ | 45 { \ |
46 T *a_tmp = a.fortran_vec (); \ | 46 T *a_tmp = a.fortran_vec (); \ |
47 const T *b_tmp = b.data (); \ | 47 const T *b_tmp = b.data (); \ |
48 for (int i = 0; i < l; i++) \ | 48 for (int i = 0; i < l; i++) \ |