comparison liboctave/intNDArray.cc @ 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 36594d5bbe13
children 1bd918cfb6e2
comparison
equal deleted inserted replaced
8740:cb0ea772a4af 8741:008f3985c8c0
26 #endif 26 #endif
27 27
28 #include "Array-util.h" 28 #include "Array-util.h"
29 #include "mx-base.h" 29 #include "mx-base.h"
30 #include "lo-ieee.h" 30 #include "lo-ieee.h"
31 #include "mx-inlines.cc"
31 32
32 // unary operations 33 // unary operations
33 34
34 template <class T> 35 template <class T>
35 boolNDArray 36 boolNDArray
203 204
204 template <class T> 205 template <class T>
205 intNDArray<T> 206 intNDArray<T>
206 intNDArray<T>::sum (int dim) const 207 intNDArray<T>::sum (int dim) const
207 { 208 {
208 MX_ND_REDUCTION (retval(result_idx) += intNDArray<T>::elem (iter_idx), 0, intNDArray<T>); 209 return do_mx_red_op<intNDArray<T> > (*this, dim, mx_inline_sum);
209 } 210 }
210 211
211 template <class T> 212 template <class T>
212 intNDArray<T> 213 intNDArray<T>
213 intNDArray<T>::max (int dim) const 214 intNDArray<T>::max (int dim) const