Mercurial > hg > octave-lyh
diff src/ops.h @ 9548:e5f7aee2ab8c
optimize &=, |= operators
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 19 Aug 2009 15:54:31 +0200 |
parents | 1beb23d2b892 |
children | 5ab448e3febe |
line wrap: on
line diff
--- a/src/ops.h +++ b/src/ops.h @@ -201,7 +201,7 @@ return octave_value (); \ } -// FIXME: the following currently doesn't handle index. +// FIXME: the following currently don't handle index. #define DEFNDASSIGNOP_OP(name, t1, t2, f, op) \ ASSIGNOPDECL (name) \ { \ @@ -213,6 +213,17 @@ return octave_value (); \ } +#define DEFNDASSIGNOP_FNOP(name, t1, t2, f, fnop) \ + ASSIGNOPDECL (name) \ + { \ + CAST_BINOP_ARGS (CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \ + \ + assert (idx.empty ()); \ + fnop (v1.matrix_ref (), v2.CONCAT2(f, _value) ()); \ + \ + return octave_value (); \ + } + #define DEFASSIGNANYOP_FN(name, t1, f) \ ASSIGNANYOPDECL (name) \ { \