comparison libinterp/operators/op-int.h @ 21649:0822917dfcf5

* ops.h, op-int.h: Style fixes.
author John W. Eaton <jwe@octave.org>
date Wed, 27 Apr 2016 17:17:00 -0400
parents 66cae7a6dc47
children 278fc29b69ca
comparison
equal deleted inserted replaced
21648:1eabc3e24a53 21649:0822917dfcf5
28 #include "quit.h" 28 #include "quit.h"
29 #include "bsxfun.h" 29 #include "bsxfun.h"
30 30
31 #define DEFINTBINOP_OP(name, t1, t2, op, t3) \ 31 #define DEFINTBINOP_OP(name, t1, t2, op, t3) \
32 static octave_value \ 32 static octave_value \
33 CONCAT2(oct_binop_, name) (const octave_base_value& a1, const octave_base_value& a2) \ 33 CONCAT2 (oct_binop_, name) (const octave_base_value& a1, \
34 const octave_base_value& a2) \
34 { \ 35 { \
35 const octave_ ## t1& v1 = dynamic_cast<const octave_ ## t1&> (a1); \ 36 const octave_ ## t1& v1 = dynamic_cast<const octave_ ## t1&> (a1); \
36 const octave_ ## t2& v2 = dynamic_cast<const octave_ ## t2&> (a2); \ 37 const octave_ ## t2& v2 = dynamic_cast<const octave_ ## t2&> (a2); \
37 octave_value retval = octave_value \ 38 octave_value retval = octave_value \
38 (v1.t1 ## _value () op v2.t2 ## _value ()); \ 39 (v1.t1 ## _value () op v2.t2 ## _value ()); \
39 return retval; \ 40 return retval; \
40 } 41 }
41 42
42 #define DEFINTNDBINOP_OP(name, t1, t2, e1, e2, op, t3) \ 43 #define DEFINTNDBINOP_OP(name, t1, t2, e1, e2, op, t3) \
43 static octave_value \ 44 static octave_value \
44 CONCAT2(oct_binop_, name) (const octave_base_value& a1, const octave_base_value& a2) \ 45 CONCAT2 (oct_binop_, name) (const octave_base_value& a1, \
46 const octave_base_value& a2) \
45 { \ 47 { \
46 const octave_ ## t1& v1 = dynamic_cast<const octave_ ## t1&> (a1); \ 48 const octave_ ## t1& v1 = dynamic_cast<const octave_ ## t1&> (a1); \
47 const octave_ ## t2& v2 = dynamic_cast<const octave_ ## t2&> (a2); \ 49 const octave_ ## t2& v2 = dynamic_cast<const octave_ ## t2&> (a2); \
48 octave_value retval = octave_value \ 50 octave_value retval = octave_value \
49 (v1.e1 ## _value () op v2.e2 ## _value ()); \ 51 (v1.e1 ## _value () op v2.e2 ## _value ()); \
50 return retval; \ 52 return retval; \
51 } 53 }
52 54
53 #define DEFINTBINOP_FN(name, t1, t2, f, t3, op) \ 55 #define DEFINTBINOP_FN(name, t1, t2, f, t3, op) \
54 static octave_value \ 56 static octave_value \
55 CONCAT2(oct_binop_, name) (const octave_base_value& a1, const octave_base_value& a2) \ 57 CONCAT2 (oct_binop_, name) (const octave_base_value& a1, \
58 const octave_base_value& a2) \
56 { \ 59 { \
57 const octave_ ## t1& v1 = dynamic_cast<const octave_ ## t1&> (a1); \ 60 const octave_ ## t1& v1 = dynamic_cast<const octave_ ## t1&> (a1); \
58 const octave_ ## t2& v2 = dynamic_cast<const octave_ ## t2&> (a2); \ 61 const octave_ ## t2& v2 = dynamic_cast<const octave_ ## t2&> (a2); \
59 octave_value retval = octave_value (f (v1.t1 ## _value (), v2.t2 ## _value ())); \ 62 octave_value retval = octave_value (f (v1.t1 ## _value (), v2.t2 ## _value ())); \
60 return retval; \ 63 return retval; \
61 } 64 }
62 65
63 #define DEFINTNDBINOP_FN(name, t1, t2, e1, e2, f, t3, op) \ 66 #define DEFINTNDBINOP_FN(name, t1, t2, e1, e2, f, t3, op) \
64 static octave_value \ 67 static octave_value \
65 CONCAT2(oct_binop_, name) (const octave_base_value& a1, const octave_base_value& a2) \ 68 CONCAT2 (oct_binop_, name) (const octave_base_value& a1, \
69 const octave_base_value& a2) \
66 { \ 70 { \
67 const octave_ ## t1& v1 = dynamic_cast<const octave_ ## t1&> (a1); \ 71 const octave_ ## t1& v1 = dynamic_cast<const octave_ ## t1&> (a1); \
68 const octave_ ## t2& v2 = dynamic_cast<const octave_ ## t2&> (a2); \ 72 const octave_ ## t2& v2 = dynamic_cast<const octave_ ## t2&> (a2); \
69 octave_value retval = octave_value (f (v1.e1 ## _value (), v2.e2 ## _value ())); \ 73 octave_value retval = octave_value (f (v1.e1 ## _value (), v2.e2 ## _value ())); \
70 return retval; \ 74 return retval; \
181 \ 185 \
182 DEFNCUNOP_METHOD (s_incr, TYPE ## _scalar, increment) \ 186 DEFNCUNOP_METHOD (s_incr, TYPE ## _scalar, increment) \
183 DEFNCUNOP_METHOD (s_decr, TYPE ## _scalar, decrement) 187 DEFNCUNOP_METHOD (s_decr, TYPE ## _scalar, decrement)
184 188
185 // scalar by scalar ops. 189 // scalar by scalar ops.
186 #define OCTAVE_SS_INT_ARITH_OPS(PFX, T1, T2, T3) \ 190 #define OCTAVE_SS_INT_ARITH_OPS(PFX, T1, T2, T3) \
187 \ 191 \
188 DEFINTBINOP_OP (PFX ## _add, T1 ## scalar, T2 ## scalar, +, T3) \ 192 DEFINTBINOP_OP (PFX ## _add, T1 ## scalar, T2 ## scalar, +, T3) \
189 DEFINTBINOP_OP (PFX ## _sub, T1 ## scalar, T2 ## scalar, -, T3) \ 193 DEFINTBINOP_OP (PFX ## _sub, T1 ## scalar, T2 ## scalar, -, T3) \
190 DEFINTBINOP_OP (PFX ## _mul, T1 ## scalar, T2 ## scalar, *, T3) \ 194 DEFINTBINOP_OP (PFX ## _mul, T1 ## scalar, T2 ## scalar, *, T3) \
191 \ 195 \
213 \ 217 \
214 octave_value retval = octave_value (v2.T2 ## scalar_value () / v1.T1 ## scalar_value ()); \ 218 octave_value retval = octave_value (v2.T2 ## scalar_value () / v1.T1 ## scalar_value ()); \
215 return retval; \ 219 return retval; \
216 } \ 220 } \
217 \ 221 \
218 DEFINTBINOP_OP (PFX ## _el_mul, T1 ## scalar, T2 ## scalar, *, T3) \ 222 DEFINTBINOP_OP (PFX ## _el_mul, T1 ## scalar, T2 ## scalar, *, T3) \
219 \ 223 \
220 DEFBINOP (PFX ## _el_div, T1 ## scalar, T2 ## scalar) \ 224 DEFBINOP (PFX ## _el_div, T1 ## scalar, T2 ## scalar) \
221 { \ 225 { \
222 const octave_ ## T1 ## scalar& v1 = dynamic_cast<const octave_ ## T1 ## scalar&> (a1); \ 226 const octave_ ## T1 ## scalar& v1 = dynamic_cast<const octave_ ## T1 ## scalar&> (a1); \
223 const octave_ ## T2 ## scalar& v2 = dynamic_cast<const octave_ ## T2 ## scalar&> (a2); \ 227 const octave_ ## T2 ## scalar& v2 = dynamic_cast<const octave_ ## T2 ## scalar&> (a2); \
529 \ 533 \
530 DEFBINOP (PFX ## _el_ldiv, TM ## matrix, TS ## scalar) \ 534 DEFBINOP (PFX ## _el_ldiv, TM ## matrix, TS ## scalar) \
531 { \ 535 { \
532 const octave_ ## TM ## matrix& v1 = dynamic_cast<const octave_ ## TM ## matrix&> (a1); \ 536 const octave_ ## TM ## matrix& v1 = dynamic_cast<const octave_ ## TM ## matrix&> (a1); \
533 const octave_ ## TS ## scalar& v2 = dynamic_cast<const octave_ ## TS ## scalar&> (a2); \ 537 const octave_ ## TS ## scalar& v2 = dynamic_cast<const octave_ ## TS ## scalar&> (a2); \
534 \ 538 \
535 octave_value retval = v2.TS ## scalar_value () / v1.TM ## array_value (); \ 539 octave_value retval = v2.TS ## scalar_value () / v1.TM ## array_value (); \
536 return retval; \ 540 return retval; \
537 } 541 }
538 542
539 #define OCTAVE_MS_INT_CMP_OPS(PFX, TM, TS) \ 543 #define OCTAVE_MS_INT_CMP_OPS(PFX, TM, TS) \
564 { \ 568 { \
565 T1 ## NDArray result (a.dims ()); \ 569 T1 ## NDArray result (a.dims ()); \
566 for (int i = 0; i < a.numel (); i++) \ 570 for (int i = 0; i < a.numel (); i++) \
567 { \ 571 { \
568 OCTAVE_QUIT; \ 572 OCTAVE_QUIT; \
569 result (i) = pow (a(i), b); \ 573 result (i) = pow (a(i), b); \
570 } \ 574 } \
571 return octave_value (result); \ 575 return octave_value (result); \
572 } \ 576 } \
573 \ 577 \
574 octave_value elem_xpow (T1 ## NDArray a, double b) \ 578 octave_value elem_xpow (T1 ## NDArray a, double b) \
575 { \ 579 { \
576 T1 ## NDArray result (a.dims ()); \ 580 T1 ## NDArray result (a.dims ()); \
577 for (int i = 0; i < a.numel (); i++) \ 581 for (int i = 0; i < a.numel (); i++) \
578 { \ 582 { \
579 OCTAVE_QUIT; \ 583 OCTAVE_QUIT; \
580 result (i) = pow (a(i), b); \ 584 result (i) = pow (a(i), b); \
581 } \ 585 } \
582 return octave_value (result); \ 586 return octave_value (result); \
583 } \ 587 } \
584 \ 588 \
585 octave_value elem_xpow (NDArray a, octave_ ## T2 b) \ 589 octave_value elem_xpow (NDArray a, octave_ ## T2 b) \
586 { \ 590 { \
587 T2 ## NDArray result (a.dims ()); \ 591 T2 ## NDArray result (a.dims ()); \
588 for (int i = 0; i < a.numel (); i++) \ 592 for (int i = 0; i < a.numel (); i++) \
589 { \ 593 { \
590 OCTAVE_QUIT; \ 594 OCTAVE_QUIT; \
591 result (i) = pow (a(i), b); \ 595 result (i) = pow (a(i), b); \
592 } \ 596 } \
593 return octave_value (result); \ 597 return octave_value (result); \
594 } \ 598 } \
595 \ 599 \
596 octave_value elem_xpow (T1 ## NDArray a, float b) \ 600 octave_value elem_xpow (T1 ## NDArray a, float b) \
597 { \ 601 { \
598 T1 ## NDArray result (a.dims ()); \ 602 T1 ## NDArray result (a.dims ()); \
599 for (int i = 0; i < a.numel (); i++) \ 603 for (int i = 0; i < a.numel (); i++) \
600 { \ 604 { \
601 OCTAVE_QUIT; \ 605 OCTAVE_QUIT; \
602 result (i) = powf (a(i), b); \ 606 result (i) = powf (a(i), b); \
603 } \ 607 } \
604 return octave_value (result); \ 608 return octave_value (result); \
605 } \ 609 } \
606 \ 610 \
607 octave_value elem_xpow (FloatNDArray a, octave_ ## T2 b) \ 611 octave_value elem_xpow (FloatNDArray a, octave_ ## T2 b) \
608 { \ 612 { \
609 T2 ## NDArray result (a.dims ()); \ 613 T2 ## NDArray result (a.dims ()); \
610 for (int i = 0; i < a.numel (); i++) \ 614 for (int i = 0; i < a.numel (); i++) \
611 { \ 615 { \
612 OCTAVE_QUIT; \ 616 OCTAVE_QUIT; \
613 result (i) = powf (a(i), b); \ 617 result (i) = powf (a(i), b); \
614 } \ 618 } \
615 return octave_value (result); \ 619 return octave_value (result); \
616 } 620 }
617 621
618 622
663 DEFNCUNOP_METHOD (m_incr, TYPE ## _matrix, increment) \ 667 DEFNCUNOP_METHOD (m_incr, TYPE ## _matrix, increment) \
664 DEFNCUNOP_METHOD (m_decr, TYPE ## _matrix, decrement) \ 668 DEFNCUNOP_METHOD (m_decr, TYPE ## _matrix, decrement) \
665 DEFNCUNOP_METHOD (m_changesign, TYPE ## _matrix, changesign) 669 DEFNCUNOP_METHOD (m_changesign, TYPE ## _matrix, changesign)
666 670
667 // matrix by matrix ops. 671 // matrix by matrix ops.
668 #define OCTAVE_MM_INT_ARITH_OPS(PFX, T1, T2, T3) \ 672 #define OCTAVE_MM_INT_ARITH_OPS(PFX, T1, T2, T3) \
669 \ 673 \
670 DEFINTNDBINOP_OP (PFX ## _add, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, +, T3) \ 674 DEFINTNDBINOP_OP (PFX ## _add, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, +, T3) \
671 DEFINTNDBINOP_OP (PFX ## _sub, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, -, T3) \ 675 DEFINTNDBINOP_OP (PFX ## _sub, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, -, T3) \
672 \ 676 \
673 /* DEFBINOP_OP (PFX ## _mul, T1 ## matrix, T2 ## matrix, *) */ \ 677 /* DEFBINOP_OP (PFX ## _mul, T1 ## matrix, T2 ## matrix, *) */ \
688 \ 692 \
689 DEFBINOP (PFX ## _el_ldiv, T1 ## matrix, T2 ## matrix) \ 693 DEFBINOP (PFX ## _el_ldiv, T1 ## matrix, T2 ## matrix) \
690 { \ 694 { \
691 const octave_ ## T1 ## matrix& v1 = dynamic_cast<const octave_ ## T1 ## matrix&> (a1); \ 695 const octave_ ## T1 ## matrix& v1 = dynamic_cast<const octave_ ## T1 ## matrix&> (a1); \
692 const octave_ ## T2 ## matrix& v2 = dynamic_cast<const octave_ ## T2 ## matrix&> (a2); \ 696 const octave_ ## T2 ## matrix& v2 = dynamic_cast<const octave_ ## T2 ## matrix&> (a2); \
693 \ 697 \
694 octave_value retval = octave_value (quotient (v2.T2 ## array_value (), v1.T1 ## array_value ())); \ 698 octave_value retval = octave_value (quotient (v2.T2 ## array_value (), v1.T1 ## array_value ())); \
695 return retval; \ 699 return retval; \
696 } 700 }
697 701
698 #define OCTAVE_MM_INT_CMP_OPS(PFX, T1, T2) \ 702 #define OCTAVE_MM_INT_CMP_OPS(PFX, T1, T2) \
727 dim_vector a_dims = a.dims (); \ 731 dim_vector a_dims = a.dims (); \
728 dim_vector b_dims = b.dims (); \ 732 dim_vector b_dims = b.dims (); \
729 if (a_dims != b_dims) \ 733 if (a_dims != b_dims) \
730 { \ 734 { \
731 if (! is_valid_bsxfun ("operator .^", a_dims, b_dims)) \ 735 if (! is_valid_bsxfun ("operator .^", a_dims, b_dims)) \
732 err_nonconformant ("operator .^", a_dims, b_dims); \ 736 err_nonconformant ("operator .^", a_dims, b_dims); \
733 \ 737 \
734 return bsxfun_pow (a, b); \ 738 return bsxfun_pow (a, b); \
735 } \ 739 } \
736 T1 ## NDArray result (a_dims); \ 740 T1 ## NDArray result (a_dims); \
737 for (int i = 0; i < a.numel (); i++) \ 741 for (int i = 0; i < a.numel (); i++) \
748 dim_vector a_dims = a.dims (); \ 752 dim_vector a_dims = a.dims (); \
749 dim_vector b_dims = b.dims (); \ 753 dim_vector b_dims = b.dims (); \
750 if (a_dims != b_dims) \ 754 if (a_dims != b_dims) \
751 { \ 755 { \
752 if (! is_valid_bsxfun ("operator .^", a_dims, b_dims)) \ 756 if (! is_valid_bsxfun ("operator .^", a_dims, b_dims)) \
753 err_nonconformant ("operator .^", a_dims, b_dims); \ 757 err_nonconformant ("operator .^", a_dims, b_dims); \
754 \ 758 \
755 return bsxfun_pow (a, b); \ 759 return bsxfun_pow (a, b); \
756 } \ 760 } \
757 T1 ## NDArray result (a_dims); \ 761 T1 ## NDArray result (a_dims); \
758 for (int i = 0; i < a.numel (); i++) \ 762 for (int i = 0; i < a.numel (); i++) \
926 INSTALL_BINOP (op_el_or, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _el_or); 930 INSTALL_BINOP (op_el_or, octave_ ## T1 ## scalar, octave_ ## T2 ## scalar, PFX ## _el_or);
927 931
928 #define OCTAVE_INSTALL_SS_INT_OPS(TYPE) \ 932 #define OCTAVE_INSTALL_SS_INT_OPS(TYPE) \
929 OCTAVE_INSTALL_S_INT_UNOPS (TYPE) \ 933 OCTAVE_INSTALL_S_INT_UNOPS (TYPE) \
930 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ss, TYPE ## _, TYPE ## _) \ 934 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ss, TYPE ## _, TYPE ## _) \
931 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ssx, TYPE ## _, ) \ 935 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ssx, TYPE ## _, ) \
932 OCTAVE_INSTALL_SS_INT_ARITH_OPS (sxs, , TYPE ## _) \ 936 OCTAVE_INSTALL_SS_INT_ARITH_OPS (sxs, , TYPE ## _) \
933 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ssfx, TYPE ## _, float_) \ 937 OCTAVE_INSTALL_SS_INT_ARITH_OPS (ssfx, TYPE ## _, float_) \
934 OCTAVE_INSTALL_SS_INT_ARITH_OPS (sfxs, float_, TYPE ## _) \ 938 OCTAVE_INSTALL_SS_INT_ARITH_OPS (sfxs, float_, TYPE ## _) \
935 OCTAVE_INSTALL_SS_INT_CMP_OPS (ss, TYPE ## _, TYPE ## _) \ 939 OCTAVE_INSTALL_SS_INT_CMP_OPS (ss, TYPE ## _, TYPE ## _) \
936 OCTAVE_INSTALL_SS_INT_CMP_OPS (sx, TYPE ## _, ) \ 940 OCTAVE_INSTALL_SS_INT_CMP_OPS (sx, TYPE ## _, ) \
937 OCTAVE_INSTALL_SS_INT_CMP_OPS (xs, , TYPE ## _) \ 941 OCTAVE_INSTALL_SS_INT_CMP_OPS (xs, , TYPE ## _) \
938 OCTAVE_INSTALL_SS_INT_CMP_OPS (sfx, TYPE ## _, float_) \ 942 OCTAVE_INSTALL_SS_INT_CMP_OPS (sfx, TYPE ## _, float_) \
939 OCTAVE_INSTALL_SS_INT_CMP_OPS (fxs, float_, TYPE ## _) \ 943 OCTAVE_INSTALL_SS_INT_CMP_OPS (fxs, float_, TYPE ## _) \
974 INSTALL_BINOP (op_el_and_not, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_and_not); \ 978 INSTALL_BINOP (op_el_and_not, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_and_not); \
975 INSTALL_BINOP (op_el_or_not, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_or_not); 979 INSTALL_BINOP (op_el_or_not, octave_ ## T1 ## scalar, octave_ ## T2 ## matrix, PFX ## _el_or_not);
976 980
977 #define OCTAVE_INSTALL_SM_INT_OPS(TYPE) \ 981 #define OCTAVE_INSTALL_SM_INT_OPS(TYPE) \
978 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sm, TYPE ## _, TYPE ## _) \ 982 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sm, TYPE ## _, TYPE ## _) \
979 OCTAVE_INSTALL_SM_INT_ARITH_OPS (smx, TYPE ## _, ) \ 983 OCTAVE_INSTALL_SM_INT_ARITH_OPS (smx, TYPE ## _, ) \
980 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sxm, , TYPE ## _) \ 984 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sxm, , TYPE ## _) \
981 OCTAVE_INSTALL_SM_INT_ARITH_OPS (smfx, TYPE ## _, float_) \ 985 OCTAVE_INSTALL_SM_INT_ARITH_OPS (smfx, TYPE ## _, float_) \
982 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sfxm, float_, TYPE ## _) \ 986 OCTAVE_INSTALL_SM_INT_ARITH_OPS (sfxm, float_, TYPE ## _) \
983 OCTAVE_INSTALL_SM_INT_CMP_OPS (sm, TYPE ## _, TYPE ## _) \ 987 OCTAVE_INSTALL_SM_INT_CMP_OPS (sm, TYPE ## _, TYPE ## _) \
984 OCTAVE_INSTALL_SM_INT_CMP_OPS (xm, , TYPE ## _) \ 988 OCTAVE_INSTALL_SM_INT_CMP_OPS (xm, , TYPE ## _) \
985 OCTAVE_INSTALL_SM_INT_CMP_OPS (smx, TYPE ## _, ) \ 989 OCTAVE_INSTALL_SM_INT_CMP_OPS (smx, TYPE ## _, ) \
986 OCTAVE_INSTALL_SM_INT_CMP_OPS (fxm, float_, TYPE ## _) \ 990 OCTAVE_INSTALL_SM_INT_CMP_OPS (fxm, float_, TYPE ## _) \
987 OCTAVE_INSTALL_SM_INT_CMP_OPS (smfx, TYPE ## _, float_) \ 991 OCTAVE_INSTALL_SM_INT_CMP_OPS (smfx, TYPE ## _, float_) \
1036 INSTALL_ASSIGNOP (op_div_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## scalar, PFX ## _assign_div) 1040 INSTALL_ASSIGNOP (op_div_eq, octave_ ## TLHS ## matrix, octave_ ## TRHS ## scalar, PFX ## _assign_div)
1037 1041
1038 #define OCTAVE_INSTALL_MS_INT_OPS(TYPE) \ 1042 #define OCTAVE_INSTALL_MS_INT_OPS(TYPE) \
1039 OCTAVE_INSTALL_MS_INT_ARITH_OPS (ms, TYPE ## _, TYPE ## _) \ 1043 OCTAVE_INSTALL_MS_INT_ARITH_OPS (ms, TYPE ## _, TYPE ## _) \
1040 OCTAVE_INSTALL_MS_INT_ARITH_OPS (msx, TYPE ## _, ) \ 1044 OCTAVE_INSTALL_MS_INT_ARITH_OPS (msx, TYPE ## _, ) \
1041 OCTAVE_INSTALL_MS_INT_ARITH_OPS (mxs, , TYPE ## _) \ 1045 OCTAVE_INSTALL_MS_INT_ARITH_OPS (mxs, , TYPE ## _) \
1042 OCTAVE_INSTALL_MS_INT_ARITH_OPS (msfx, TYPE ## _, float_) \ 1046 OCTAVE_INSTALL_MS_INT_ARITH_OPS (msfx, TYPE ## _, float_) \
1043 OCTAVE_INSTALL_MS_INT_ARITH_OPS (mfxs, float_, TYPE ## _) \ 1047 OCTAVE_INSTALL_MS_INT_ARITH_OPS (mfxs, float_, TYPE ## _) \
1044 OCTAVE_INSTALL_MS_INT_CMP_OPS (ms, TYPE ## _, TYPE ## _) \ 1048 OCTAVE_INSTALL_MS_INT_CMP_OPS (ms, TYPE ## _, TYPE ## _) \
1045 OCTAVE_INSTALL_MS_INT_CMP_OPS (mx, TYPE ## _, ) \ 1049 OCTAVE_INSTALL_MS_INT_CMP_OPS (mx, TYPE ## _, ) \
1046 OCTAVE_INSTALL_MS_INT_CMP_OPS (mxs, , TYPE ## _) \ 1050 OCTAVE_INSTALL_MS_INT_CMP_OPS (mxs, , TYPE ## _) \
1047 OCTAVE_INSTALL_MS_INT_CMP_OPS (mfx, TYPE ## _, float_) \ 1051 OCTAVE_INSTALL_MS_INT_CMP_OPS (mfx, TYPE ## _, float_) \
1048 OCTAVE_INSTALL_MS_INT_CMP_OPS (mfxs, float_, TYPE ## _) \ 1052 OCTAVE_INSTALL_MS_INT_CMP_OPS (mfxs, float_, TYPE ## _) \
1067 \ 1071 \
1068 INSTALL_NCUNOP (op_incr, octave_ ## TYPE ## _matrix, m_incr); \ 1072 INSTALL_NCUNOP (op_incr, octave_ ## TYPE ## _matrix, m_incr); \
1069 INSTALL_NCUNOP (op_decr, octave_ ## TYPE ## _matrix, m_decr); \ 1073 INSTALL_NCUNOP (op_decr, octave_ ## TYPE ## _matrix, m_decr); \
1070 INSTALL_NCUNOP (op_uminus, octave_ ## TYPE ## _matrix, m_changesign); 1074 INSTALL_NCUNOP (op_uminus, octave_ ## TYPE ## _matrix, m_changesign);
1071 1075
1072 #define OCTAVE_INSTALL_MM_INT_ARITH_OPS(PFX, T1, T2) \ 1076 #define OCTAVE_INSTALL_MM_INT_ARITH_OPS(PFX, T1, T2) \
1073 INSTALL_BINOP (op_add, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _add); \ 1077 INSTALL_BINOP (op_add, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _add); \
1074 INSTALL_BINOP (op_sub, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _sub); \ 1078 INSTALL_BINOP (op_sub, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _sub); \
1075 /* INSTALL_BINOP (op_mul, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _mul); */ \ 1079 /* INSTALL_BINOP (op_mul, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _mul); */ \
1076 /* INSTALL_BINOP (op_div, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _div); */ \ 1080 /* INSTALL_BINOP (op_div, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _div); */ \
1077 INSTALL_BINOP (op_pow, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _pow); \ 1081 INSTALL_BINOP (op_pow, octave_ ## T1 ## matrix, octave_ ## T2 ## matrix, PFX ## _pow); \
1108 1112
1109 #define OCTAVE_INSTALL_MM_INT_OPS(TYPE) \ 1113 #define OCTAVE_INSTALL_MM_INT_OPS(TYPE) \
1110 OCTAVE_INSTALL_M_INT_UNOPS (TYPE) \ 1114 OCTAVE_INSTALL_M_INT_UNOPS (TYPE) \
1111 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mm, TYPE ##_, TYPE ## _) \ 1115 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mm, TYPE ##_, TYPE ## _) \
1112 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mmx, TYPE ##_, ) \ 1116 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mmx, TYPE ##_, ) \
1113 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mxm, , TYPE ##_) \ 1117 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mxm, , TYPE ##_) \
1114 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mmfx, TYPE ##_, float_) \ 1118 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mmfx, TYPE ##_, float_) \
1115 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mfxm, float_, TYPE ##_) \ 1119 OCTAVE_INSTALL_MM_INT_ARITH_OPS (mfxm, float_, TYPE ##_) \
1116 OCTAVE_INSTALL_MM_INT_CMP_OPS (mm, TYPE ## _, TYPE ## _) \ 1120 OCTAVE_INSTALL_MM_INT_CMP_OPS (mm, TYPE ## _, TYPE ## _) \
1117 OCTAVE_INSTALL_MM_INT_CMP_OPS (mmx, TYPE ## _, ) \ 1121 OCTAVE_INSTALL_MM_INT_CMP_OPS (mmx, TYPE ## _, ) \
1118 OCTAVE_INSTALL_MM_INT_CMP_OPS (mxm, , TYPE ## _) \ 1122 OCTAVE_INSTALL_MM_INT_CMP_OPS (mxm, , TYPE ## _) \
1119 OCTAVE_INSTALL_MM_INT_CMP_OPS (mmfx, TYPE ## _, float_) \ 1123 OCTAVE_INSTALL_MM_INT_CMP_OPS (mmfx, TYPE ## _, float_) \
1120 OCTAVE_INSTALL_MM_INT_CMP_OPS (mfxm, float_, TYPE ## _) \ 1124 OCTAVE_INSTALL_MM_INT_CMP_OPS (mfxm, float_, TYPE ## _) \