Mercurial > octave-libgccjit
comparison liboctave/CNDArray.cc @ 8956:d91fa4b20bbb
ensure nonnegative char -> real conversion
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 11 Mar 2009 10:31:08 +0100 |
parents | eb63fbe60fab |
children | ed5055b0a476 |
comparison
equal
deleted
inserted
replaced
8955:6d3fcbf89267 | 8956:d91fa4b20bbb |
---|---|
58 | 58 |
59 F77_RET_T | 59 F77_RET_T |
60 F77_FUNC (zfftb, ZFFTB) (const octave_idx_type&, Complex*, Complex*); | 60 F77_FUNC (zfftb, ZFFTB) (const octave_idx_type&, Complex*, Complex*); |
61 } | 61 } |
62 #endif | 62 #endif |
63 | |
64 ComplexNDArray::ComplexNDArray (const charNDArray& a) | |
65 : MArrayN<Complex> (a.dims ()) | |
66 { | |
67 octave_idx_type n = a.numel (); | |
68 for (octave_idx_type i = 0; i < n; i++) | |
69 xelem (i) = static_cast<unsigned char> (a(i)); | |
70 } | |
63 | 71 |
64 #if defined (HAVE_FFTW3) | 72 #if defined (HAVE_FFTW3) |
65 ComplexNDArray | 73 ComplexNDArray |
66 ComplexNDArray::fourier (int dim) const | 74 ComplexNDArray::fourier (int dim) const |
67 { | 75 { |