annotate src/OPERATORS/op-int.h @ 7914:e998e81224b5

Various compilation fixes for MSVC.
author John W. Eaton <jwe@octave.org>
date Thu, 10 Jul 2008 08:59:18 -0400
parents 82be108cc558
children cd90e2842080
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1 /*
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
2
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
3 Copyright (C) 1996, 1997, 2004, 2005, 2006, 2007 John W. Eaton
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
4
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
6
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5829
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5829
diff changeset
10 option) any later version.
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
11
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
15 for more details.
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
16
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5829
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5829
diff changeset
19 <http://www.gnu.org/licenses/>.
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
20
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
21 */
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
22
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
23 #include "quit.h"
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
24
5075
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
25 #define OCTAVE_CONCAT_FN2(T1, T2) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
26 DEFNDCATOP_FN2 (T1 ## _ ## T2 ## _s_s, T1 ## _scalar, T2 ## _scalar, , T1 ## NDArray, T1 ## _array, T2 ## _array, concat) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
27 DEFNDCATOP_FN2 (T1 ## _ ## T2 ## _s_m, T1 ## _scalar, T2 ## _matrix, , T1 ## NDArray, T1 ## _array, T2 ## _array, concat) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
28 DEFNDCATOP_FN2 (T1 ## _ ## T2 ## _m_s, T1 ## _matrix, T2 ## _scalar, , T1 ## NDArray, T1 ## _array, T2 ## _array, concat) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
29 DEFNDCATOP_FN2 (T1 ## _ ## T2 ## _m_m, T1 ## _matrix, T2 ## _matrix, , T1 ## NDArray, T1 ## _array, T2 ## _array, concat)
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
30
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
31 #define OCTAVE_INSTALL_CONCAT_FN2(T1, T2) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
32 INSTALL_CATOP (octave_ ## T1 ## _scalar, octave_ ## T2 ## _scalar, T1 ## _ ## T2 ## _s_s) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
33 INSTALL_CATOP (octave_ ## T1 ## _scalar, octave_ ## T2 ## _matrix, T1 ## _ ## T2 ## _s_m) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
34 INSTALL_CATOP (octave_ ## T1 ## _matrix, octave_ ## T2 ## _scalar, T1 ## _ ## T2 ## _m_s) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
35 INSTALL_CATOP (octave_ ## T1 ## _matrix, octave_ ## T2 ## _matrix, T1 ## _ ## T2 ## _m_m)
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
36
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
37 #define OCTAVE_DOUBLE_INT_CONCAT_FN(TYPE) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
38 DEFNDCATOP_FN2 (double ## _ ## TYPE ## _s_s, scalar, TYPE ## _scalar, TYPE ## NDArray, , array, TYPE ## _array, concat) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
39 DEFNDCATOP_FN2 (double ## _ ## TYPE ## _s_m, scalar, TYPE ## _matrix, TYPE ## NDArray, , array, TYPE ## _array, concat) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
40 DEFNDCATOP_FN2 (double ## _ ## TYPE ## _m_s, matrix, TYPE ## _scalar, TYPE ## NDArray, , array, TYPE ## _array, concat) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
41 DEFNDCATOP_FN2 (double ## _ ## TYPE ## _m_m, matrix, TYPE ## _matrix, TYPE ## NDArray, , array, TYPE ## _array, concat)
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
42
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
43 #define OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN(TYPE) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
44 INSTALL_CATOP (octave_scalar, octave_ ## TYPE ## _scalar, double ## _ ## TYPE ## _s_s) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
45 INSTALL_CATOP (octave_scalar, octave_ ## TYPE ## _matrix, double ## _ ## TYPE ## _s_m) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
46 INSTALL_CATOP (octave_matrix, octave_ ## TYPE ## _scalar, double ## _ ## TYPE ## _m_s) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
47 INSTALL_CATOP (octave_matrix, octave_ ## TYPE ## _matrix, double ## _ ## TYPE ## _m_m)
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
48
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
49 #define OCTAVE_INT_DOUBLE_CONCAT_FN(TYPE) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
50 DEFNDCATOP_FN2 (TYPE ## _ ## double ## _s_s, TYPE ## _scalar, scalar, , TYPE ## NDArray, TYPE ## _array, array, concat) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
51 DEFNDCATOP_FN2 (TYPE ## _ ## double ## _s_m, TYPE ## _scalar, matrix, , TYPE ## NDArray, TYPE ## _array, array, concat) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
52 DEFNDCATOP_FN2 (TYPE ## _ ## double ## _m_s, TYPE ## _matrix, scalar, , TYPE ## NDArray, TYPE ## _array, array, concat) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
53 DEFNDCATOP_FN2 (TYPE ## _ ## double ## _m_m, TYPE ## _matrix, matrix, , TYPE ## NDArray, TYPE ## _array, array, concat)
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
54
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
55 #define OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN(TYPE) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
56 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_scalar, TYPE ## _ ## double ## _s_s) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
57 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_matrix, TYPE ## _ ## double ## _s_m) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
58 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_scalar, TYPE ## _ ## double ## _m_s) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
59 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_matrix, TYPE ## _ ## double ## _m_m)
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
60
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
61 #define OCTAVE_FLOAT_INT_CONCAT_FN(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
62 DEFNDCATOP_FN2 (float ## _ ## TYPE ## _s_s, float_scalar, TYPE ## _scalar, TYPE ## NDArray, , float_array, TYPE ## _array, concat) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
63 DEFNDCATOP_FN2 (float ## _ ## TYPE ## _s_m, float_scalar, TYPE ## _matrix, TYPE ## NDArray, , float_array, TYPE ## _array, concat) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
64 DEFNDCATOP_FN2 (float ## _ ## TYPE ## _m_s, float_matrix, TYPE ## _scalar, TYPE ## NDArray, , float_array, TYPE ## _array, concat) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
65 DEFNDCATOP_FN2 (float ## _ ## TYPE ## _m_m, float_matrix, TYPE ## _matrix, TYPE ## NDArray, , float_array, TYPE ## _array, concat)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
66
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
67 #define OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
68 INSTALL_CATOP (octave_float_scalar, octave_ ## TYPE ## _scalar, float ## _ ## TYPE ## _s_s) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
69 INSTALL_CATOP (octave_float_scalar, octave_ ## TYPE ## _matrix, float ## _ ## TYPE ## _s_m) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
70 INSTALL_CATOP (octave_float_matrix, octave_ ## TYPE ## _scalar, float ## _ ## TYPE ## _m_s) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
71 INSTALL_CATOP (octave_float_matrix, octave_ ## TYPE ## _matrix, float ## _ ## TYPE ## _m_m)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
72
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
73 #define OCTAVE_INT_FLOAT_CONCAT_FN(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
74 DEFNDCATOP_FN2 (TYPE ## _ ## float ## _s_s, TYPE ## _scalar, float_scalar, , TYPE ## NDArray, TYPE ## _array, float_array, concat) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
75 DEFNDCATOP_FN2 (TYPE ## _ ## float ## _s_m, TYPE ## _scalar, float_matrix, , TYPE ## NDArray, TYPE ## _array, float_array, concat) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
76 DEFNDCATOP_FN2 (TYPE ## _ ## float ## _m_s, TYPE ## _matrix, float_scalar, , TYPE ## NDArray, TYPE ## _array, float_array, concat) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
77 DEFNDCATOP_FN2 (TYPE ## _ ## float ## _m_m, TYPE ## _matrix, float_matrix, , TYPE ## NDArray, TYPE ## _array, float_array, concat)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
78
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
79 #define OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
80 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_float_scalar, TYPE ## _ ## float ## _s_s) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
81 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_float_matrix, TYPE ## _ ## float ## _s_m) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
82 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_float_scalar, TYPE ## _ ## float ## _m_s) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
83 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_float_matrix, TYPE ## _ ## float ## _m_m)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
84
5533
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
85 // For compatibility, concatenation with a character always returns a
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
86 // character.
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
87
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
88 #define OCTAVE_CHAR_INT_CONCAT_FN(TYPE) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
89 DEFNDCHARCATOP_FN (char ## _ ## TYPE ## _m_s, char_matrix, TYPE ## _scalar, concat) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
90 DEFNDCHARCATOP_FN (char ## _ ## TYPE ## _m_m, char_matrix, TYPE ## _matrix, concat)
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
91
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
92 #define OCTAVE_INSTALL_CHAR_INT_CONCAT_FN(TYPE) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
93 INSTALL_CATOP (octave_char_matrix_str, octave_ ## TYPE ## _scalar, char ## _ ## TYPE ## _m_s) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
94 INSTALL_CATOP (octave_char_matrix_str, octave_ ## TYPE ## _matrix, char ## _ ## TYPE ## _m_m) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
95 INSTALL_CATOP (octave_char_matrix_sq_str, octave_ ## TYPE ## _scalar, char ## _ ## TYPE ## _m_s) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
96 INSTALL_CATOP (octave_char_matrix_sq_str, octave_ ## TYPE ## _matrix, char ## _ ## TYPE ## _m_m)
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
97
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
98 #define OCTAVE_INT_CHAR_CONCAT_FN(TYPE) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
99 DEFNDCHARCATOP_FN (TYPE ## _ ## char ## _s_m, TYPE ## _scalar, char_matrix, concat) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
100 DEFNDCHARCATOP_FN (TYPE ## _ ## char ## _m_m, TYPE ## _matrix, char_matrix, concat)
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
101
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
102 #define OCTAVE_INSTALL_INT_CHAR_CONCAT_FN(TYPE) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
103 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_char_matrix_str, TYPE ## _ ## char ## _s_m) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
104 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_char_matrix_str, TYPE ## _ ## char ## _m_m) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
105 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_char_matrix_sq_str, TYPE ## _ ## char ## _s_m) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
106 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_char_matrix_sq_str, TYPE ## _ ## char ## _m_m)
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
107
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
108 #define OCTAVE_CONCAT_FN(TYPE) \
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
109 DEFNDCATOP_FN (TYPE ## _s_s, TYPE ## _scalar, TYPE ## _scalar, TYPE ## _array, TYPE ## _array, concat) \
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
110 DEFNDCATOP_FN (TYPE ## _s_m, TYPE ## _scalar, TYPE ## _matrix, TYPE ## _array, TYPE ## _array, concat) \
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
111 DEFNDCATOP_FN (TYPE ## _m_s, TYPE ## _matrix, TYPE ## _scalar, TYPE ## _array, TYPE ## _array, concat) \
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
112 DEFNDCATOP_FN (TYPE ## _m_m, TYPE ## _matrix, TYPE ## _matrix, TYPE ## _array, TYPE ## _array, concat)
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
113
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
114 #define OCTAVE_INSTALL_CONCAT_FN(TYPE) \
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
115 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_ ## TYPE ## _scalar, TYPE ## _s_s) \
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
116 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_ ## TYPE ## _matrix, TYPE ## _s_m) \
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
117 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_ ## TYPE ## _scalar, TYPE ## _m_s) \
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
118 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_ ## TYPE ## _matrix, TYPE ## _m_m)
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
119
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
120 #define OCTAVE_S_INT_UNOPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
121 /* scalar unary ops. */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
122 \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
123 DEFUNOP_OP (s_not, TYPE ## _scalar, !) \
4965
c0d8e8afa82f [project @ 2004-09-06 20:19:57 by jwe]
jwe
parents: 4964
diff changeset
124 DEFUNOP_OP (s_uplus, TYPE ## _scalar, /* no-op */) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
125 DEFUNOP_OP (s_uminus, TYPE ## _scalar, -) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
126 DEFUNOP_OP (s_transpose, TYPE ## _scalar, /* no-op */) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
127 DEFUNOP_OP (s_hermitian, TYPE ## _scalar, /* no-op */) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
128 \
5829
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
129 DEFNCUNOP_METHOD (s_incr, TYPE ## _scalar, increment) \
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
130 DEFNCUNOP_METHOD (s_decr, TYPE ## _scalar, decrement)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
131
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
132 #define OCTAVE_SS_INT_ARITH_OPS(PFX, T1, T2) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
133 /* scalar by scalar ops. */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
134 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
135 DEFBINOP_OP (PFX ## _add, T1 ## scalar, T2 ## scalar, +) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
136 DEFBINOP_OP (PFX ## _sub, T1 ## scalar, T2 ## scalar, -) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
137 DEFBINOP_OP (PFX ## _mul, T1 ## scalar, T2 ## scalar, *) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
138 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
139 DEFBINOP (PFX ## _div, T1 ## scalar, T2 ## scalar) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
140 { \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
141 CAST_BINOP_ARGS (const octave_ ## T1 ## scalar&, const octave_ ## T2 ## scalar&); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
142 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
143 if (! v2.T2 ## scalar_value ()) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
144 gripe_divide_by_zero (); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
145 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
146 return octave_value (v1.T1 ## scalar_value () / v2.T2 ## scalar_value ()); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
147 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
148 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
149 DEFBINOP_FN (PFX ## _pow, T1 ## scalar, T2 ## scalar, xpow) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
150 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
151 DEFBINOP (PFX ## _ldiv, T1 ## scalar, T2 ## scalar) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
152 { \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
153 CAST_BINOP_ARGS (const octave_ ## T1 ## scalar&, const octave_ ## T2 ## scalar&); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
154 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
155 if (! v1.T1 ## scalar_value ()) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
156 gripe_divide_by_zero (); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
157 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
158 return octave_value (v2.T2 ## scalar_value () / v1.T1 ## scalar_value ()); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
159 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
160 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
161 DEFBINOP_OP (PFX ## _el_mul, T1 ## scalar, T2 ## scalar, *) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
162 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
163 DEFBINOP (PFX ## _el_div, T1 ## scalar, T2 ## scalar) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
164 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
165 CAST_BINOP_ARGS (const octave_ ## T1 ## scalar&, const octave_ ## T2 ## scalar&); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
166 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
167 if (! v2.T2 ## scalar_value ()) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
168 gripe_divide_by_zero (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
169 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
170 return octave_value (v1.T1 ## scalar_value () / v2.T2 ## scalar_value ()); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
171 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
172 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
173 DEFBINOP_FN (PFX ## _el_pow, T1 ## scalar, T2 ## scalar, xpow) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
174 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
175 DEFBINOP (PFX ## _el_ldiv, T1 ## scalar, T2 ## scalar) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
176 { \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
177 CAST_BINOP_ARGS (const octave_ ## T1 ## scalar&, const octave_ ## T2 ## scalar&); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
178 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
179 if (! v1.T1 ## scalar_value ()) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
180 gripe_divide_by_zero (); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
181 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
182 return octave_value (v2.T2 ## scalar_value () / v1.T1 ## scalar_value ()); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
183 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
184
5030
160365410ad4 [project @ 2004-09-24 03:22:23 by jwe]
jwe
parents: 4965
diff changeset
185 #define OCTAVE_SS_INT_BOOL_OPS(PFX, T1, T2, Z1, Z2) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
186 DEFBINOP (PFX ## _el_and, T2, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
187 { \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
188 CAST_BINOP_ARGS (const octave_ ## T1 ## scalar&, const octave_ ## T2 ## scalar&); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
189 \
5030
160365410ad4 [project @ 2004-09-24 03:22:23 by jwe]
jwe
parents: 4965
diff changeset
190 return v1.T1 ## scalar_value () != Z1 && v2.T2 ## scalar_value () != Z2; \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
191 } \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
192 \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
193 DEFBINOP (PFX ## _el_or, T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
194 { \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
195 CAST_BINOP_ARGS (const octave_ ## T1 ## scalar&, const octave_ ## T2 ## scalar&); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
196 \
5030
160365410ad4 [project @ 2004-09-24 03:22:23 by jwe]
jwe
parents: 4965
diff changeset
197 return v1.T1 ## scalar_value () != Z1 || v2.T2 ## scalar_value () != Z2; \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
198 }
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
199
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
200 #define OCTAVE_SS_INT_CMP_OPS(PFX, T1, T2) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
201 DEFBINOP_OP (PFX ## _lt, T1 ## scalar, T2 ## scalar, <) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
202 DEFBINOP_OP (PFX ## _le, T1 ## scalar, T2 ## scalar, <=) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
203 DEFBINOP_OP (PFX ## _eq, T1 ## scalar, T2 ## scalar, ==) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
204 DEFBINOP_OP (PFX ## _ge, T1 ## scalar, T2 ## scalar, >=) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
205 DEFBINOP_OP (PFX ## _gt, T1 ## scalar, T2 ## scalar, >) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
206 DEFBINOP_OP (PFX ## _ne, T1 ## scalar, T2 ## scalar, !=)
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
207
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
208 #define OCTAVE_SS_POW_OPS(T1, T2) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
209 octave_value \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
210 xpow (const octave_ ## T1& a, const octave_ ## T2& b) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
211 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
212 return pow (a, b); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
213 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
214 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
215 octave_value \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
216 xpow (const octave_ ## T1& a, double b) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
217 { \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
218 return pow (a, b); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
219 } \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
220 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
221 octave_value \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
222 xpow (double a, const octave_ ## T1& b) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
223 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
224 return pow (a, b); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
225 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
226 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
227 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
228 xpow (const octave_ ## T1& a, float b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
229 { \
7914
e998e81224b5 Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
230 return powf (a, b); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
231 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
232 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
233 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
234 xpow (float a, const octave_ ## T1& b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
235 { \
7914
e998e81224b5 Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
236 return powf (a, b); \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
237 }
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
238
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
239 #define OCTAVE_SS_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
240 OCTAVE_S_INT_UNOPS (TYPE) \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
241 OCTAVE_SS_POW_OPS (TYPE, TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
242 OCTAVE_SS_INT_ARITH_OPS (ss, TYPE ## _, TYPE ## _) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
243 OCTAVE_SS_INT_ARITH_OPS (ssx, TYPE ## _, ) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
244 OCTAVE_SS_INT_ARITH_OPS (sxs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
245 OCTAVE_SS_INT_ARITH_OPS (ssfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
246 OCTAVE_SS_INT_ARITH_OPS (sfxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
247 OCTAVE_SS_INT_CMP_OPS (ss, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
248 OCTAVE_SS_INT_CMP_OPS (sx, TYPE ## _, ) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
249 OCTAVE_SS_INT_CMP_OPS (xs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
250 OCTAVE_SS_INT_CMP_OPS (sfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
251 OCTAVE_SS_INT_CMP_OPS (fxs, float_, TYPE ## _) \
5030
160365410ad4 [project @ 2004-09-24 03:22:23 by jwe]
jwe
parents: 4965
diff changeset
252 OCTAVE_SS_INT_BOOL_OPS (ss, TYPE ## _, TYPE ## _, octave_ ## TYPE (0), octave_ ## TYPE (0)) \
160365410ad4 [project @ 2004-09-24 03:22:23 by jwe]
jwe
parents: 4965
diff changeset
253 OCTAVE_SS_INT_BOOL_OPS (sx, TYPE ## _, , octave_ ## TYPE (0), 0) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
254 OCTAVE_SS_INT_BOOL_OPS (xs, , TYPE ## _, 0, octave_ ## TYPE (0)) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
255 OCTAVE_SS_INT_BOOL_OPS (sfx, TYPE ## _, float_, octave_ ## TYPE (0), 0) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
256 OCTAVE_SS_INT_BOOL_OPS (fxs, float_, TYPE ## _, 0, octave_ ## TYPE (0))
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
257
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
258 #define OCTAVE_SM_INT_ARITH_OPS(PFX, TS, TM) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
259 /* scalar by matrix ops. */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
260 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
261 DEFNDBINOP_OP (PFX ## _add, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, +) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
262 DEFNDBINOP_OP (PFX ## _sub, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, -) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
263 DEFNDBINOP_OP (PFX ## _mul, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, *) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
264 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
265 /* DEFBINOP (PFX ## _div, TS ## scalar, TM ## matrix) */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
266 /* { */ \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
267 /* CAST_BINOP_ARGS (const octave_ ## TS ## scalar&, const octave_ ## TM ## matrix&); */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
268 /* */ \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
269 /* Matrix m1 = v1.TM ## matrix_value (); */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
270 /* Matrix m2 = v2.TM ## matrix_value (); */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
271 /* */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
272 /* return octave_value (xdiv (m1, m2)); */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
273 /* } */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
274 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
275 /* DEFBINOP_FN (PFX ## _pow, TS ## scalar, TM ## matrix, xpow) */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
276 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
277 DEFBINOP (PFX ## _ldiv, TS ## scalar, TM ## matrix) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
278 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
279 CAST_BINOP_ARGS (const octave_ ## TS ## scalar&, const octave_ ## TM ## matrix&); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
280 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
281 if (! v1.TS ## scalar_value ()) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
282 gripe_divide_by_zero (); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
283 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
284 return octave_value (v2.TS ## scalar_value () / v1.TS ## scalar_value ()); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
285 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
286 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
287 DEFNDBINOP_OP (PFX ## _el_mul, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, *) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
288 DEFBINOP (PFX ## _el_div, TS ## scalar, TM ## matrix) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
289 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
290 CAST_BINOP_ARGS (const octave_ ## TS ## scalar&, const octave_ ## TM ## matrix&); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
291 \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
292 return octave_value (v1.TS ## scalar_value () / v2.TM ## array_value ()); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
293 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
294 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
295 DEFNDBINOP_FN (PFX ## _el_pow, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, elem_xpow) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
296 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
297 DEFBINOP (PFX ## _el_ldiv, TS ## scalar, TM ## matrix) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
298 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
299 CAST_BINOP_ARGS (const octave_ ## TS ## scalar&, const octave_ ## TM ## matrix&); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
300 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
301 if (! v1.TS ## scalar_value ()) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
302 gripe_divide_by_zero (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
303 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
304 return octave_value (v2.TM ## array_value () / v1.TS ## scalar_value ()); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
305 }
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
306
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
307 #define OCTAVE_SM_INT_CMP_OPS(PFX, TS, TM) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
308 DEFNDBINOP_FN (PFX ## _lt, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_lt) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
309 DEFNDBINOP_FN (PFX ## _le, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_le) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
310 DEFNDBINOP_FN (PFX ## _eq, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_eq) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
311 DEFNDBINOP_FN (PFX ## _ge, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_ge) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
312 DEFNDBINOP_FN (PFX ## _gt, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_gt) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
313 DEFNDBINOP_FN (PFX ## _ne, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_ne)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
314
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
315 #define OCTAVE_SM_INT_BOOL_OPS(PFX, TS, TM) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
316 DEFNDBINOP_FN (PFX ## _el_and, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_and) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
317 DEFNDBINOP_FN (PFX ## _el_or, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_or)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
318
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
319 #define OCTAVE_SM_POW_OPS(T1, T2) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
320 octave_value \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
321 elem_xpow (const octave_ ## T1& a, const T2 ## NDArray& b) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
322 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
323 T2 ## NDArray result (b.dims ()); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
324 for (int i = 0; i < b.length (); i++) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
325 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
326 OCTAVE_QUIT; \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
327 result (i) = pow (a, b(i)); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
328 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
329 return octave_value (result); \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
330 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
331 \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
332 octave_value \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
333 elem_xpow (const octave_ ## T1& a, const NDArray& b) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
334 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
335 T1 ## NDArray result (b.dims ()); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
336 for (int i = 0; i < b.length (); i++) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
337 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
338 OCTAVE_QUIT; \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
339 result (i) = pow (a, b(i)); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
340 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
341 return octave_value (result); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
342 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
343 \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
344 octave_value \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
345 elem_xpow (double a, const T2 ## NDArray& b) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
346 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
347 T2 ## NDArray result (b.dims ()); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
348 for (int i = 0; i < b.length (); i++) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
349 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
350 OCTAVE_QUIT; \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
351 result (i) = pow (a, b(i)); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
352 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
353 return octave_value (result); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
354 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
355 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
356 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
357 elem_xpow (const octave_ ## T1& a, const FloatNDArray& b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
358 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
359 T1 ## NDArray result (b.dims ()); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
360 for (int i = 0; i < b.length (); i++) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
361 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
362 OCTAVE_QUIT; \
7914
e998e81224b5 Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
363 result (i) = powf (a, b(i)); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
364 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
365 return octave_value (result); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
366 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
367 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
368 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
369 elem_xpow (float a, const T2 ## NDArray& b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
370 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
371 T2 ## NDArray result (b.dims ()); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
372 for (int i = 0; i < b.length (); i++) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
373 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
374 OCTAVE_QUIT; \
7914
e998e81224b5 Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
375 result (i) = powf (a, b(i)); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
376 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
377 return octave_value (result); \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
378 }
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
379
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
380
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
381 #define OCTAVE_SM_CONV(TS, TM) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
382 DEFCONV (TS ## s_ ## TM ## m_conv, TM ## scalar, TM ## matrix) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
383 { \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
384 CAST_CONV_ARG (const octave_ ## TS ## scalar&); \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
385 \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
386 return new octave_ ## TM ## matrix (v.TM ## array_value ()); \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
387 }
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
388
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
389 #define OCTAVE_SM_INT_OPS(TYPE) \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
390 OCTAVE_SM_POW_OPS (TYPE, TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
391 OCTAVE_SM_INT_ARITH_OPS (sm, TYPE ## _, TYPE ## _) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
392 OCTAVE_SM_INT_ARITH_OPS (smx, TYPE ## _, ) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
393 OCTAVE_SM_INT_ARITH_OPS (sxm, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
394 OCTAVE_SM_INT_ARITH_OPS (smfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
395 OCTAVE_SM_INT_ARITH_OPS (sfxm, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
396 OCTAVE_SM_INT_CMP_OPS (sm, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
397 OCTAVE_SM_INT_CMP_OPS (xm, , TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
398 OCTAVE_SM_INT_CMP_OPS (smx, TYPE ## _, ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
399 OCTAVE_SM_INT_CMP_OPS (fxm, float_, TYPE ## _) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
400 OCTAVE_SM_INT_CMP_OPS (smfx, TYPE ## _, float_) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
401 OCTAVE_SM_INT_BOOL_OPS (sm, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
402 OCTAVE_SM_INT_BOOL_OPS (xm, , TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
403 OCTAVE_SM_INT_BOOL_OPS (smx, TYPE ## _, ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
404 OCTAVE_SM_INT_BOOL_OPS (fxm, float_, TYPE ## _) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
405 OCTAVE_SM_INT_BOOL_OPS (smfx, TYPE ## _, float_) \
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
406 OCTAVE_SM_CONV (TYPE ## _, TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
407 OCTAVE_SM_CONV (TYPE ## _, complex_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
408 OCTAVE_SM_CONV (TYPE ## _, float_complex_)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
409
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
410 #define OCTAVE_MS_INT_ARITH_OPS(PFX, TM, TS) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
411 /* matrix by scalar ops. */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
412 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
413 DEFNDBINOP_OP (PFX ## _add, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, +) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
414 DEFNDBINOP_OP (PFX ## _sub, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, -) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
415 DEFNDBINOP_OP (PFX ## _mul, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, *) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
416 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
417 DEFBINOP (PFX ## _div, TM ## matrix, TS ## scalar) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
418 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
419 CAST_BINOP_ARGS (const octave_ ## TM ## matrix&, const octave_ ## TS ## scalar&); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
420 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
421 if (! v2.TS ## scalar_value ()) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
422 gripe_divide_by_zero (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
423 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
424 return octave_value (v1.TM ## array_value () / v2.TS ## scalar_value ()); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
425 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
426 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
427 /* DEFBINOP_FN (PFX ## _pow, TM ## matrix, TS ## scalar, xpow) */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
428 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
429 /* DEFBINOP (PFX ## _ldiv, TM ## matrix, TS ## scalar) */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
430 /* { */ \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
431 /* CAST_BINOP_ARGS (const octave_ ## TM ## matrix&, const octave_ ## TS ## scalar&); */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
432 /* */ \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
433 /* Matrix m1 = v1.TM ## matrix_value (); */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
434 /* Matrix m2 = v2.TM ## matrix_value (); */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
435 /* */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
436 /* return octave_value (xleftdiv (m1, m2)); */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
437 /* } */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
438 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
439 DEFNDBINOP_OP (PFX ## _el_mul, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, *) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
440 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
441 DEFBINOP (PFX ## _el_div, TM ## matrix, TS ## scalar) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
442 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
443 CAST_BINOP_ARGS (const octave_ ## TM ## matrix&, const octave_ ## TS ## scalar&); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
444 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
445 if (! v2.TS ## scalar_value ()) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
446 gripe_divide_by_zero (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
447 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
448 return octave_value (v1.TM ## array_value () / v2.TS ## scalar_value ()); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
449 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
450 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
451 DEFNDBINOP_FN (PFX ## _el_pow, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, elem_xpow) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
452 \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
453 DEFBINOP (PFX ## _el_ldiv, TM ## matrix, TS ## scalar) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
454 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
455 CAST_BINOP_ARGS (const octave_ ## TM ## matrix&, const octave_ ## TS ## scalar&); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
456 \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
457 return v2.TS ## scalar_value () / v1.TM ## array_value (); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
458 }
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
459
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
460 #define OCTAVE_MS_INT_CMP_OPS(PFX, TM, TS) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
461 DEFNDBINOP_FN (PFX ## _lt, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_lt) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
462 DEFNDBINOP_FN (PFX ## _le, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_le) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
463 DEFNDBINOP_FN (PFX ## _eq, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_eq) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
464 DEFNDBINOP_FN (PFX ## _ge, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_ge) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
465 DEFNDBINOP_FN (PFX ## _gt, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_gt) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
466 DEFNDBINOP_FN (PFX ## _ne, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_ne)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
467
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
468 #define OCTAVE_MS_INT_BOOL_OPS(PFX, TM, TS) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
469 DEFNDBINOP_FN (PFX ## _el_and, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_and) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
470 DEFNDBINOP_FN (PFX ## _el_or, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_or)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
471
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
472 #define OCTAVE_MS_INT_ASSIGN_OPS(PFX, TM, TS, TE) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
473 DEFNDASSIGNOP_FN (PFX ## _assign, TM ## matrix, TS ## scalar, TE ## array, assign)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
474
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
475 #define OCTAVE_MS_POW_OPS(T1, T2) \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
476 octave_value elem_xpow (T1 ## NDArray a, octave_ ## T2 b) \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
477 { \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
478 T1 ## NDArray result (a.dims ()); \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
479 for (int i = 0; i < a.length (); i++) \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
480 { \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
481 OCTAVE_QUIT; \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
482 result (i) = pow (a(i), b); \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
483 } \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
484 return octave_value (result); \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
485 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
486 \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
487 octave_value elem_xpow (T1 ## NDArray a, double b) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
488 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
489 T1 ## NDArray result (a.dims ()); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
490 for (int i = 0; i < a.length (); i++) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
491 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
492 OCTAVE_QUIT; \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
493 result (i) = pow (a(i), b); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
494 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
495 return octave_value (result); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
496 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
497 \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
498 octave_value elem_xpow (NDArray a, octave_ ## T2 b) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
499 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
500 T2 ## NDArray result (a.dims ()); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
501 for (int i = 0; i < a.length (); i++) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
502 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
503 OCTAVE_QUIT; \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
504 result (i) = pow (a(i), b); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
505 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
506 return octave_value (result); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
507 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
508 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
509 octave_value elem_xpow (T1 ## NDArray a, float b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
510 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
511 T1 ## NDArray result (a.dims ()); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
512 for (int i = 0; i < a.length (); i++) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
513 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
514 OCTAVE_QUIT; \
7914
e998e81224b5 Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
515 result (i) = powf (a(i), b); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
516 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
517 return octave_value (result); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
518 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
519 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
520 octave_value elem_xpow (FloatNDArray a, octave_ ## T2 b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
521 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
522 T2 ## NDArray result (a.dims ()); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
523 for (int i = 0; i < a.length (); i++) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
524 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
525 OCTAVE_QUIT; \
7914
e998e81224b5 Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
526 result (i) = powf (a(i), b); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
527 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
528 return octave_value (result); \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
529 }
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
530
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
531
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
532 #define OCTAVE_MS_INT_OPS(TYPE) \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
533 OCTAVE_MS_POW_OPS (TYPE, TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
534 OCTAVE_MS_INT_ARITH_OPS (ms, TYPE ## _, TYPE ## _) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
535 OCTAVE_MS_INT_ARITH_OPS (msx, TYPE ## _, ) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
536 OCTAVE_MS_INT_ARITH_OPS (mxs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
537 OCTAVE_MS_INT_ARITH_OPS (msfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
538 OCTAVE_MS_INT_ARITH_OPS (mfxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
539 OCTAVE_MS_INT_CMP_OPS (ms, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
540 OCTAVE_MS_INT_CMP_OPS (mx, TYPE ## _, ) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
541 OCTAVE_MS_INT_CMP_OPS (mxs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
542 OCTAVE_MS_INT_CMP_OPS (mfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
543 OCTAVE_MS_INT_CMP_OPS (mfxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
544 OCTAVE_MS_INT_BOOL_OPS (ms, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
545 OCTAVE_MS_INT_BOOL_OPS (mx, TYPE ## _, ) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
546 OCTAVE_MS_INT_BOOL_OPS (mxs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
547 OCTAVE_MS_INT_BOOL_OPS (mfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
548 OCTAVE_MS_INT_BOOL_OPS (mfxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
549 OCTAVE_MS_INT_ASSIGN_OPS (ms, TYPE ## _, TYPE ## _, TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
550 OCTAVE_MS_INT_ASSIGN_OPS (mx, TYPE ## _, , ) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
551 OCTAVE_MS_INT_ASSIGN_OPS (mfx, TYPE ## _, float_, float_)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
552
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
553 #define OCTAVE_M_INT_UNOPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
554 /* matrix unary ops. */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
555 \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
556 DEFNDUNOP_OP (m_not, TYPE ## _matrix, TYPE ## _array, !) \
4965
c0d8e8afa82f [project @ 2004-09-06 20:19:57 by jwe]
jwe
parents: 4964
diff changeset
557 DEFNDUNOP_OP (m_uplus, TYPE ## _matrix, TYPE ## _array, /* no-op */) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
558 DEFNDUNOP_OP (m_uminus, TYPE ## _matrix, TYPE ## _array, -) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
559 \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
560 DEFUNOP (m_transpose, TYPE ## _matrix) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
561 { \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
562 CAST_UNOP_ARG (const octave_ ## TYPE ## _matrix&); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
563 \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
564 if (v.ndims () > 2) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
565 { \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
566 error ("transpose not defined for N-d objects"); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
567 return octave_value (); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
568 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
569 else \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
570 return octave_value (v.TYPE ## _array_value().transpose ()); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
571 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
572 \
5829
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
573 DEFNCUNOP_METHOD (m_incr, TYPE ## _matrix, increment) \
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
574 DEFNCUNOP_METHOD (m_decr, TYPE ## _matrix, decrement)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
575
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
576 #define OCTAVE_MM_INT_ARITH_OPS(PFX, T1, T2) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
577 /* matrix by matrix ops. */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
578 \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
579 DEFNDBINOP_OP (PFX ## _add, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, +) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
580 DEFNDBINOP_OP (PFX ## _sub, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, -) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
581 \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
582 /* DEFBINOP_OP (PFX ## _mul, T1 ## matrix, T2 ## matrix, *) */ \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
583 /* DEFBINOP_FN (PFX ## _div, T1 ## matrix, T2 ## matrix, xdiv) */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
584 \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
585 DEFBINOPX (PFX ## _pow, T1 ## matrix, T2 ## matrix) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
586 { \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
587 error ("can't do A ^ B for A and B both matrices"); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
588 return octave_value (); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
589 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
590 \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
591 /* DEFBINOP_FN (PFX ## _ldiv, T1 ## matrix, T2 ## matrix, xleftdiv) */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
592 \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
593 DEFNDBINOP_FN (PFX ## _el_mul, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, product) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
594 \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
595 DEFNDBINOP_FN (PFX ## _el_div, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, quotient) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
596 \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
597 DEFNDBINOP_FN (PFX ## _el_pow, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, elem_xpow) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
598 \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
599 DEFBINOP (PFX ## _el_ldiv, T1 ## matrix, T2 ## matrix) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
600 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
601 CAST_BINOP_ARGS (const octave_ ## T1 ## matrix&, const octave_ ## T2 ## matrix&); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
602 \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
603 return octave_value (quotient (v2.T2 ## array_value (), v1.T1 ## array_value ())); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
604 }
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
605
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
606 #define OCTAVE_MM_INT_CMP_OPS(PFX, T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
607 DEFNDBINOP_FN (PFX ## _lt, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_lt) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
608 DEFNDBINOP_FN (PFX ## _le, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_le) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
609 DEFNDBINOP_FN (PFX ## _eq, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_eq) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
610 DEFNDBINOP_FN (PFX ## _ge, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_ge) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
611 DEFNDBINOP_FN (PFX ## _gt, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_gt) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
612 DEFNDBINOP_FN (PFX ## _ne, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_ne)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
613
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
614 #define OCTAVE_MM_INT_BOOL_OPS(PFX, T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
615 DEFNDBINOP_FN (PFX ## _el_and, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_and) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
616 DEFNDBINOP_FN (PFX ## _el_or, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_or)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
617
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
618 #define OCTAVE_MM_INT_ASSIGN_OPS(PFX, TLHS, TRHS, TE) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
619 DEFNDASSIGNOP_FN (PFX ## _assign, TLHS ## matrix, TRHS ## matrix, TE ## array, assign)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
620
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
621 #define OCTAVE_MM_POW_OPS(T1, T2) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
622 octave_value \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
623 elem_xpow (const T1 ## NDArray& a, const T2 ## NDArray& b) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
624 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
625 dim_vector a_dims = a.dims (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
626 dim_vector b_dims = b.dims (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
627 if (a_dims != b_dims) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
628 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
629 gripe_nonconformant ("operator .^", a_dims, b_dims); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
630 return octave_value (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
631 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
632 T1 ## NDArray result (a_dims); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
633 for (int i = 0; i < a.length (); i++) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
634 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
635 OCTAVE_QUIT; \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
636 result (i) = pow (a(i), b(i)); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
637 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
638 return octave_value (result); \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
639 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
640 \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
641 octave_value \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
642 elem_xpow (const T1 ## NDArray& a, const NDArray& b) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
643 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
644 dim_vector a_dims = a.dims (); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
645 dim_vector b_dims = b.dims (); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
646 if (a_dims != b_dims) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
647 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
648 gripe_nonconformant ("operator .^", a_dims, b_dims); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
649 return octave_value (); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
650 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
651 T1 ## NDArray result (a_dims); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
652 for (int i = 0; i < a.length (); i++) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
653 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
654 OCTAVE_QUIT; \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
655 result (i) = pow (a(i), b(i)); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
656 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
657 return octave_value (result); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
658 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
659 \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
660 octave_value \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
661 elem_xpow (const NDArray& a, const T2 ## NDArray& b) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
662 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
663 dim_vector a_dims = a.dims (); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
664 dim_vector b_dims = b.dims (); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
665 if (a_dims != b_dims) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
666 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
667 gripe_nonconformant ("operator .^", a_dims, b_dims); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
668 return octave_value (); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
669 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
670 T2 ## NDArray result (a_dims); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
671 for (int i = 0; i < a.length (); i++) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
672 { \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
673 OCTAVE_QUIT; \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
674 result (i) = pow (a(i), b(i)); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
675 } \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
676 return octave_value (result); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
677 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
678 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
679 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
680 elem_xpow (const T1 ## NDArray& a, const FloatNDArray& b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
681 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
682 dim_vector a_dims = a.dims (); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
683 dim_vector b_dims = b.dims (); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
684 if (a_dims != b_dims) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
685 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
686 gripe_nonconformant ("operator .^", a_dims, b_dims); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
687 return octave_value (); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
688 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
689 T1 ## NDArray result (a_dims); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
690 for (int i = 0; i < a.length (); i++) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
691 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
692 OCTAVE_QUIT; \
7914
e998e81224b5 Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
693 result (i) = powf (a(i), b(i)); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
694 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
695 return octave_value (result); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
696 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
697 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
698 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
699 elem_xpow (const FloatNDArray& a, const T2 ## NDArray& b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
700 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
701 dim_vector a_dims = a.dims (); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
702 dim_vector b_dims = b.dims (); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
703 if (a_dims != b_dims) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
704 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
705 gripe_nonconformant ("operator .^", a_dims, b_dims); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
706 return octave_value (); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
707 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
708 T2 ## NDArray result (a_dims); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
709 for (int i = 0; i < a.length (); i++) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
710 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
711 OCTAVE_QUIT; \
7914
e998e81224b5 Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
712 result (i) = powf (a(i), b(i)); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
713 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
714 return octave_value (result); \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
715 }
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
716
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
717
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
718 #define OCTAVE_MM_CONV(T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
719 DEFCONV (T1 ## m_ ## T2 ## m_conv, T1 ## matrix, T2 ## matrix) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
720 { \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
721 CAST_CONV_ARG (const octave_ ## T1 ## matrix&); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
722 \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
723 return new octave_ ## T2 ## matrix (v.T2 ## array_value ()); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
724 }
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
725
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
726 #define OCTAVE_MM_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
727 OCTAVE_M_INT_UNOPS (TYPE) \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
728 OCTAVE_MM_POW_OPS (TYPE, TYPE) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
729 OCTAVE_MM_INT_ARITH_OPS (mm, TYPE ## _, TYPE ## _) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
730 OCTAVE_MM_INT_ARITH_OPS (mmx, TYPE ## _, ) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
731 OCTAVE_MM_INT_ARITH_OPS (mxm, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
732 OCTAVE_MM_INT_ARITH_OPS (mmfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
733 OCTAVE_MM_INT_ARITH_OPS (mfxm, float_, TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
734 OCTAVE_MM_INT_CMP_OPS (mm, TYPE ## _, TYPE ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
735 OCTAVE_MM_INT_CMP_OPS (mmx, TYPE ## _, ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
736 OCTAVE_MM_INT_CMP_OPS (mfxm, float_, TYPE ## _) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
737 OCTAVE_MM_INT_CMP_OPS (mmfx, TYPE ## _, float_) \
5038
fdfce0dec36b [project @ 2004-09-24 17:46:18 by jwe]
jwe
parents: 5030
diff changeset
738 OCTAVE_MM_INT_CMP_OPS (mxm, , TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
739 OCTAVE_MM_INT_BOOL_OPS (mm, TYPE ## _, TYPE ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
740 OCTAVE_MM_INT_BOOL_OPS (mmx, TYPE ## _, ) \
5038
fdfce0dec36b [project @ 2004-09-24 17:46:18 by jwe]
jwe
parents: 5030
diff changeset
741 OCTAVE_MM_INT_BOOL_OPS (mxm, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
742 OCTAVE_MM_INT_BOOL_OPS (mmfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
743 OCTAVE_MM_INT_BOOL_OPS (mfxm, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
744 OCTAVE_MM_INT_ASSIGN_OPS (mm, TYPE ## _, TYPE ## _, TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
745 OCTAVE_MM_INT_ASSIGN_OPS (mmx, TYPE ## _, , ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
746 OCTAVE_MM_INT_ASSIGN_OPS (mmfx, TYPE ## _, float_, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
747 OCTAVE_MM_CONV(TYPE ## _, complex_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
748 OCTAVE_MM_CONV(TYPE ## _, float_complex_)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
749
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
750 #define OCTAVE_RE_INT_ASSIGN_OPS(TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
751 DEFNDASSIGNOP_FN (TYPE ## ms_assign, matrix, TYPE ## _scalar, array, assign) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
752 DEFNDASSIGNOP_FN (TYPE ## mm_assign, matrix, TYPE ## _matrix, array, assign)
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
753
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
754 #define OCTAVE_FLT_RE_INT_ASSIGN_OPS(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
755 DEFNDASSIGNOP_FN (TYPE ## fms_assign, float_matrix, TYPE ## _scalar, float_array, assign) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
756 DEFNDASSIGNOP_FN (TYPE ## fmm_assign, float_matrix, TYPE ## _matrix, float_array, assign)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
757
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
758 #define OCTAVE_CX_INT_ASSIGN_OPS(TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
759 DEFNDASSIGNOP_FN (TYPE ## cms_assign, complex_matrix, TYPE ## _scalar, complex_array, assign) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
760 DEFNDASSIGNOP_FN (TYPE ## cmm_assign, complex_matrix, TYPE ## _matrix, complex_array, assign)
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
761
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
762 #define OCTAVE_FLT_CX_INT_ASSIGN_OPS(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
763 DEFNDASSIGNOP_FN (TYPE ## fcms_assign, float_complex_matrix, TYPE ## _scalar, float_complex_array, assign) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
764 DEFNDASSIGNOP_FN (TYPE ## fcmm_assign, float_complex_matrix, TYPE ## _matrix, float_complex_array, assign)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
765
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
766 #define OCTAVE_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
767 OCTAVE_SS_INT_OPS (TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
768 OCTAVE_SM_INT_OPS (TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
769 OCTAVE_MS_INT_OPS (TYPE) \
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
770 OCTAVE_MM_INT_OPS (TYPE) \
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
771 OCTAVE_CONCAT_FN (TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
772 OCTAVE_RE_INT_ASSIGN_OPS (TYPE) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
773 OCTAVE_FLT_RE_INT_ASSIGN_OPS (TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
774 OCTAVE_CX_INT_ASSIGN_OPS (TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
775 OCTAVE_FLT_CX_INT_ASSIGN_OPS (TYPE)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
776
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
777 #define OCTAVE_INSTALL_S_INT_UNOPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
778 INSTALL_UNOP (op_not, octave_ ## TYPE ## _scalar, s_not); \
4965
c0d8e8afa82f [project @ 2004-09-06 20:19:57 by jwe]
jwe
parents: 4964
diff changeset
779 INSTALL_UNOP (op_uplus, octave_ ## TYPE ## _scalar, s_uplus); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
780 INSTALL_UNOP (op_uminus, octave_ ## TYPE ## _scalar, s_uminus); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
781 INSTALL_UNOP (op_transpose, octave_ ## TYPE ## _scalar, s_transpose); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
782 INSTALL_UNOP (op_hermitian, octave_ ## TYPE ## _scalar, s_hermitian); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
783 \
5829
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
784 INSTALL_NCUNOP (op_incr, octave_ ## TYPE ## _scalar, s_incr); \
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
785 INSTALL_NCUNOP (op_decr, octave_ ## TYPE ## _scalar, s_decr);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
786
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
787 #define OCTAVE_INSTALL_SS_INT_ARITH_OPS(PFX, T1, T2) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
788 INSTALL_BINOP (op_add, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _add); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
789 INSTALL_BINOP (op_sub, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _sub); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
790 INSTALL_BINOP (op_mul, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _mul); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
791 INSTALL_BINOP (op_div, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _div); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
792 INSTALL_BINOP (op_pow, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _pow); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
793 INSTALL_BINOP (op_ldiv, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _ldiv); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
794 INSTALL_BINOP (op_el_mul, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _el_mul); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
795 INSTALL_BINOP (op_el_div, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _el_div); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
796 INSTALL_BINOP (op_el_pow, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _el_pow); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
797 INSTALL_BINOP (op_el_ldiv, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _el_ldiv);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
798
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
799 #define OCTAVE_INSTALL_SS_INT_CMP_OPS(PFX, T1, T2) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
800 INSTALL_BINOP (op_lt, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _lt); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
801 INSTALL_BINOP (op_le, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _le); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
802 INSTALL_BINOP (op_eq, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _eq); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
803 INSTALL_BINOP (op_ge, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _ge); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
804 INSTALL_BINOP (op_gt, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _gt); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
805 INSTALL_BINOP (op_ne, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _ne);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
806
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
807 #define OCTAVE_INSTALL_SS_INT_BOOL_OPS(PFX, T1, T2) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
808 INSTALL_BINOP (op_el_and, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _el_and); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
809 INSTALL_BINOP (op_el_or, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _el_or);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
810
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
811 #define OCTAVE_INSTALL_SS_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
812 OCTAVE_INSTALL_S_INT_UNOPS (TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
813 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ss, TYPE ## _, TYPE ## _) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
814 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ssx, TYPE ## _, ) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
815 OCTAVE_INSTALL_SS_INT_ARITH_OPS (sxs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
816 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ssfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
817 OCTAVE_INSTALL_SS_INT_ARITH_OPS (sfxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
818 OCTAVE_INSTALL_SS_INT_CMP_OPS (ss, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
819 OCTAVE_INSTALL_SS_INT_CMP_OPS (sx, TYPE ## _, ) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
820 OCTAVE_INSTALL_SS_INT_CMP_OPS (xs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
821 OCTAVE_INSTALL_SS_INT_CMP_OPS (sfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
822 OCTAVE_INSTALL_SS_INT_CMP_OPS (fxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
823 OCTAVE_INSTALL_SS_INT_BOOL_OPS (ss, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
824 OCTAVE_INSTALL_SS_INT_BOOL_OPS (sx, TYPE ## _, ) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
825 OCTAVE_INSTALL_SS_INT_BOOL_OPS (xs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
826 OCTAVE_INSTALL_SS_INT_BOOL_OPS (sfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
827 OCTAVE_INSTALL_SS_INT_BOOL_OPS (fxs, float_, TYPE ## _) \
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
828 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_ ## TYPE ## _scalar, octave_ ## TYPE ## _matrix) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
829 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_scalar, octave_ ## TYPE ## _matrix) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
830 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_float_scalar, octave_ ## TYPE ## _matrix) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
831 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_complex_scalar, octave_complex_matrix) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
832 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_float_complex_scalar, octave_float_complex_matrix)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
833
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
834 #define OCTAVE_INSTALL_SM_INT_ARITH_OPS(PFX, T1, T2) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
835 INSTALL_BINOP (op_add, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _add); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
836 INSTALL_BINOP (op_sub, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _sub); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
837 INSTALL_BINOP (op_mul, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _mul); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
838 /* INSTALL_BINOP (op_div, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _div); */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
839 /* INSTALL_BINOP (op_pow, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _pow); */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
840 INSTALL_BINOP (op_ldiv, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _ldiv); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
841 INSTALL_BINOP (op_el_mul, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_mul); \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
842 INSTALL_BINOP (op_el_div, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_div); \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
843 INSTALL_BINOP (op_el_pow, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_pow); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
844 INSTALL_BINOP (op_el_ldiv, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_ldiv);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
845
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
846 #define OCTAVE_INSTALL_SM_INT_CMP_OPS(PFX, T1, T2) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
847 INSTALL_BINOP (op_lt, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _lt); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
848 INSTALL_BINOP (op_le, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _le); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
849 INSTALL_BINOP (op_eq, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _eq); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
850 INSTALL_BINOP (op_ge, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _ge); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
851 INSTALL_BINOP (op_gt, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _gt); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
852 INSTALL_BINOP (op_ne, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _ne);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
853
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
854 #define OCTAVE_INSTALL_SM_INT_BOOL_OPS(PFX, T1, T2) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
855 INSTALL_BINOP (op_el_and, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_and); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
856 INSTALL_BINOP (op_el_or, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_or);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
857
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
858 #define OCTAVE_INSTALL_SM_INT_OPS(TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
859 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sm, TYPE ## _, TYPE ## _) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
860 OCTAVE_INSTALL_SM_INT_ARITH_OPS (smx, TYPE ## _, ) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
861 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sxm, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
862 OCTAVE_INSTALL_SM_INT_ARITH_OPS (smfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
863 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sfxm, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
864 OCTAVE_INSTALL_SM_INT_CMP_OPS (sm, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
865 OCTAVE_INSTALL_SM_INT_CMP_OPS (xm, , TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
866 OCTAVE_INSTALL_SM_INT_CMP_OPS (smx, TYPE ## _, ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
867 OCTAVE_INSTALL_SM_INT_CMP_OPS (fxm, float_, TYPE ## _) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
868 OCTAVE_INSTALL_SM_INT_CMP_OPS (smfx, TYPE ## _, float_) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
869 OCTAVE_INSTALL_SM_INT_BOOL_OPS (sm, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
870 OCTAVE_INSTALL_SM_INT_BOOL_OPS (xm, , TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
871 OCTAVE_INSTALL_SM_INT_BOOL_OPS (smx, TYPE ## _, ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
872 OCTAVE_INSTALL_SM_INT_BOOL_OPS (fxm, float_, TYPE ## _) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
873 OCTAVE_INSTALL_SM_INT_BOOL_OPS (smfx, TYPE ## _, float_) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
874 INSTALL_WIDENOP (octave_ ## TYPE ## _scalar, octave_ ## TYPE ## _matrix, TYPE ## _s_ ## TYPE ## _m_conv) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
875 INSTALL_WIDENOP (octave_ ## TYPE ## _scalar, octave_complex_matrix, TYPE ## _s_complex_m_conv) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
876 INSTALL_WIDENOP (octave_ ## TYPE ## _scalar, octave_float_complex_matrix, TYPE ## _s_float_complex_m_conv) \
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
877 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_ ## TYPE ## _matrix, octave_ ## TYPE ## _matrix) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
878 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_matrix, octave_ ## TYPE ## _matrix) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
879 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_float_matrix, octave_ ## TYPE ## _matrix) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
880 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_complex_matrix, octave_complex_matrix) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
881 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_float_complex_matrix, octave_float_complex_matrix)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
882
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
883 #define OCTAVE_INSTALL_MS_INT_ARITH_OPS(PFX, T1, T2) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
884 INSTALL_BINOP (op_add, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _add); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
885 INSTALL_BINOP (op_sub, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _sub); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
886 INSTALL_BINOP (op_mul, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _mul); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
887 INSTALL_BINOP (op_div, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _div); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
888 /* INSTALL_BINOP (op_pow, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _pow); */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
889 /* INSTALL_BINOP (op_ldiv, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _ldiv); */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
890 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
891 INSTALL_BINOP (op_el_mul, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _el_mul); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
892 INSTALL_BINOP (op_el_div, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _el_div); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
893 INSTALL_BINOP (op_el_pow, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _el_pow); \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
894 INSTALL_BINOP (op_el_ldiv, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _el_ldiv);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
895
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
896 #define OCTAVE_INSTALL_MS_INT_CMP_OPS(PFX, T1, T2) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
897 INSTALL_BINOP (op_lt, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _lt); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
898 INSTALL_BINOP (op_le, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _le); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
899 INSTALL_BINOP (op_eq, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _eq); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
900 INSTALL_BINOP (op_ge, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _ge); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
901 INSTALL_BINOP (op_gt, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _gt); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
902 INSTALL_BINOP (op_ne, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _ne);
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
903
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
904 #define OCTAVE_INSTALL_MS_INT_BOOL_OPS(PFX, T1, T2) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
905 INSTALL_BINOP (op_el_and, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _el_and); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
906 INSTALL_BINOP (op_el_or, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _el_or);
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
907
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
908 #define OCTAVE_INSTALL_MS_INT_ASSIGN_OPS(PFX, TLHS, TRHS) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
909 INSTALL_ASSIGNOP (op_asn_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## scalar, PFX ## _assign)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
910
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
911 #define OCTAVE_INSTALL_MS_INT_OPS(TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
912 OCTAVE_INSTALL_MS_INT_ARITH_OPS (ms, TYPE ## _, TYPE ## _) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
913 OCTAVE_INSTALL_MS_INT_ARITH_OPS (msx, TYPE ## _, ) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
914 OCTAVE_INSTALL_MS_INT_ARITH_OPS (mxs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
915 OCTAVE_INSTALL_MS_INT_ARITH_OPS (msfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
916 OCTAVE_INSTALL_MS_INT_ARITH_OPS (mfxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
917 OCTAVE_INSTALL_MS_INT_CMP_OPS (ms, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
918 OCTAVE_INSTALL_MS_INT_CMP_OPS (mx, TYPE ## _, ) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
919 OCTAVE_INSTALL_MS_INT_CMP_OPS (mxs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
920 OCTAVE_INSTALL_MS_INT_CMP_OPS (mfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
921 OCTAVE_INSTALL_MS_INT_CMP_OPS (mfxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
922 OCTAVE_INSTALL_MS_INT_BOOL_OPS (ms, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
923 OCTAVE_INSTALL_MS_INT_BOOL_OPS (mx, TYPE ## _, ) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
924 OCTAVE_INSTALL_MS_INT_BOOL_OPS (mxs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
925 OCTAVE_INSTALL_MS_INT_BOOL_OPS (mfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
926 OCTAVE_INSTALL_MS_INT_BOOL_OPS (mfxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
927 OCTAVE_INSTALL_MS_INT_ASSIGN_OPS (ms, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
928 OCTAVE_INSTALL_MS_INT_ASSIGN_OPS (mx, TYPE ## _, ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
929 OCTAVE_INSTALL_MS_INT_ASSIGN_OPS (mfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
930 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _matrix, octave_complex_scalar, octave_complex_matrix) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
931 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _matrix, octave_float_complex_scalar, octave_float_complex_matrix)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
932
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
933 #define OCTAVE_INSTALL_M_INT_UNOPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
934 INSTALL_UNOP (op_not, octave_ ## TYPE ## _matrix, m_not); \
4965
c0d8e8afa82f [project @ 2004-09-06 20:19:57 by jwe]
jwe
parents: 4964
diff changeset
935 INSTALL_UNOP (op_uplus, octave_ ## TYPE ## _matrix, m_uplus); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
936 INSTALL_UNOP (op_uminus, octave_ ## TYPE ## _matrix, m_uminus); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
937 INSTALL_UNOP (op_transpose, octave_ ## TYPE ## _matrix, m_transpose); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
938 INSTALL_UNOP (op_hermitian, octave_ ## TYPE ## _matrix, m_transpose); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
939 \
5829
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
940 INSTALL_NCUNOP (op_incr, octave_ ## TYPE ## _matrix, m_incr); \
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
941 INSTALL_NCUNOP (op_decr, octave_ ## TYPE ## _matrix, m_decr);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
942
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
943 #define OCTAVE_INSTALL_MM_INT_ARITH_OPS(PFX, T1, T2) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
944 INSTALL_BINOP (op_add, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _add); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
945 INSTALL_BINOP (op_sub, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _sub); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
946 /* INSTALL_BINOP (op_mul, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _mul); */ \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
947 /* INSTALL_BINOP (op_div, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _div); */ \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
948 INSTALL_BINOP (op_pow, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _pow); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
949 /* INSTALL_BINOP (op_ldiv, octave_ ## T1 ## _matrix, octave_ ## T2 ## _matrix, mm_ldiv); */ \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
950 INSTALL_BINOP (op_el_mul, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_mul); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
951 INSTALL_BINOP (op_el_div, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_div); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
952 INSTALL_BINOP (op_el_pow, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_pow); \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
953 INSTALL_BINOP (op_el_ldiv, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_ldiv);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
954
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
955 #define OCTAVE_INSTALL_MM_INT_CMP_OPS(PFX, T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
956 INSTALL_BINOP (op_lt, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _lt); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
957 INSTALL_BINOP (op_le, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _le); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
958 INSTALL_BINOP (op_eq, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _eq); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
959 INSTALL_BINOP (op_ge, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _ge); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
960 INSTALL_BINOP (op_gt, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _gt); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
961 INSTALL_BINOP (op_ne, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _ne);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
962
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
963 #define OCTAVE_INSTALL_MM_INT_BOOL_OPS(PFX, T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
964 INSTALL_BINOP (op_el_and, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_and); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
965 INSTALL_BINOP (op_el_or, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_or);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
966
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
967 #define OCTAVE_INSTALL_MM_INT_ASSIGN_OPS(PFX, TLHS, TRHS) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
968 INSTALL_ASSIGNOP (op_asn_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## matrix, PFX ## _assign)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
969
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
970 #define OCTAVE_INSTALL_MM_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
971 OCTAVE_INSTALL_M_INT_UNOPS (TYPE) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
972 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mm, TYPE ##_, TYPE ## _) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
973 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mmx, TYPE ##_, ) \
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
974 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mxm, , TYPE ##_) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
975 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mmfx, TYPE ##_, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
976 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mfxm, float_, TYPE ##_) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
977 OCTAVE_INSTALL_MM_INT_CMP_OPS (mm, TYPE ## _, TYPE ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
978 OCTAVE_INSTALL_MM_INT_CMP_OPS (mmx, TYPE ## _, ) \
5038
fdfce0dec36b [project @ 2004-09-24 17:46:18 by jwe]
jwe
parents: 5030
diff changeset
979 OCTAVE_INSTALL_MM_INT_CMP_OPS (mxm, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
980 OCTAVE_INSTALL_MM_INT_CMP_OPS (mmfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
981 OCTAVE_INSTALL_MM_INT_CMP_OPS (mfxm, float_, TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
982 OCTAVE_INSTALL_MM_INT_BOOL_OPS (mm, TYPE ## _, TYPE ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
983 OCTAVE_INSTALL_MM_INT_BOOL_OPS (mmx, TYPE ## _, ) \
5038
fdfce0dec36b [project @ 2004-09-24 17:46:18 by jwe]
jwe
parents: 5030
diff changeset
984 OCTAVE_INSTALL_MM_INT_BOOL_OPS (mxm, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
985 OCTAVE_INSTALL_MM_INT_BOOL_OPS (mmfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
986 OCTAVE_INSTALL_MM_INT_BOOL_OPS (mfxm, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
987 OCTAVE_INSTALL_MM_INT_ASSIGN_OPS (mm, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
988 OCTAVE_INSTALL_MM_INT_ASSIGN_OPS (mmx, TYPE ## _, ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
989 OCTAVE_INSTALL_MM_INT_ASSIGN_OPS (mmfx, TYPE ## _, float_) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
990 INSTALL_WIDENOP (octave_ ## TYPE ## _matrix, octave_complex_matrix, TYPE ## _m_complex_m_conv) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
991 INSTALL_WIDENOP (octave_ ## TYPE ## _matrix, octave_float_complex_matrix, TYPE ## _m_float_complex_m_conv) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
992 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _matrix, octave_complex_matrix, octave_complex_matrix) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
993 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _matrix, octave_float_complex_matrix, octave_float_complex_matrix)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
994
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
995 #define OCTAVE_INSTALL_RE_INT_ASSIGN_OPS(TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
996 INSTALL_ASSIGNOP (op_asn_eq, octave_matrix, octave_ ## TYPE ## _scalar, TYPE ## ms_assign) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
997 INSTALL_ASSIGNOP (op_asn_eq, octave_matrix, octave_ ## TYPE ## _matrix, TYPE ## mm_assign) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
998 INSTALL_ASSIGNCONV (octave_scalar, octave_ ## TYPE ## _scalar, octave_matrix) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
999 INSTALL_ASSIGNCONV (octave_matrix, octave_ ## TYPE ## _matrix, octave_matrix)
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1000
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1001 #define OCTAVE_INSTALL_FLT_RE_INT_ASSIGN_OPS(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1002 INSTALL_ASSIGNOP (op_asn_eq, octave_float_matrix, octave_ ## TYPE ## _scalar, TYPE ## fms_assign) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1003 INSTALL_ASSIGNOP (op_asn_eq, octave_float_matrix, octave_ ## TYPE ## _matrix, TYPE ## fmm_assign) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1004 INSTALL_ASSIGNCONV (octave_float_scalar, octave_ ## TYPE ## _scalar, octave_float_matrix) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1005 INSTALL_ASSIGNCONV (octave_float_matrix, octave_ ## TYPE ## _matrix, octave_float_matrix)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1006
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1007 #define OCTAVE_INSTALL_CX_INT_ASSIGN_OPS(TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1008 INSTALL_ASSIGNOP (op_asn_eq, octave_complex_matrix, octave_ ## TYPE ## _scalar, TYPE ## cms_assign) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1009 INSTALL_ASSIGNOP (op_asn_eq, octave_complex_matrix, octave_ ## TYPE ## _matrix, TYPE ## cmm_assign) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1010 INSTALL_ASSIGNCONV (octave_complex_scalar, octave_ ## TYPE ## _scalar, octave_complex_matrix) \
7625
43e3efb2cbc2 Add integer el_div and el_ldiv operators to the binops that were missing them
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
1011 INSTALL_ASSIGNCONV (octave_complex_matrix, octave_ ## TYPE ## _matrix, octave_complex_matrix)
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1012
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1013 #define OCTAVE_INSTALL_FLT_CX_INT_ASSIGN_OPS(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1014 INSTALL_ASSIGNOP (op_asn_eq, octave_float_complex_matrix, octave_ ## TYPE ## _scalar, TYPE ## fcms_assign) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1015 INSTALL_ASSIGNOP (op_asn_eq, octave_float_complex_matrix, octave_ ## TYPE ## _matrix, TYPE ## fcmm_assign) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1016 INSTALL_ASSIGNCONV (octave_float_complex_scalar, octave_ ## TYPE ## _scalar, octave_complex_matrix) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1017 INSTALL_ASSIGNCONV (octave_float_complex_matrix, octave_ ## TYPE ## _matrix, octave_complex_matrix)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1018
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1019 #define OCTAVE_INSTALL_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1020 OCTAVE_INSTALL_SS_INT_OPS (TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1021 OCTAVE_INSTALL_SM_INT_OPS (TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1022 OCTAVE_INSTALL_MS_INT_OPS (TYPE) \
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
1023 OCTAVE_INSTALL_MM_INT_OPS (TYPE) \
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1024 OCTAVE_INSTALL_CONCAT_FN (TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1025 OCTAVE_INSTALL_RE_INT_ASSIGN_OPS (TYPE) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1026 OCTAVE_INSTALL_FLT_RE_INT_ASSIGN_OPS (TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1027 OCTAVE_INSTALL_CX_INT_ASSIGN_OPS (TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1028 OCTAVE_INSTALL_FLT_CX_INT_ASSIGN_OPS (TYPE)
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1029
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1030 #define OCTAVE_INSTALL_SM_INT_ASSIGNCONV(TLHS, TRHS) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1031 INSTALL_ASSIGNCONV (octave_ ## TLHS ## _scalar, octave_ ## TRHS ## _scalar, octave_ ## TLHS ## _matrix) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1032 INSTALL_ASSIGNCONV (octave_ ## TLHS ## _scalar, octave_ ## TRHS ## _matrix, octave_ ## TLHS ## _matrix)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1033
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1034 #define OCTAVE_MIXED_INT_CMP_OPS(T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1035 OCTAVE_SS_INT_CMP_OPS (T1 ## _ ## T2 ## _ss, T1 ## _, T2 ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1036 OCTAVE_SM_INT_CMP_OPS (T1 ## _ ## T2 ## _sm, T1 ## _, T2 ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1037 OCTAVE_MS_INT_CMP_OPS (T1 ## _ ## T2 ## _ms, T1 ## _, T2 ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1038 OCTAVE_MM_INT_CMP_OPS (T1 ## _ ## T2 ## _mm, T1 ## _, T2 ## _)
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1039
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1040 #define OCTAVE_INSTALL_MIXED_INT_CMP_OPS(T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1041 OCTAVE_INSTALL_SS_INT_CMP_OPS (T1 ## _ ## T2 ## _ss, T1 ## _, T2 ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1042 OCTAVE_INSTALL_SM_INT_CMP_OPS (T1 ## _ ## T2 ## _sm, T1 ## _, T2 ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1043 OCTAVE_INSTALL_MS_INT_CMP_OPS (T1 ## _ ## T2 ## _ms, T1 ## _, T2 ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1044 OCTAVE_INSTALL_MM_INT_CMP_OPS (T1 ## _ ## T2 ## _mm, T1 ## _, T2 ## _)
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1045
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1046 /*
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1047 ;;; Local Variables: ***
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1048 ;;; mode: C++ ***
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1049 ;;; End: ***
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1050 */