comparison libinterp/operators/op-int.h @ 20946:6eff66fb8a02

style fixes for comments * find-dialog.cc, find-dialog.h, display.cc, error.cc, gl-render.cc, graphics.cc, graphics.in.h, max.cc, oct-handle.h, oct-obj.h, oct-stream.cc, oct.h, pr-output.cc, profiler.cc, str2double.cc, symtab.cc, toplev.cc, toplev.h, xgl2ps.c, zfstream.cc, zfstream.h, __glpk__.cc, audiodevinfo.cc, colamd.cc, symbfact.cc, ov-classdef.cc, ov-classdef.h, ov-java.cc, op-int.h, pt-pr-code.cc, pt-walk.h: Use C++-style comments where possible.
author John W. Eaton <jwe@octave.org>
date Fri, 18 Dec 2015 22:39:36 -0500
parents 6f9e010760a1
children b9d4c3615e89
comparison
equal deleted inserted replaced
20945:9d9270e2f98f 20946:6eff66fb8a02
150 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_ ## TYPE ## _scalar, TYPE ## _s_s) \ 150 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_ ## TYPE ## _scalar, TYPE ## _s_s) \
151 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_ ## TYPE ## _matrix, TYPE ## _s_m) \ 151 INSTALL_CATOP (octave_ ## TYPE ## _scalar, octave_ ## TYPE ## _matrix, TYPE ## _s_m) \
152 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_ ## TYPE ## _scalar, TYPE ## _m_s) \ 152 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_ ## TYPE ## _scalar, TYPE ## _m_s) \
153 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_ ## TYPE ## _matrix, TYPE ## _m_m) 153 INSTALL_CATOP (octave_ ## TYPE ## _matrix, octave_ ## TYPE ## _matrix, TYPE ## _m_m)
154 154
155 // scalar unary ops.
155 #define OCTAVE_S_INT_UNOPS(TYPE) \ 156 #define OCTAVE_S_INT_UNOPS(TYPE) \
156 /* scalar unary ops. */ \
157 \ 157 \
158 DEFUNOP_OP (s_not, TYPE ## _scalar, !) \ 158 DEFUNOP_OP (s_not, TYPE ## _scalar, !) \
159 DEFUNOP_OP (s_uplus, TYPE ## _scalar, /* no-op */) \ 159 DEFUNOP_OP (s_uplus, TYPE ## _scalar, /* no-op */) \
160 DEFUNOP (s_uminus, TYPE ## _scalar) \ 160 DEFUNOP (s_uminus, TYPE ## _scalar) \
161 { \ 161 { \
167 DEFUNOP_OP (s_hermitian, TYPE ## _scalar, /* no-op */) \ 167 DEFUNOP_OP (s_hermitian, TYPE ## _scalar, /* no-op */) \
168 \ 168 \
169 DEFNCUNOP_METHOD (s_incr, TYPE ## _scalar, increment) \ 169 DEFNCUNOP_METHOD (s_incr, TYPE ## _scalar, increment) \
170 DEFNCUNOP_METHOD (s_decr, TYPE ## _scalar, decrement) 170 DEFNCUNOP_METHOD (s_decr, TYPE ## _scalar, decrement)
171 171
172 // scalar by scalar ops.
172 #define OCTAVE_SS_INT_ARITH_OPS(PFX, T1, T2, T3) \ 173 #define OCTAVE_SS_INT_ARITH_OPS(PFX, T1, T2, T3) \
173 /* scalar by scalar ops. */ \
174 \ 174 \
175 DEFINTBINOP_OP (PFX ## _add, T1 ## scalar, T2 ## scalar, +, T3) \ 175 DEFINTBINOP_OP (PFX ## _add, T1 ## scalar, T2 ## scalar, +, T3) \
176 DEFINTBINOP_OP (PFX ## _sub, T1 ## scalar, T2 ## scalar, -, T3) \ 176 DEFINTBINOP_OP (PFX ## _sub, T1 ## scalar, T2 ## scalar, -, T3) \
177 DEFINTBINOP_OP (PFX ## _mul, T1 ## scalar, T2 ## scalar, *, T3) \ 177 DEFINTBINOP_OP (PFX ## _mul, T1 ## scalar, T2 ## scalar, *, T3) \
178 \ 178 \
297 OCTAVE_SS_INT_BOOL_OPS (sx, TYPE ## _, , octave_ ## TYPE (0), 0) \ 297 OCTAVE_SS_INT_BOOL_OPS (sx, TYPE ## _, , octave_ ## TYPE (0), 0) \
298 OCTAVE_SS_INT_BOOL_OPS (xs, , TYPE ## _, 0, octave_ ## TYPE (0)) \ 298 OCTAVE_SS_INT_BOOL_OPS (xs, , TYPE ## _, 0, octave_ ## TYPE (0)) \
299 OCTAVE_SS_INT_BOOL_OPS (sfx, TYPE ## _, float_, octave_ ## TYPE (0), 0) \ 299 OCTAVE_SS_INT_BOOL_OPS (sfx, TYPE ## _, float_, octave_ ## TYPE (0), 0) \
300 OCTAVE_SS_INT_BOOL_OPS (fxs, float_, TYPE ## _, 0, octave_ ## TYPE (0)) 300 OCTAVE_SS_INT_BOOL_OPS (fxs, float_, TYPE ## _, 0, octave_ ## TYPE (0))
301 301
302 // scalar by matrix ops.
302 #define OCTAVE_SM_INT_ARITH_OPS(PFX, TS, TM, TI) \ 303 #define OCTAVE_SM_INT_ARITH_OPS(PFX, TS, TM, TI) \
303 /* scalar by matrix ops. */ \
304 \ 304 \
305 DEFINTNDBINOP_OP (PFX ## _add, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, +, TI) \ 305 DEFINTNDBINOP_OP (PFX ## _add, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, +, TI) \
306 DEFINTNDBINOP_OP (PFX ## _sub, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, -, TI) \ 306 DEFINTNDBINOP_OP (PFX ## _sub, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, -, TI) \
307 DEFINTNDBINOP_OP (PFX ## _mul, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, *, TI) \ 307 DEFINTNDBINOP_OP (PFX ## _mul, TS ## scalar, TM ## matrix, TS ## scalar, TM ## array, *, TI) \
308 \ 308 \
454 OCTAVE_SM_INT_BOOL_OPS (smfx, TYPE ## _, float_) \ 454 OCTAVE_SM_INT_BOOL_OPS (smfx, TYPE ## _, float_) \
455 OCTAVE_SM_CONV (TYPE ## _, TYPE ## _) \ 455 OCTAVE_SM_CONV (TYPE ## _, TYPE ## _) \
456 OCTAVE_SM_CONV (TYPE ## _, complex_) \ 456 OCTAVE_SM_CONV (TYPE ## _, complex_) \
457 OCTAVE_SM_CONV (TYPE ## _, float_complex_) 457 OCTAVE_SM_CONV (TYPE ## _, float_complex_)
458 458
459 // matrix by scalar ops.
459 #define OCTAVE_MS_INT_ARITH_OPS(PFX, TM, TS, TI) \ 460 #define OCTAVE_MS_INT_ARITH_OPS(PFX, TM, TS, TI) \
460 /* matrix by scalar ops. */ \
461 \ 461 \
462 DEFINTNDBINOP_OP (PFX ## _add, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, +, TI) \ 462 DEFINTNDBINOP_OP (PFX ## _add, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, +, TI) \
463 DEFINTNDBINOP_OP (PFX ## _sub, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, -, TI) \ 463 DEFINTNDBINOP_OP (PFX ## _sub, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, -, TI) \
464 DEFINTNDBINOP_OP (PFX ## _mul, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, *, TI) \ 464 DEFINTNDBINOP_OP (PFX ## _mul, TM ## matrix, TS ## scalar, TM ## array, TS ## scalar, *, TI) \
465 \ 465 \
609 OCTAVE_MS_INT_ASSIGN_OPS (ms, TYPE ## _, TYPE ## _, TYPE ## _) \ 609 OCTAVE_MS_INT_ASSIGN_OPS (ms, TYPE ## _, TYPE ## _, TYPE ## _) \
610 OCTAVE_MS_INT_ASSIGNEQ_OPS (mse, TYPE ## _) \ 610 OCTAVE_MS_INT_ASSIGNEQ_OPS (mse, TYPE ## _) \
611 OCTAVE_MS_INT_ASSIGN_OPS (mx, TYPE ## _, , ) \ 611 OCTAVE_MS_INT_ASSIGN_OPS (mx, TYPE ## _, , ) \
612 OCTAVE_MS_INT_ASSIGN_OPS (mfx, TYPE ## _, float_, float_) 612 OCTAVE_MS_INT_ASSIGN_OPS (mfx, TYPE ## _, float_, float_)
613 613
614 // matrix unary ops.
614 #define OCTAVE_M_INT_UNOPS(TYPE) \ 615 #define OCTAVE_M_INT_UNOPS(TYPE) \
615 /* matrix unary ops. */ \
616 \ 616 \
617 DEFNDUNOP_OP (m_not, TYPE ## _matrix, TYPE ## _array, !) \ 617 DEFNDUNOP_OP (m_not, TYPE ## _matrix, TYPE ## _array, !) \
618 DEFNDUNOP_OP (m_uplus, TYPE ## _matrix, TYPE ## _array, /* no-op */) \ 618 DEFNDUNOP_OP (m_uplus, TYPE ## _matrix, TYPE ## _array, /* no-op */) \
619 DEFUNOP (m_uminus, TYPE ## _matrix) \ 619 DEFUNOP (m_uminus, TYPE ## _matrix) \
620 { \ 620 { \
635 \ 635 \
636 DEFNCUNOP_METHOD (m_incr, TYPE ## _matrix, increment) \ 636 DEFNCUNOP_METHOD (m_incr, TYPE ## _matrix, increment) \
637 DEFNCUNOP_METHOD (m_decr, TYPE ## _matrix, decrement) \ 637 DEFNCUNOP_METHOD (m_decr, TYPE ## _matrix, decrement) \
638 DEFNCUNOP_METHOD (m_changesign, TYPE ## _matrix, changesign) 638 DEFNCUNOP_METHOD (m_changesign, TYPE ## _matrix, changesign)
639 639
640 // matrix by matrix ops.
640 #define OCTAVE_MM_INT_ARITH_OPS(PFX, T1, T2, T3) \ 641 #define OCTAVE_MM_INT_ARITH_OPS(PFX, T1, T2, T3) \
641 /* matrix by matrix ops. */ \
642 \ 642 \
643 DEFINTNDBINOP_OP (PFX ## _add, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, +, T3) \ 643 DEFINTNDBINOP_OP (PFX ## _add, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, +, T3) \
644 DEFINTNDBINOP_OP (PFX ## _sub, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, -, T3) \ 644 DEFINTNDBINOP_OP (PFX ## _sub, T1 ## matrix, T2 ## matrix, T1 ## array, T2 ## array, -, T3) \
645 \ 645 \
646 /* DEFBINOP_OP (PFX ## _mul, T1 ## matrix, T2 ## matrix, *) */ \ 646 /* DEFBINOP_OP (PFX ## _mul, T1 ## matrix, T2 ## matrix, *) */ \