Mercurial > hg > octave-avbm
changeset 8741:008f3985c8c0
use new summation code for native integer summation
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Sat, 14 Feb 2009 07:24:16 +0100 |
parents | cb0ea772a4af |
children | d2b06871afac |
files | liboctave/ChangeLog liboctave/intNDArray.cc |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2009-02-14 Jaroslav Hajek <highegg@gmail.com> + + * intNDArray.cc: include mx-inlines.cc. + (intNDArray::sum): Use mx_do_red_op (..., mx_inline_sum). + 2009-02-13 Jaroslav Hajek <highegg@gmail.com> * mx-inlines.cc (OP_RED_SUM, OP_RED_PROD, OP_RED_SUMSQ, OP_RED_SUMSQC,
--- a/liboctave/intNDArray.cc +++ b/liboctave/intNDArray.cc @@ -28,6 +28,7 @@ #include "Array-util.h" #include "mx-base.h" #include "lo-ieee.h" +#include "mx-inlines.cc" // unary operations @@ -205,7 +206,7 @@ intNDArray<T> intNDArray<T>::sum (int dim) const { - MX_ND_REDUCTION (retval(result_idx) += intNDArray<T>::elem (iter_idx), 0, intNDArray<T>); + return do_mx_red_op<intNDArray<T> > (*this, dim, mx_inline_sum); } template <class T>