comparison liboctave/fNDArray.cc @ 9743:26abff55f6fe

optimize bsxfun for common built-in operations
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 20 Oct 2009 10:47:22 +0200
parents b4fdfee405b5
children ef4c4186cb47
comparison
equal deleted inserted replaced
9742:9f8ff01abc65 9743:26abff55f6fe
41 #include "mx-base.h" 41 #include "mx-base.h"
42 #include "mx-op-defs.h" 42 #include "mx-op-defs.h"
43 #include "oct-fftw.h" 43 #include "oct-fftw.h"
44 #include "oct-locbuf.h" 44 #include "oct-locbuf.h"
45 45
46 #include "bsxfun-defs.cc"
47
46 FloatNDArray::FloatNDArray (const charNDArray& a) 48 FloatNDArray::FloatNDArray (const charNDArray& a)
47 : MArrayN<float> (a.dims ()) 49 : MArrayN<float> (a.dims ())
48 { 50 {
49 octave_idx_type n = a.numel (); 51 octave_idx_type n = a.numel ();
50 for (octave_idx_type i = 0; i < n; i++) 52 for (octave_idx_type i = 0; i < n; i++)
1088 SND_BOOL_OPS (float, FloatNDArray) 1090 SND_BOOL_OPS (float, FloatNDArray)
1089 1091
1090 NDND_CMP_OPS (FloatNDArray, FloatNDArray) 1092 NDND_CMP_OPS (FloatNDArray, FloatNDArray)
1091 NDND_BOOL_OPS (FloatNDArray, FloatNDArray) 1093 NDND_BOOL_OPS (FloatNDArray, FloatNDArray)
1092 1094
1095 BSXFUN_STDOP_DEFS_MXLOOP (FloatNDArray)
1096 BSXFUN_STDREL_DEFS_MXLOOP (FloatNDArray)
1097
1093 /* 1098 /*
1094 ;;; Local Variables: *** 1099 ;;; Local Variables: ***
1095 ;;; mode: C++ *** 1100 ;;; mode: C++ ***
1096 ;;; End: *** 1101 ;;; End: ***
1097 */ 1102 */