annotate libinterp/operators/op-int.h @ 21023:6176560b03d9

maint: Remove return stmts after gripe function calls. * gripes.h: Mark gripe functions which call error() wwith GCC_ATTR_NORETURN. * jit-typeinfo.cc (gripe_bad_result): Mark function with GCC_ATTR_NORETURN. * load-save.cc (gripe_file_open): Mark function with GCC_ATTR_NORETURN. * ov-base.cc (gripe_indexed_assignment, gripe_assign_conversion_failed, gripe_no_conversion): Mark functions with GCC_ATTR_NORETURN. * ov-class.cc (gripe_invalid_index1, gripe_invalid_index_for_assignment, gripe_invalid_index_type): Mark functions with GCC_ATTR_NORETURN. * ov-classdef.h (gripe_invalid_object): Mark function with GCC_ATTR_NORETURN. * ov.cc (gripe_cat_op, gripe_cat_op_conv): Mark functions with GCC_ATTR_NORETURN. * balance.cc, det.cc, eig.cc, hess.cc, inv.cc, jit-typeinfo.cc, load-save.cc, qz.cc, schur.cc, sparse-xdiv.cc, sparse-xpow.cc, sylvester.cc, xdiv.cc, xpow.cc, symrcm.cc, ov-base.cc, ov-classdef.h, ov-cs-list.cc, ov-flt-re-mat.cc, ov-re-mat.cc, ov-re-sparse.cc, ov.cc, op-int.h, op-fs-fs.cc, ops.h: Remove statements that occur after a gripe function which does not return. * op-cs-cs.cc, op-dms-template.cc, op-fcs-fcs.cc, op-s-s.cc : Add newline between gripe and return statement for readability.
author Rik <rik@octave.org>
date Fri, 01 Jan 2016 13:58:45 -0800
parents b9d4c3615e89
children
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
19696
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 18212
diff changeset
3 Copyright (C) 1996-2015 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"
13005
4061106b1c4b Enable automatic bsxfun for power operators
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11523
diff changeset
24 #include "bsxfun.h"
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
25
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
26 #define DEFINTBINOP_OP(name, t1, t2, op, t3) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
27 BINOPDECL (name, a1, a2) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
28 { \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
29 CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
30 octave_value retval = octave_value \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
31 (v1.t1 ## _value () op v2.t2 ## _value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
32 return retval; \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
33 }
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
34
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
35 #define DEFINTNDBINOP_OP(name, t1, t2, e1, e2, op, t3) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
36 BINOPDECL (name, a1, a2) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
37 { \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
38 CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
39 octave_value retval = octave_value \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
40 (v1.e1 ## _value () op v2.e2 ## _value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
41 return retval; \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
42 }
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
43
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
44 #define DEFINTBINOP_FN(name, t1, t2, f, t3, op) \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
45 BINOPDECL (name, a1, a2) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
46 { \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
47 CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
48 octave_value retval = octave_value (f (v1.t1 ## _value (), v2.t2 ## _value ())); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
49 return retval; \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
50 }
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
51
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
52 #define DEFINTNDBINOP_FN(name, t1, t2, e1, e2, f, t3, op) \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
53 BINOPDECL (name, a1, a2) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
54 { \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
55 CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
56 octave_value retval = octave_value (f (v1.e1 ## _value (), v2.e2 ## _value ())); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
57 return retval; \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
58 }
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
59
5075
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
60 #define OCTAVE_CONCAT_FN2(T1, T2) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
61 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
62 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
63 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
64 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
65
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
66 #define OCTAVE_INSTALL_CONCAT_FN2(T1, T2) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
67 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
68 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
69 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
70 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
71
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
72 #define OCTAVE_DOUBLE_INT_CONCAT_FN(TYPE) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
73 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
74 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
75 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
76 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
77
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
78 #define OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN(TYPE) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
79 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
80 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
81 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
82 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
83
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
84 #define OCTAVE_INT_DOUBLE_CONCAT_FN(TYPE) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
85 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
86 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
87 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
88 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
89
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
90 #define OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN(TYPE) \
b6a9f78f60e9 [project @ 2004-11-10 03:13:26 by jwe]
jwe
parents: 5038
diff changeset
91 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
92 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
93 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
94 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
95
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
96 #define OCTAVE_FLOAT_INT_CONCAT_FN(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
97 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
98 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
99 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
100 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
101
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
102 #define OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
103 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
104 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
105 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
106 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
107
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
108 #define OCTAVE_INT_FLOAT_CONCAT_FN(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
109 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
110 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
111 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
112 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
113
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
114 #define OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
115 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
116 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
117 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
118 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
119
5533
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
120 // For compatibility, concatenation with a character always returns a
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
121 // character.
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
122
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
123 #define OCTAVE_CHAR_INT_CONCAT_FN(TYPE) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
124 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
125 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
126
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
127 #define OCTAVE_INSTALL_CHAR_INT_CONCAT_FN(TYPE) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
128 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
129 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
130 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
131 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
132
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
133 #define OCTAVE_INT_CHAR_CONCAT_FN(TYPE) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
134 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
135 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
136
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
137 #define OCTAVE_INSTALL_INT_CHAR_CONCAT_FN(TYPE) \
667ad2becb63 [project @ 2005-11-10 21:40:48 by jwe]
jwe
parents: 5307
diff changeset
138 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
139 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
140 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
141 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
142
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
143 #define OCTAVE_CONCAT_FN(TYPE) \
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
144 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
145 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
146 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
147 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
148
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
149 #define OCTAVE_INSTALL_CONCAT_FN(TYPE) \
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
150 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
151 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
152 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
153 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
154
20945
6eff66fb8a02 style fixes for comments
John W. Eaton <jwe@octave.org>
parents: 20856
diff changeset
155 // scalar unary ops.
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
156 #define OCTAVE_S_INT_UNOPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
157 \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
158 DEFUNOP_OP (s_not, TYPE ## _scalar, !) \
4965
c0d8e8afa82f [project @ 2004-09-06 20:19:57 by jwe]
jwe
parents: 4964
diff changeset
159 DEFUNOP_OP (s_uplus, TYPE ## _scalar, /* no-op */) \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
160 DEFUNOP (s_uminus, TYPE ## _scalar) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
161 { \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
162 CAST_UNOP_ARG (const octave_ ## TYPE ## _scalar &); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
163 octave_value retval = octave_value (- v. TYPE ## _scalar_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
164 return retval; \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
165 } \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
166 DEFUNOP_OP (s_transpose, TYPE ## _scalar, /* no-op */) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
167 DEFUNOP_OP (s_hermitian, TYPE ## _scalar, /* no-op */) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
168 \
5829
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
169 DEFNCUNOP_METHOD (s_incr, TYPE ## _scalar, increment) \
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
170 DEFNCUNOP_METHOD (s_decr, TYPE ## _scalar, decrement)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
171
20945
6eff66fb8a02 style fixes for comments
John W. Eaton <jwe@octave.org>
parents: 20856
diff changeset
172 // scalar by scalar ops.
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
173 #define OCTAVE_SS_INT_ARITH_OPS(PFX, T1, T2, T3) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
174 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
175 DEFINTBINOP_OP (PFX ## _add, T1 ## scalar, T2 ## scalar, +, T3) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
176 DEFINTBINOP_OP (PFX ## _sub, T1 ## scalar, T2 ## scalar, -, T3) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
177 DEFINTBINOP_OP (PFX ## _mul, T1 ## scalar, T2 ## scalar, *, T3) \
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 DEFBINOP (PFX ## _div, T1 ## scalar, T2 ## scalar) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
180 { \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
181 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
182 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
183 if (! v2.T2 ## scalar_value ()) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
184 gripe_divide_by_zero (); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
185 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
186 octave_value retval = octave_value (v1.T1 ## scalar_value () / v2.T2 ## scalar_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
187 return retval; \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
188 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
189 \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
190 DEFINTBINOP_FN (PFX ## _pow, T1 ## scalar, T2 ## scalar, xpow, T3, ^) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
191 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
192 DEFBINOP (PFX ## _ldiv, T1 ## scalar, T2 ## scalar) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
193 { \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
194 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
195 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
196 if (! v1.T1 ## scalar_value ()) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
197 gripe_divide_by_zero (); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
198 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
199 octave_value retval = octave_value (v2.T2 ## scalar_value () / v1.T1 ## scalar_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
200 return retval; \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
201 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
202 \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
203 DEFINTBINOP_OP (PFX ## _el_mul, T1 ## scalar, T2 ## scalar, *, T3) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
204 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
205 DEFBINOP (PFX ## _el_div, T1 ## scalar, T2 ## scalar) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
206 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
207 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
208 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
209 if (! v2.T2 ## scalar_value ()) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
210 gripe_divide_by_zero (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
211 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
212 octave_value retval = octave_value (v1.T1 ## scalar_value () / v2.T2 ## scalar_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
213 return retval; \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
214 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
215 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
216 DEFINTBINOP_FN (PFX ## _el_pow, T1 ## scalar, T2 ## scalar, xpow, T3, .^) \
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 DEFBINOP (PFX ## _el_ldiv, T1 ## scalar, T2 ## scalar) \
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 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
221 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
222 if (! v1.T1 ## scalar_value ()) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
223 gripe_divide_by_zero (); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
224 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
225 octave_value retval = octave_value (v2.T2 ## scalar_value () / v1.T1 ## scalar_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
226 return retval; \
19860
19755f4fc851 maint: Cleanup C++ code to follow Octave coding conventions.
Rik <rik@octave.org>
parents: 19696
diff changeset
227 }
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
228
5030
160365410ad4 [project @ 2004-09-24 03:22:23 by jwe]
jwe
parents: 4965
diff changeset
229 #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
230 DEFBINOP (PFX ## _el_and, T2, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
231 { \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
232 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
233 \
5030
160365410ad4 [project @ 2004-09-24 03:22:23 by jwe]
jwe
parents: 4965
diff changeset
234 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
235 } \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
236 \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
237 DEFBINOP (PFX ## _el_or, T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
238 { \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
239 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
240 \
5030
160365410ad4 [project @ 2004-09-24 03:22:23 by jwe]
jwe
parents: 4965
diff changeset
241 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
242 }
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
243
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
244 #define OCTAVE_SS_INT_CMP_OPS(PFX, T1, T2) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
245 DEFBINOP_OP (PFX ## _lt, T1 ## scalar, T2 ## scalar, <) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
246 DEFBINOP_OP (PFX ## _le, T1 ## scalar, T2 ## scalar, <=) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
247 DEFBINOP_OP (PFX ## _eq, T1 ## scalar, T2 ## scalar, ==) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
248 DEFBINOP_OP (PFX ## _ge, T1 ## scalar, T2 ## scalar, >=) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
249 DEFBINOP_OP (PFX ## _gt, T1 ## scalar, T2 ## scalar, >) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
250 DEFBINOP_OP (PFX ## _ne, T1 ## scalar, T2 ## scalar, !=)
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
251
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
252 #define OCTAVE_SS_POW_OPS(T1, T2) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
253 octave_value \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
254 xpow (const octave_ ## T1& a, const octave_ ## T2& b) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
255 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
256 return pow (a, b); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
257 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
258 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
259 octave_value \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
260 xpow (const octave_ ## T1& a, double b) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
261 { \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
262 return pow (a, b); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
263 } \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
264 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
265 octave_value \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
266 xpow (double a, const octave_ ## T1& b) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
267 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
268 return pow (a, b); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
269 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
270 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
271 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
272 xpow (const octave_ ## T1& a, float b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
273 { \
7914
e998e81224b5 Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
274 return powf (a, b); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
275 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
276 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
277 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
278 xpow (float a, const octave_ ## T1& b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
279 { \
7914
e998e81224b5 Various compilation fixes for MSVC.
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
280 return powf (a, b); \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
281 }
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
282
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
283 #define OCTAVE_SS_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
284 OCTAVE_S_INT_UNOPS (TYPE) \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
285 OCTAVE_SS_POW_OPS (TYPE, TYPE) \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
286 OCTAVE_SS_INT_ARITH_OPS (ss, TYPE ## _, TYPE ## _, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
287 OCTAVE_SS_INT_ARITH_OPS (ssx, TYPE ## _, , TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
288 OCTAVE_SS_INT_ARITH_OPS (sxs, , TYPE ## _, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
289 OCTAVE_SS_INT_ARITH_OPS (ssfx, TYPE ## _, float_, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
290 OCTAVE_SS_INT_ARITH_OPS (sfxs, float_, TYPE ## _, TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
291 OCTAVE_SS_INT_CMP_OPS (ss, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
292 OCTAVE_SS_INT_CMP_OPS (sx, TYPE ## _, ) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
293 OCTAVE_SS_INT_CMP_OPS (xs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
294 OCTAVE_SS_INT_CMP_OPS (sfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
295 OCTAVE_SS_INT_CMP_OPS (fxs, float_, TYPE ## _) \
5030
160365410ad4 [project @ 2004-09-24 03:22:23 by jwe]
jwe
parents: 4965
diff changeset
296 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
297 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
298 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
299 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
300 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
301
20945
6eff66fb8a02 style fixes for comments
John W. Eaton <jwe@octave.org>
parents: 20856
diff changeset
302 // scalar by matrix ops.
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
303 #define OCTAVE_SM_INT_ARITH_OPS(PFX, TS, TM, TI) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
304 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
305 DEFINTNDBINOP_OP (PFX ## _add, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, +, TI) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
306 DEFINTNDBINOP_OP (PFX ## _sub, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, -, TI) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
307 DEFINTNDBINOP_OP (PFX ## _mul, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, *, TI) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
308 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
309 /* DEFBINOP (PFX ## _div, TS ## scalar, TM ## matrix) */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
310 /* { */ \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
311 /* 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
312 /* */ \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
313 /* Matrix m1 = v1.TM ## matrix_value (); */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
314 /* Matrix m2 = v2.TM ## matrix_value (); */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
315 /* */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
316 /* return octave_value (xdiv (m1, m2)); */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
317 /* } */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
318 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
319 /* DEFBINOP_FN (PFX ## _pow, TS ## scalar, TM ## matrix, xpow) */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
320 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
321 DEFBINOP (PFX ## _ldiv, TS ## scalar, TM ## matrix) \
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 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
324 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
325 if (! v1.TS ## scalar_value ()) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
326 gripe_divide_by_zero (); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
327 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
328 octave_value retval = octave_value (v2.TS ## scalar_value () / v1.TS ## scalar_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
329 return retval; \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
330 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
331 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
332 DEFINTNDBINOP_OP (PFX ## _el_mul, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, *, TI) \
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
333 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
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 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
336 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
337 octave_value retval = octave_value (v1.TS ## scalar_value () / v2.TM ## array_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
338 return retval; \
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
339 } \
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 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
341 DEFINTNDBINOP_FN (PFX ## _el_pow, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, elem_xpow, TI, .^) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
342 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
343 DEFBINOP (PFX ## _el_ldiv, TS ## scalar, TM ## matrix) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
344 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
345 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
346 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
347 if (! v1.TS ## scalar_value ()) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
348 gripe_divide_by_zero (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
349 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
350 octave_value retval = octave_value (v2.TM ## array_value () / v1.TS ## scalar_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
351 return retval; \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
352 }
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
353
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
354 #define OCTAVE_SM_INT_CMP_OPS(PFX, TS, TM) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
355 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
356 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
357 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
358 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
359 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
360 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
361
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
362 #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
363 DEFNDBINOP_FN (PFX ## _el_and, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_and) \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
364 DEFNDBINOP_FN (PFX ## _el_or, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_or) \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
365 DEFNDBINOP_FN (PFX ## _el_and_not, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_and_not) \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
366 DEFNDBINOP_FN (PFX ## _el_or_not, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, mx_el_or_not)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
367
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
368 #define OCTAVE_SM_POW_OPS(T1, T2) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
369 octave_value \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
370 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
371 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
372 T2 ## NDArray result (b.dims ()); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
373 for (int i = 0; i < b.numel (); i++) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
374 { \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
375 OCTAVE_QUIT; \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
376 result (i) = pow (a, b(i)); \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
377 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
378 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
379 } \
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 \
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
381 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
382 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
383 { \
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
384 T1 ## NDArray result (b.dims ()); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
385 for (int i = 0; i < b.numel (); i++) \
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
386 { \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
387 OCTAVE_QUIT; \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
388 result (i) = pow (a, b(i)); \
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
389 } \
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
390 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
391 } \
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 \
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_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
394 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
395 { \
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
396 T2 ## NDArray result (b.dims ()); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
397 for (int i = 0; i < b.numel (); i++) \
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
398 { \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
399 OCTAVE_QUIT; \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
400 result (i) = pow (a, b(i)); \
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
401 } \
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
402 return octave_value (result); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
403 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
404 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
405 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
406 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
407 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
408 T1 ## NDArray result (b.dims ()); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
409 for (int i = 0; i < b.numel (); i++) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
410 { \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
411 OCTAVE_QUIT; \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
412 result (i) = powf (a, b(i)); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
413 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
414 return octave_value (result); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
415 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
416 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
417 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
418 elem_xpow (float a, const T2 ## NDArray& b) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
419 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
420 T2 ## NDArray result (b.dims ()); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
421 for (int i = 0; i < b.numel (); i++) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
422 { \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
423 OCTAVE_QUIT; \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
424 result (i) = powf (a, b(i)); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
425 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
426 return octave_value (result); \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
427 }
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
428
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
429
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
430 #define OCTAVE_SM_CONV(TS, TM) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
431 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
432 { \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
433 CAST_CONV_ARG (const octave_ ## TS ## scalar&); \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
434 \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
435 return new octave_ ## TM ## matrix (v.TM ## array_value ()); \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
436 }
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
437
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
438 #define OCTAVE_SM_INT_OPS(TYPE) \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
439 OCTAVE_SM_POW_OPS (TYPE, TYPE) \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
440 OCTAVE_SM_INT_ARITH_OPS (sm, TYPE ## _, TYPE ## _, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
441 OCTAVE_SM_INT_ARITH_OPS (smx, TYPE ## _, , TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
442 OCTAVE_SM_INT_ARITH_OPS (sxm, , TYPE ## _, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
443 OCTAVE_SM_INT_ARITH_OPS (smfx, TYPE ## _, float_, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
444 OCTAVE_SM_INT_ARITH_OPS (sfxm, float_, TYPE ## _, TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
445 OCTAVE_SM_INT_CMP_OPS (sm, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
446 OCTAVE_SM_INT_CMP_OPS (xm, , TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
447 OCTAVE_SM_INT_CMP_OPS (smx, TYPE ## _, ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
448 OCTAVE_SM_INT_CMP_OPS (fxm, float_, TYPE ## _) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
449 OCTAVE_SM_INT_CMP_OPS (smfx, TYPE ## _, float_) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
450 OCTAVE_SM_INT_BOOL_OPS (sm, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
451 OCTAVE_SM_INT_BOOL_OPS (xm, , TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
452 OCTAVE_SM_INT_BOOL_OPS (smx, TYPE ## _, ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
453 OCTAVE_SM_INT_BOOL_OPS (fxm, float_, TYPE ## _) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
454 OCTAVE_SM_INT_BOOL_OPS (smfx, TYPE ## _, float_) \
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
455 OCTAVE_SM_CONV (TYPE ## _, TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
456 OCTAVE_SM_CONV (TYPE ## _, complex_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
457 OCTAVE_SM_CONV (TYPE ## _, float_complex_)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
458
20945
6eff66fb8a02 style fixes for comments
John W. Eaton <jwe@octave.org>
parents: 20856
diff changeset
459 // matrix by scalar ops.
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
460 #define OCTAVE_MS_INT_ARITH_OPS(PFX, TM, TS, TI) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
461 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
462 DEFINTNDBINOP_OP (PFX ## _add, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, +, TI) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
463 DEFINTNDBINOP_OP (PFX ## _sub, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, -, TI) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
464 DEFINTNDBINOP_OP (PFX ## _mul, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, *, TI) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
465 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
466 DEFBINOP (PFX ## _div, TM ## matrix, TS ## scalar) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
467 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
468 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
469 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
470 if (! v2.TS ## scalar_value ()) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
471 gripe_divide_by_zero (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
472 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
473 octave_value retval = octave_value (v1.TM ## array_value () / v2.TS ## scalar_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
474 return retval; \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
475 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
476 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
477 /* DEFBINOP_FN (PFX ## _pow, TM ## matrix, TS ## scalar, xpow) */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
478 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
479 /* DEFBINOP (PFX ## _ldiv, TM ## matrix, TS ## scalar) */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
480 /* { */ \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
481 /* 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
482 /* */ \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
483 /* Matrix m1 = v1.TM ## matrix_value (); */ \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
484 /* Matrix m2 = v2.TM ## matrix_value (); */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
485 /* */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
486 /* return octave_value (xleftdiv (m1, m2)); */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
487 /* } */ \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
488 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
489 DEFINTNDBINOP_OP (PFX ## _el_mul, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, *, TI) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
490 \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
491 DEFBINOP (PFX ## _el_div, TM ## matrix, TS ## scalar) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
492 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
493 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
494 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
495 if (! v2.TS ## scalar_value ()) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
496 gripe_divide_by_zero (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
497 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
498 octave_value retval = octave_value (v1.TM ## array_value () / v2.TS ## scalar_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
499 return retval; \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
500 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
501 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
502 DEFINTNDBINOP_FN (PFX ## _el_pow, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, elem_xpow, TI, .^) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
503 \
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
504 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
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 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
507 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
508 octave_value retval = v2.TS ## scalar_value () / v1.TM ## array_value (); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
509 return retval; \
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
510 }
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
511
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
512 #define OCTAVE_MS_INT_CMP_OPS(PFX, TM, TS) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
513 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
514 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
515 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
516 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
517 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
518 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
519
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
520 #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
521 DEFNDBINOP_FN (PFX ## _el_and, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_and) \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
522 DEFNDBINOP_FN (PFX ## _el_or, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_or) \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
523 DEFNDBINOP_FN (PFX ## _el_not_and, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_not_and) \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
524 DEFNDBINOP_FN (PFX ## _el_not_or, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, mx_el_not_or)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
525
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
526 #define OCTAVE_MS_INT_ASSIGN_OPS(PFX, TM, TS, TE) \
8679
280fae940bb0 optimize scalar indexing
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
527 DEFNDASSIGNOP_FN (PFX ## _assign, TM ## matrix, TS ## scalar, TM ## scalar, assign)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
528
9546
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
529 #define OCTAVE_MS_INT_ASSIGNEQ_OPS(PFX, TM) \
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
530 DEFNDASSIGNOP_OP (PFX ## _assign_add, TM ## matrix, TM ## scalar, TM ## scalar, +=) \
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
531 DEFNDASSIGNOP_OP (PFX ## _assign_sub, TM ## matrix, TM ## scalar, TM ## scalar, -=) \
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
532 DEFNDASSIGNOP_OP (PFX ## _assign_mul, TM ## matrix, TM ## scalar, TM ## scalar, *=) \
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
533 DEFNDASSIGNOP_OP (PFX ## _assign_div, TM ## matrix, TM ## scalar, TM ## scalar, /=)
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
534
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
535 #define OCTAVE_MS_POW_OPS(T1, T2) \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
536 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
537 { \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
538 T1 ## NDArray result (a.dims ()); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
539 for (int i = 0; i < a.numel (); i++) \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
540 { \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
541 OCTAVE_QUIT; \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
542 result (i) = pow (a(i), b); \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
543 } \
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
544 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
545 } \
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
546 \
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
547 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
548 { \
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
549 T1 ## NDArray result (a.dims ()); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
550 for (int i = 0; i < a.numel (); i++) \
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
551 { \
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
552 OCTAVE_QUIT; \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
553 result (i) = pow (a(i), b); \
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
554 } \
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
555 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
556 } \
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
557 \
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
558 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
559 { \
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
560 T2 ## NDArray result (a.dims ()); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
561 for (int i = 0; i < a.numel (); i++) \
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
562 { \
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
563 OCTAVE_QUIT; \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
564 result (i) = pow (a(i), b); \
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
565 } \
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
566 return octave_value (result); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
567 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
568 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
569 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
570 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
571 T1 ## NDArray result (a.dims ()); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
572 for (int i = 0; i < a.numel (); i++) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
573 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
574 OCTAVE_QUIT; \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
575 result (i) = powf (a(i), b); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
576 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
577 return octave_value (result); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
578 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
579 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
580 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
581 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
582 T2 ## NDArray result (a.dims ()); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
583 for (int i = 0; i < a.numel (); i++) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
584 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
585 OCTAVE_QUIT; \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
586 result (i) = powf (a(i), b); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
587 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
588 return octave_value (result); \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
589 }
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
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
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
592 #define OCTAVE_MS_INT_OPS(TYPE) \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
593 OCTAVE_MS_POW_OPS (TYPE, TYPE) \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
594 OCTAVE_MS_INT_ARITH_OPS (ms, TYPE ## _, TYPE ## _, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
595 OCTAVE_MS_INT_ARITH_OPS (msx, TYPE ## _, , TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
596 OCTAVE_MS_INT_ARITH_OPS (mxs, , TYPE ## _, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
597 OCTAVE_MS_INT_ARITH_OPS (msfx, TYPE ## _, float_, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
598 OCTAVE_MS_INT_ARITH_OPS (mfxs, float_, TYPE ## _, TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
599 OCTAVE_MS_INT_CMP_OPS (ms, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
600 OCTAVE_MS_INT_CMP_OPS (mx, TYPE ## _, ) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
601 OCTAVE_MS_INT_CMP_OPS (mxs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
602 OCTAVE_MS_INT_CMP_OPS (mfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
603 OCTAVE_MS_INT_CMP_OPS (mfxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
604 OCTAVE_MS_INT_BOOL_OPS (ms, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
605 OCTAVE_MS_INT_BOOL_OPS (mx, TYPE ## _, ) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
606 OCTAVE_MS_INT_BOOL_OPS (mxs, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
607 OCTAVE_MS_INT_BOOL_OPS (mfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
608 OCTAVE_MS_INT_BOOL_OPS (mfxs, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
609 OCTAVE_MS_INT_ASSIGN_OPS (ms, TYPE ## _, TYPE ## _, TYPE ## _) \
9546
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
610 OCTAVE_MS_INT_ASSIGNEQ_OPS (mse, TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
611 OCTAVE_MS_INT_ASSIGN_OPS (mx, TYPE ## _, , ) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
612 OCTAVE_MS_INT_ASSIGN_OPS (mfx, TYPE ## _, float_, float_)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
613
20945
6eff66fb8a02 style fixes for comments
John W. Eaton <jwe@octave.org>
parents: 20856
diff changeset
614 // matrix unary ops.
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
615 #define OCTAVE_M_INT_UNOPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
616 \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
617 DEFNDUNOP_OP (m_not, TYPE ## _matrix, TYPE ## _array, !) \
4965
c0d8e8afa82f [project @ 2004-09-06 20:19:57 by jwe]
jwe
parents: 4964
diff changeset
618 DEFNDUNOP_OP (m_uplus, TYPE ## _matrix, TYPE ## _array, /* no-op */) \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
619 DEFUNOP (m_uminus, TYPE ## _matrix) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
620 { \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
621 CAST_UNOP_ARG (const octave_ ## TYPE ## _matrix &); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
622 octave_value retval = octave_value (- v. TYPE ## _array_value ()); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
623 return retval; \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
624 } \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
625 \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
626 DEFUNOP (m_transpose, TYPE ## _matrix) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
627 { \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
628 CAST_UNOP_ARG (const octave_ ## TYPE ## _matrix&); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
629 \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
630 if (v.ndims () > 2) \
21013
b9d4c3615e89 maint: Capitalize D for dimension in messages and comments.
Rik <rik@octave.org>
parents: 20945
diff changeset
631 error ("transpose not defined for N-D objects"); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
632 else \
14846
460a3c6d8bf1 maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
633 return octave_value (v.TYPE ## _array_value ().transpose ()); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
634 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
635 \
5829
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
636 DEFNCUNOP_METHOD (m_incr, TYPE ## _matrix, increment) \
9607
1be3c73ed7b5 reuse temporary arrays in nested expressions
Jaroslav Hajek <highegg@gmail.com>
parents: 9557
diff changeset
637 DEFNCUNOP_METHOD (m_decr, TYPE ## _matrix, decrement) \
1be3c73ed7b5 reuse temporary arrays in nested expressions
Jaroslav Hajek <highegg@gmail.com>
parents: 9557
diff changeset
638 DEFNCUNOP_METHOD (m_changesign, TYPE ## _matrix, changesign)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
639
20945
6eff66fb8a02 style fixes for comments
John W. Eaton <jwe@octave.org>
parents: 20856
diff changeset
640 // matrix by matrix ops.
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
641 #define OCTAVE_MM_INT_ARITH_OPS(PFX, T1, T2, T3) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
642 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
643 DEFINTNDBINOP_OP (PFX ## _add, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, +, T3) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
644 DEFINTNDBINOP_OP (PFX ## _sub, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, -, T3) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
645 \
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
646 /* 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
647 /* DEFBINOP_FN (PFX ## _div, T1 ## matrix, T2 ## matrix, xdiv) */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
648 \
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
649 DEFBINOPX (PFX ## _pow, T1 ## matrix, T2 ## matrix) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
650 { \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
651 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
652 } \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
653 \
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
654 /* DEFBINOP_FN (PFX ## _ldiv, T1 ## matrix, T2 ## matrix, xleftdiv) */ \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
655 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
656 DEFINTNDBINOP_FN (PFX ## _el_mul, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, product, T3, .*) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
657 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
658 DEFINTNDBINOP_FN (PFX ## _el_div, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, quotient, T3, ./) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
659 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
660 DEFINTNDBINOP_FN (PFX ## _el_pow, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, elem_xpow, T3, .^) \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
661 \
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
662 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
663 { \
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 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
665 \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
666 octave_value retval = octave_value (quotient (v2.T2 ## array_value (), v1.T1 ## array_value ())); \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
667 return retval; \
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
668 }
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
669
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
670 #define OCTAVE_MM_INT_CMP_OPS(PFX, T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
671 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
672 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
673 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
674 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
675 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
676 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
677
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
678 #define OCTAVE_MM_INT_BOOL_OPS(PFX, T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
679 DEFNDBINOP_FN (PFX ## _el_and, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_and) \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
680 DEFNDBINOP_FN (PFX ## _el_or, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_or) \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
681 DEFNDBINOP_FN (PFX ## _el_not_and, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_not_and) \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
682 DEFNDBINOP_FN (PFX ## _el_not_or, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_not_or) \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
683 DEFNDBINOP_FN (PFX ## _el_and_not, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_and_not) \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
684 DEFNDBINOP_FN (PFX ## _el_or_not, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, mx_el_or_not)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
685
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
686 #define OCTAVE_MM_INT_ASSIGN_OPS(PFX, TLHS, TRHS, TE) \
8679
280fae940bb0 optimize scalar indexing
Jaroslav Hajek <highegg@gmail.com>
parents: 8150
diff changeset
687 DEFNDASSIGNOP_FN (PFX ## _assign, TLHS ## matrix, TRHS ## matrix, TLHS ## array, assign)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
688
9546
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
689 #define OCTAVE_MM_INT_ASSIGNEQ_OPS(PFX, TM) \
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
690 DEFNDASSIGNOP_OP (PFX ## _assign_add, TM ## matrix, TM ## matrix, TM ## array, +=) \
9557
3a1dd361f978 optimize .*=, ./= operators
Jaroslav Hajek <highegg@gmail.com>
parents: 9546
diff changeset
691 DEFNDASSIGNOP_OP (PFX ## _assign_sub, TM ## matrix, TM ## matrix, TM ## array, -=) \
3a1dd361f978 optimize .*=, ./= operators
Jaroslav Hajek <highegg@gmail.com>
parents: 9546
diff changeset
692 DEFNDASSIGNOP_FNOP (PFX ## _assign_el_mul, TM ## matrix, TM ## matrix, TM ## array, product_eq) \
3a1dd361f978 optimize .*=, ./= operators
Jaroslav Hajek <highegg@gmail.com>
parents: 9546
diff changeset
693 DEFNDASSIGNOP_FNOP (PFX ## _assign_el_div, TM ## matrix, TM ## matrix, TM ## array, quotient_eq)
9546
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
694
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
695 #define OCTAVE_MM_POW_OPS(T1, T2) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
696 octave_value \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
697 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
698 { \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
699 dim_vector a_dims = a.dims (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
700 dim_vector b_dims = b.dims (); \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
701 if (a_dims != b_dims) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
702 { \
14056
c3d401562410 allow warning (or error) for automatic bsxfun
John W. Eaton <jwe@octave.org>
parents: 13012
diff changeset
703 if (is_valid_bsxfun ("operator .^", a_dims, b_dims)) \
21023
6176560b03d9 maint: Remove return stmts after gripe function calls.
Rik <rik@octave.org>
parents: 21013
diff changeset
704 return bsxfun_pow (a, b); \
13005
4061106b1c4b Enable automatic bsxfun for power operators
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11523
diff changeset
705 else \
21023
6176560b03d9 maint: Remove return stmts after gripe function calls.
Rik <rik@octave.org>
parents: 21013
diff changeset
706 gripe_nonconformant ("operator .^", a_dims, b_dims); \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
707 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
708 T1 ## NDArray result (a_dims); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
709 for (int i = 0; i < a.numel (); i++) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
710 { \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
711 OCTAVE_QUIT; \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
712 result (i) = pow (a(i), b(i)); \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
713 } \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
714 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
715 } \
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
716 \
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 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
718 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
719 { \
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
720 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
721 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
722 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
723 { \
14056
c3d401562410 allow warning (or error) for automatic bsxfun
John W. Eaton <jwe@octave.org>
parents: 13012
diff changeset
724 if (is_valid_bsxfun ("operator .^", a_dims, b_dims)) \
21023
6176560b03d9 maint: Remove return stmts after gripe function calls.
Rik <rik@octave.org>
parents: 21013
diff changeset
725 return bsxfun_pow (a, b); \
13005
4061106b1c4b Enable automatic bsxfun for power operators
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11523
diff changeset
726 else \
21023
6176560b03d9 maint: Remove return stmts after gripe function calls.
Rik <rik@octave.org>
parents: 21013
diff changeset
727 gripe_nonconformant ("operator .^", a_dims, b_dims); \
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
728 } \
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 T1 ## NDArray result (a_dims); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
730 for (int i = 0; i < a.numel (); i++) \
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
731 { \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
732 OCTAVE_QUIT; \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
733 result (i) = pow (a(i), b(i)); \
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
734 } \
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
735 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
736 } \
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
737 \
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
738 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
739 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
740 { \
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
741 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
742 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
743 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
744 { \
14056
c3d401562410 allow warning (or error) for automatic bsxfun
John W. Eaton <jwe@octave.org>
parents: 13012
diff changeset
745 if (is_valid_bsxfun ("operator .^", a_dims, b_dims)) \
21023
6176560b03d9 maint: Remove return stmts after gripe function calls.
Rik <rik@octave.org>
parents: 21013
diff changeset
746 return bsxfun_pow (a, b); \
13005
4061106b1c4b Enable automatic bsxfun for power operators
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11523
diff changeset
747 else \
21023
6176560b03d9 maint: Remove return stmts after gripe function calls.
Rik <rik@octave.org>
parents: 21013
diff changeset
748 gripe_nonconformant ("operator .^", a_dims, b_dims); \
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
749 } \
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
750 T2 ## NDArray result (a_dims); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
751 for (int i = 0; i < a.numel (); i++) \
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
752 { \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
753 OCTAVE_QUIT; \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
754 result (i) = pow (a(i), b(i)); \
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
755 } \
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
756 return octave_value (result); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
757 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
758 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
759 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
760 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
761 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
762 dim_vector a_dims = a.dims (); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
763 dim_vector b_dims = b.dims (); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
764 if (a_dims != b_dims) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
765 { \
14056
c3d401562410 allow warning (or error) for automatic bsxfun
John W. Eaton <jwe@octave.org>
parents: 13012
diff changeset
766 if (is_valid_bsxfun ("operator .^", a_dims, b_dims)) \
21023
6176560b03d9 maint: Remove return stmts after gripe function calls.
Rik <rik@octave.org>
parents: 21013
diff changeset
767 return bsxfun_pow (a, b); \
13005
4061106b1c4b Enable automatic bsxfun for power operators
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11523
diff changeset
768 else \
21023
6176560b03d9 maint: Remove return stmts after gripe function calls.
Rik <rik@octave.org>
parents: 21013
diff changeset
769 gripe_nonconformant ("operator .^", a_dims, b_dims); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
770 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
771 T1 ## NDArray result (a_dims); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
772 for (int i = 0; i < a.numel (); i++) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
773 { \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
774 OCTAVE_QUIT; \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
775 result (i) = powf (a(i), b(i)); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
776 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
777 return octave_value (result); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
778 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
779 \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
780 octave_value \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
781 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
782 { \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
783 dim_vector a_dims = a.dims (); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
784 dim_vector b_dims = b.dims (); \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
785 if (a_dims != b_dims) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
786 { \
14056
c3d401562410 allow warning (or error) for automatic bsxfun
John W. Eaton <jwe@octave.org>
parents: 13012
diff changeset
787 if (is_valid_bsxfun ("operator .^", a_dims, b_dims)) \
21023
6176560b03d9 maint: Remove return stmts after gripe function calls.
Rik <rik@octave.org>
parents: 21013
diff changeset
788 return bsxfun_pow (a, b); \
13005
4061106b1c4b Enable automatic bsxfun for power operators
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 11523
diff changeset
789 else \
21023
6176560b03d9 maint: Remove return stmts after gripe function calls.
Rik <rik@octave.org>
parents: 21013
diff changeset
790 gripe_nonconformant ("operator .^", a_dims, b_dims); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
791 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
792 T2 ## NDArray result (a_dims); \
20231
a9574e3c6e9e Deprecate Array::length() and Sparse::length() in favour of ::numel().
Carnë Draug <carandraug@octave.org>
parents: 19860
diff changeset
793 for (int i = 0; i < a.numel (); i++) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
794 { \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
795 OCTAVE_QUIT; \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
796 result (i) = powf (a(i), b(i)); \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
797 } \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
798 return octave_value (result); \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
799 }
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
800
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
801
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
802 #define OCTAVE_MM_CONV(T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
803 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
804 { \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
805 CAST_CONV_ARG (const octave_ ## T1 ## matrix&); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
806 \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
807 return new octave_ ## T2 ## matrix (v.T2 ## array_value ()); \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
808 }
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
809
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
810 #define OCTAVE_MM_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
811 OCTAVE_M_INT_UNOPS (TYPE) \
4952
bfd57b466752 [project @ 2004-09-01 00:49:05 by jwe]
jwe
parents: 4915
diff changeset
812 OCTAVE_MM_POW_OPS (TYPE, TYPE) \
8039
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
813 OCTAVE_MM_INT_ARITH_OPS (mm, TYPE ## _, TYPE ## _, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
814 OCTAVE_MM_INT_ARITH_OPS (mmx, TYPE ## _, , TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
815 OCTAVE_MM_INT_ARITH_OPS (mxm, , TYPE ## _, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
816 OCTAVE_MM_INT_ARITH_OPS (mmfx, TYPE ## _, float_, TYPE) \
cd90e2842080 Add additional integer math and conversion warnings, set their default state to be off and add the intwarning function
David Bateman <dbateman@free.fr>
parents: 7914
diff changeset
817 OCTAVE_MM_INT_ARITH_OPS (mfxm, float_, TYPE ## _, TYPE) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
818 OCTAVE_MM_INT_CMP_OPS (mm, TYPE ## _, TYPE ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
819 OCTAVE_MM_INT_CMP_OPS (mmx, TYPE ## _, ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
820 OCTAVE_MM_INT_CMP_OPS (mfxm, float_, TYPE ## _) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
821 OCTAVE_MM_INT_CMP_OPS (mmfx, TYPE ## _, float_) \
5038
fdfce0dec36b [project @ 2004-09-24 17:46:18 by jwe]
jwe
parents: 5030
diff changeset
822 OCTAVE_MM_INT_CMP_OPS (mxm, , TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
823 OCTAVE_MM_INT_BOOL_OPS (mm, TYPE ## _, TYPE ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
824 OCTAVE_MM_INT_BOOL_OPS (mmx, TYPE ## _, ) \
5038
fdfce0dec36b [project @ 2004-09-24 17:46:18 by jwe]
jwe
parents: 5030
diff changeset
825 OCTAVE_MM_INT_BOOL_OPS (mxm, , TYPE ## _) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
826 OCTAVE_MM_INT_BOOL_OPS (mmfx, TYPE ## _, float_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
827 OCTAVE_MM_INT_BOOL_OPS (mfxm, float_, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
828 OCTAVE_MM_INT_ASSIGN_OPS (mm, TYPE ## _, TYPE ## _, TYPE ## _) \
9546
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
829 OCTAVE_MM_INT_ASSIGNEQ_OPS (mme, TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
830 OCTAVE_MM_INT_ASSIGN_OPS (mmx, TYPE ## _, , ) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
831 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
832 OCTAVE_MM_CONV(TYPE ## _, complex_) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
833 OCTAVE_MM_CONV(TYPE ## _, float_complex_)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
834
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
835 #define OCTAVE_RE_INT_ASSIGN_OPS(TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
836 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
837 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
838
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
839 #define OCTAVE_FLT_RE_INT_ASSIGN_OPS(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
840 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
841 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
842
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
843 #define OCTAVE_CX_INT_ASSIGN_OPS(TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
844 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
845 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
846
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
847 #define OCTAVE_FLT_CX_INT_ASSIGN_OPS(TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
848 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
849 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
850
8150
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
851 #define OCTAVE_INT_NULL_ASSIGN_OPS(TYPE) \
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
852 DEFNULLASSIGNOP_FN (TYPE ## null_assign, TYPE ## _matrix, delete_elements)
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
853
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
854 #define OCTAVE_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
855 OCTAVE_SS_INT_OPS (TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
856 OCTAVE_SM_INT_OPS (TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
857 OCTAVE_MS_INT_OPS (TYPE) \
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
858 OCTAVE_MM_INT_OPS (TYPE) \
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
859 OCTAVE_CONCAT_FN (TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
860 OCTAVE_RE_INT_ASSIGN_OPS (TYPE) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
861 OCTAVE_FLT_RE_INT_ASSIGN_OPS (TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
862 OCTAVE_CX_INT_ASSIGN_OPS (TYPE) \
8150
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
863 OCTAVE_FLT_CX_INT_ASSIGN_OPS (TYPE) \
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
864 OCTAVE_INT_NULL_ASSIGN_OPS(TYPE)
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
865
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
866 #define OCTAVE_INSTALL_S_INT_UNOPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
867 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
868 INSTALL_UNOP (op_uplus, octave_ ## TYPE ## _scalar, s_uplus); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
869 INSTALL_UNOP (op_uminus, octave_ ## TYPE ## _scalar, s_uminus); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
870 INSTALL_UNOP (op_transpose, octave_ ## TYPE ## _scalar, s_transpose); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
871 INSTALL_UNOP (op_hermitian, octave_ ## TYPE ## _scalar, s_hermitian); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
872 \
5829
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
873 INSTALL_NCUNOP (op_incr, octave_ ## TYPE ## _scalar, s_incr); \
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
874 INSTALL_NCUNOP (op_decr, octave_ ## TYPE ## _scalar, s_decr);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
875
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
876 #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
877 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
878 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
879 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
880 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
881 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
882 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
883 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
884 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
885 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
886 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
887
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
888 #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
889 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
890 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
891 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
892 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
893 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
894 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
895
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
896 #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
897 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
898 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
899
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
900 #define OCTAVE_INSTALL_SS_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
901 OCTAVE_INSTALL_S_INT_UNOPS (TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
902 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ss, TYPE ## _, TYPE ## _) \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
903 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ssx, TYPE ## _, ) \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
904 OCTAVE_INSTALL_SS_INT_ARITH_OPS (sxs, , TYPE ## _) \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
905 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ssfx, TYPE ## _, float_) \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
906 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
907 OCTAVE_INSTALL_SS_INT_CMP_OPS (ss, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
908 OCTAVE_INSTALL_SS_INT_CMP_OPS (sx, TYPE ## _, ) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
909 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
910 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
911 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
912 OCTAVE_INSTALL_SS_INT_BOOL_OPS (ss, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
913 OCTAVE_INSTALL_SS_INT_BOOL_OPS (sx, TYPE ## _, ) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
914 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
915 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
916 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
917 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
918 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
919 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
920 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
921 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
922
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
923 #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
924 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
925 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
926 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
927 /* 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
928 /* 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
929 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
930 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
931 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
932 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
933 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
934
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
935 #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
936 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
937 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
938 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
939 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
940 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
941 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
942
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
943 #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
944 INSTALL_BINOP (op_el_and, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_and); \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
945 INSTALL_BINOP (op_el_or, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_or); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
946 INSTALL_BINOP (op_el_and_not, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_and_not); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
947 INSTALL_BINOP (op_el_or_not, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_or_not);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
948
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
949 #define OCTAVE_INSTALL_SM_INT_OPS(TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
950 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sm, TYPE ## _, TYPE ## _) \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
951 OCTAVE_INSTALL_SM_INT_ARITH_OPS (smx, TYPE ## _, ) \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
952 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sxm, , TYPE ## _) \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
953 OCTAVE_INSTALL_SM_INT_ARITH_OPS (smfx, TYPE ## _, float_) \
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
954 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
955 OCTAVE_INSTALL_SM_INT_CMP_OPS (sm, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
956 OCTAVE_INSTALL_SM_INT_CMP_OPS (xm, , TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
957 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
958 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
959 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
960 OCTAVE_INSTALL_SM_INT_BOOL_OPS (sm, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
961 OCTAVE_INSTALL_SM_INT_BOOL_OPS (xm, , TYPE ## _) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
962 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
963 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
964 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
965 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
966 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
967 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
968 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
969 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
970 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
971 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
972 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
973
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
974 #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
975 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
976 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
977 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
978 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
979 /* 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
980 /* 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
981 \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
982 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
983 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
984 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
985 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
986
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
987 #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
988 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
989 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
990 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
991 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
992 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
993 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
994
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
995 #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
996 INSTALL_BINOP (op_el_and, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _el_and); \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
997 INSTALL_BINOP (op_el_or, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _el_or); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
998 INSTALL_BINOP (op_el_not_and, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _el_not_and); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
999 INSTALL_BINOP (op_el_not_or, octave_ ## T1 ## matrix, octave_ ## T2 ## scalar, PFX ## _el_not_or);
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
1000
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
1001 #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
1002 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
1003
9546
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1004 #define OCTAVE_INSTALL_MS_INT_ASSIGNEQ_OPS(PFX, TLHS, TRHS) \
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1005 INSTALL_ASSIGNOP (op_add_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## scalar, PFX ## _assign_add) \
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1006 INSTALL_ASSIGNOP (op_sub_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## scalar, PFX ## _assign_sub) \
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1007 INSTALL_ASSIGNOP (op_mul_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## scalar, PFX ## _assign_mul) \
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1008 INSTALL_ASSIGNOP (op_div_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## scalar, PFX ## _assign_div)
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1009
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1010 #define OCTAVE_INSTALL_MS_INT_OPS(TYPE) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
1011 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
1012 OCTAVE_INSTALL_MS_INT_ARITH_OPS (msx, TYPE ## _, ) \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
1013 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
1014 OCTAVE_INSTALL_MS_INT_ARITH_OPS (msfx, TYPE ## _, float_) \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
1015 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
1016 OCTAVE_INSTALL_MS_INT_CMP_OPS (ms, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
1017 OCTAVE_INSTALL_MS_INT_CMP_OPS (mx, TYPE ## _, ) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1018 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
1019 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
1020 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
1021 OCTAVE_INSTALL_MS_INT_BOOL_OPS (ms, TYPE ## _, TYPE ## _) \
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
1022 OCTAVE_INSTALL_MS_INT_BOOL_OPS (mx, TYPE ## _, ) \
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1023 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
1024 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
1025 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
1026 OCTAVE_INSTALL_MS_INT_ASSIGN_OPS (ms, TYPE ## _, TYPE ## _) \
9546
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1027 OCTAVE_INSTALL_MS_INT_ASSIGNEQ_OPS (mse, TYPE ## _, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
1028 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
1029 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
1030 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
1031 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
1032
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1033 #define OCTAVE_INSTALL_M_INT_UNOPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1034 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
1035 INSTALL_UNOP (op_uplus, octave_ ## TYPE ## _matrix, m_uplus); \
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1036 INSTALL_UNOP (op_uminus, octave_ ## TYPE ## _matrix, m_uminus); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1037 INSTALL_UNOP (op_transpose, octave_ ## TYPE ## _matrix, m_transpose); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1038 INSTALL_UNOP (op_hermitian, octave_ ## TYPE ## _matrix, m_transpose); \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1039 \
5829
93785a1b0f97 [project @ 2006-05-23 18:34:10 by jwe]
jwe
parents: 5533
diff changeset
1040 INSTALL_NCUNOP (op_incr, octave_ ## TYPE ## _matrix, m_incr); \
9607
1be3c73ed7b5 reuse temporary arrays in nested expressions
Jaroslav Hajek <highegg@gmail.com>
parents: 9557
diff changeset
1041 INSTALL_NCUNOP (op_decr, octave_ ## TYPE ## _matrix, m_decr); \
1be3c73ed7b5 reuse temporary arrays in nested expressions
Jaroslav Hajek <highegg@gmail.com>
parents: 9557
diff changeset
1042 INSTALL_NCUNOP (op_uminus, octave_ ## TYPE ## _matrix, m_changesign);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1043
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
1044 #define OCTAVE_INSTALL_MM_INT_ARITH_OPS(PFX, T1, T2) \
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
1045 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
1046 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
1047 /* 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
1048 /* 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
1049 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
1050 /* 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
1051 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
1052 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
1053 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
1054 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
1055
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1056 #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
1057 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
1058 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
1059 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
1060 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
1061 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
1062 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
1063
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1064 #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
1065 INSTALL_BINOP (op_el_and, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_and); \
8982
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
1066 INSTALL_BINOP (op_el_or, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_or); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
1067 INSTALL_BINOP (op_el_not_and, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_not_and); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
1068 INSTALL_BINOP (op_el_not_or, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_not_or); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
1069 INSTALL_BINOP (op_el_and_not, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_and_not); \
dc6bda6f9994 implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
1070 INSTALL_BINOP (op_el_or_not, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _el_or_not);
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1071
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
1072 #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
1073 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
1074
9546
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1075 #define OCTAVE_INSTALL_MM_INT_ASSIGNEQ_OPS(PFX, TLHS, TRHS) \
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1076 INSTALL_ASSIGNOP (op_add_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## matrix, PFX ## _assign_add) \
9557
3a1dd361f978 optimize .*=, ./= operators
Jaroslav Hajek <highegg@gmail.com>
parents: 9546
diff changeset
1077 INSTALL_ASSIGNOP (op_sub_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## matrix, PFX ## _assign_sub) \
3a1dd361f978 optimize .*=, ./= operators
Jaroslav Hajek <highegg@gmail.com>
parents: 9546
diff changeset
1078 INSTALL_ASSIGNOP (op_el_mul_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## matrix, PFX ## _assign_el_mul) \
3a1dd361f978 optimize .*=, ./= operators
Jaroslav Hajek <highegg@gmail.com>
parents: 9546
diff changeset
1079 INSTALL_ASSIGNOP (op_el_div_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## matrix, PFX ## _assign_el_div)
9546
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1080
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1081 #define OCTAVE_INSTALL_MM_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1082 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
1083 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
1084 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mmx, TYPE ##_, ) \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
1085 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
1086 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mmfx, TYPE ##_, float_) \
9931
fb6b6fcafa62 untabify files in src/OPERATORS directory
John W. Eaton <jwe@octave.org>
parents: 9607
diff changeset
1087 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
1088 OCTAVE_INSTALL_MM_INT_CMP_OPS (mm, TYPE ## _, TYPE ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1089 OCTAVE_INSTALL_MM_INT_CMP_OPS (mmx, TYPE ## _, ) \
5038
fdfce0dec36b [project @ 2004-09-24 17:46:18 by jwe]
jwe
parents: 5030
diff changeset
1090 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
1091 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
1092 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
1093 OCTAVE_INSTALL_MM_INT_BOOL_OPS (mm, TYPE ## _, TYPE ## _) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1094 OCTAVE_INSTALL_MM_INT_BOOL_OPS (mmx, TYPE ## _, ) \
5038
fdfce0dec36b [project @ 2004-09-24 17:46:18 by jwe]
jwe
parents: 5030
diff changeset
1095 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
1096 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
1097 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
1098 OCTAVE_INSTALL_MM_INT_ASSIGN_OPS (mm, TYPE ## _, TYPE ## _) \
9546
1beb23d2b892 optimize op= in common cases
Jaroslav Hajek <highegg@gmail.com>
parents: 8982
diff changeset
1099 OCTAVE_INSTALL_MM_INT_ASSIGNEQ_OPS (mme, TYPE ## _, TYPE ## _) \
4953
7a3a480e8645 [project @ 2004-09-01 21:10:28 by jwe]
jwe
parents: 4952
diff changeset
1100 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
1101 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
1102 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
1103 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
1104 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
1105 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
1106
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1107 #define OCTAVE_INSTALL_RE_INT_ASSIGN_OPS(TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1108 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
1109 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
1110 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
1111 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
1112
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1113 #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
1114 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
1115 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
1116 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
1117 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
1118
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1119 #define OCTAVE_INSTALL_CX_INT_ASSIGN_OPS(TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1120 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
1121 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
1122 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
1123 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
1124
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1125 #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
1126 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
1127 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
1128 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
1129 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
1130
8150
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
1131 #define OCTAVE_INSTALL_INT_NULL_ASSIGN_OPS(TYPE) \
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
1132 INSTALL_ASSIGNOP (op_asn_eq, octave_ ## TYPE ## _matrix, octave_null_matrix, TYPE ## null_assign) \
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
1133 INSTALL_ASSIGNOP (op_asn_eq, octave_ ## TYPE ## _matrix, octave_null_str, TYPE ## null_assign) \
18212
cda4bd2fd0c0 fix null matrix assignment to indexed integer and logical values (bug #35921)
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
1134 INSTALL_ASSIGNOP (op_asn_eq, octave_ ## TYPE ## _matrix, octave_null_sq_str, TYPE ## null_assign) \
cda4bd2fd0c0 fix null matrix assignment to indexed integer and logical values (bug #35921)
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
1135 INSTALL_ASSIGNCONV (octave_ ## TYPE ## _scalar, octave_null_matrix, octave_ ## TYPE ## _matrix) \
cda4bd2fd0c0 fix null matrix assignment to indexed integer and logical values (bug #35921)
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
1136 INSTALL_ASSIGNCONV (octave_## TYPE ## _scalar, octave_null_str, octave_ ## TYPE ## _matrix) \
cda4bd2fd0c0 fix null matrix assignment to indexed integer and logical values (bug #35921)
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
1137 INSTALL_ASSIGNCONV (octave_## TYPE ## _scalar, octave_null_sq_str, octave_ ## TYPE ## _matrix)
8150
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
1138
4905
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1139 #define OCTAVE_INSTALL_INT_OPS(TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1140 OCTAVE_INSTALL_SS_INT_OPS (TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1141 OCTAVE_INSTALL_SM_INT_OPS (TYPE) \
f7a337f3fd9e [project @ 2004-06-17 04:11:50 by jwe]
jwe
parents:
diff changeset
1142 OCTAVE_INSTALL_MS_INT_OPS (TYPE) \
4915
c638c144d4da [project @ 2004-07-23 19:01:22 by jwe]
jwe
parents: 4905
diff changeset
1143 OCTAVE_INSTALL_MM_INT_OPS (TYPE) \
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1144 OCTAVE_INSTALL_CONCAT_FN (TYPE) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1145 OCTAVE_INSTALL_RE_INT_ASSIGN_OPS (TYPE) \
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1146 OCTAVE_INSTALL_FLT_RE_INT_ASSIGN_OPS (TYPE) \
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7625
diff changeset
1147 OCTAVE_INSTALL_CX_INT_ASSIGN_OPS (TYPE) \
8150
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
1148 OCTAVE_INSTALL_FLT_CX_INT_ASSIGN_OPS (TYPE) \
283989f2da9b make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents: 8039
diff changeset
1149 OCTAVE_INSTALL_INT_NULL_ASSIGN_OPS(TYPE)
4963
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1150
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1151 #define OCTAVE_INSTALL_SM_INT_ASSIGNCONV(TLHS, TRHS) \
573d23f9c9cf [project @ 2004-09-03 15:43:29 by jwe]
jwe
parents: 4953
diff changeset
1152 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
1153 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
1154
4964
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1155 #define OCTAVE_MIXED_INT_CMP_OPS(T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1156 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
1157 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
1158 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
1159 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
1160
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1161 #define OCTAVE_INSTALL_MIXED_INT_CMP_OPS(T1, T2) \
269c3d6c0569 [project @ 2004-09-04 01:16:28 by jwe]
jwe
parents: 4963
diff changeset
1162 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
1163 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
1164 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
1165 OCTAVE_INSTALL_MM_INT_CMP_OPS (T1 ## _ ## T2 ## _mm, T1 ## _, T2 ## _)