Mercurial > hg > octave-nkf
comparison liboctave/CNDArray.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 |
---|---|
40 #include "MArray-defs.h" | 40 #include "MArray-defs.h" |
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 | |
46 #include "bsxfun-defs.cc" | |
45 | 47 |
46 ComplexNDArray::ComplexNDArray (const charNDArray& a) | 48 ComplexNDArray::ComplexNDArray (const charNDArray& a) |
47 : MArrayN<Complex> (a.dims ()) | 49 : MArrayN<Complex> (a.dims ()) |
48 { | 50 { |
49 octave_idx_type n = a.numel (); | 51 octave_idx_type n = a.numel (); |
1102 else | 1104 else |
1103 do_ms_inplace_op<ComplexNDArray, double> (a, s, mx_inline_div2); | 1105 do_ms_inplace_op<ComplexNDArray, double> (a, s, mx_inline_div2); |
1104 return a; | 1106 return a; |
1105 } | 1107 } |
1106 | 1108 |
1109 BSXFUN_STDOP_DEFS_MXLOOP (ComplexNDArray) | |
1110 BSXFUN_STDREL_DEFS_MXLOOP (ComplexNDArray) | |
1111 | |
1107 /* | 1112 /* |
1108 ;;; Local Variables: *** | 1113 ;;; Local Variables: *** |
1109 ;;; mode: C++ *** | 1114 ;;; mode: C++ *** |
1110 ;;; End: *** | 1115 ;;; End: *** |
1111 */ | 1116 */ |