Mercurial > hg > octave-lyh
comparison liboctave/fCNDArray.cc @ 9523:0ce82753dd72
more configure changes for libraries
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 13 Aug 2009 18:20:31 -0400 |
parents | 9f870f73ab7d |
children | 1beb23d2b892 |
comparison
equal
deleted
inserted
replaced
9522:e79470be3ecb | 9523:0ce82753dd72 |
---|---|
29 #include <cfloat> | 29 #include <cfloat> |
30 | 30 |
31 #include <vector> | 31 #include <vector> |
32 | 32 |
33 #include "Array-util.h" | 33 #include "Array-util.h" |
34 #include "f77-fcn.h" | |
34 #include "fCNDArray.h" | 35 #include "fCNDArray.h" |
35 #include "mx-base.h" | |
36 #include "f77-fcn.h" | |
37 #include "functor.h" | 36 #include "functor.h" |
38 #include "lo-ieee.h" | 37 #include "lo-ieee.h" |
39 #include "lo-mappers.h" | 38 #include "lo-mappers.h" |
39 #include "mx-base.h" | |
40 #include "mx-op-defs.h" | |
41 #include "oct-fftw.h" | |
40 #include "oct-locbuf.h" | 42 #include "oct-locbuf.h" |
41 #include "mx-op-defs.h" | |
42 | |
43 #if defined (HAVE_FFTW3) | |
44 #include "oct-fftw.h" | |
45 #else | |
46 extern "C" | |
47 { | |
48 F77_RET_T | |
49 F77_FUNC (cffti, CFFTI) (const octave_idx_type&, FloatComplex*); | |
50 | |
51 F77_RET_T | |
52 F77_FUNC (cfftf, CFFTF) (const octave_idx_type&, FloatComplex*, FloatComplex*); | |
53 | |
54 F77_RET_T | |
55 F77_FUNC (cfftb, CFFTB) (const octave_idx_type&, FloatComplex*, FloatComplex*); | |
56 } | |
57 #endif | |
58 | 43 |
59 FloatComplexNDArray::FloatComplexNDArray (const charNDArray& a) | 44 FloatComplexNDArray::FloatComplexNDArray (const charNDArray& a) |
60 : MArrayN<FloatComplex> (a.dims ()) | 45 : MArrayN<FloatComplex> (a.dims ()) |
61 { | 46 { |
62 octave_idx_type n = a.numel (); | 47 octave_idx_type n = a.numel (); |
63 for (octave_idx_type i = 0; i < n; i++) | 48 for (octave_idx_type i = 0; i < n; i++) |
64 xelem (i) = static_cast<unsigned char> (a(i)); | 49 xelem (i) = static_cast<unsigned char> (a(i)); |
65 } | 50 } |
66 | 51 |
67 #if defined (HAVE_FFTW3) | 52 #if defined (HAVE_FFTW) |
53 | |
68 FloatComplexNDArray | 54 FloatComplexNDArray |
69 FloatComplexNDArray::fourier (int dim) const | 55 FloatComplexNDArray::fourier (int dim) const |
70 { | 56 { |
71 dim_vector dv = dims (); | 57 dim_vector dv = dims (); |
72 | 58 |
196 | 182 |
197 return retval; | 183 return retval; |
198 } | 184 } |
199 | 185 |
200 #else | 186 #else |
187 | |
188 extern "C" | |
189 { | |
190 F77_RET_T | |
191 F77_FUNC (cffti, CFFTI) (const octave_idx_type&, FloatComplex*); | |
192 | |
193 F77_RET_T | |
194 F77_FUNC (cfftf, CFFTF) (const octave_idx_type&, FloatComplex*, FloatComplex*); | |
195 | |
196 F77_RET_T | |
197 F77_FUNC (cfftb, CFFTB) (const octave_idx_type&, FloatComplex*, FloatComplex*); | |
198 } | |
199 | |
201 FloatComplexNDArray | 200 FloatComplexNDArray |
202 FloatComplexNDArray::fourier (int dim) const | 201 FloatComplexNDArray::fourier (int dim) const |
203 { | 202 { |
204 dim_vector dv = dims (); | 203 dim_vector dv = dims (); |
205 | 204 |