Mercurial > hg > octave-nkf
comparison liboctave/array/fCNDArray.cc @ 19537:8f6a8422435d
Replace instances of deprecated Array constructor in FFTPACK-related code.
* dNDArray.cc (fourier, ifourier, fourier2d, ifourier2d, fourierNd,
ifourierNd): Use Array constructor with dim_vector input.
* fNDArray.cc (fourier, ifourier, fourier2d, ifourier2d, fourierNd,
ifourierNd): Use Array constructor with dim_vector input.
* fCNDArray.cc (fourier, ifourier, fourier2d, ifourier2d, fourierNd,
ifourierNd): Use Array constructor with dim_vector input.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 22 Nov 2014 12:35:08 -0800 |
parents | d0c73e23a505 |
children | 4197fc428c7d |
comparison
equal
deleted
inserted
replaced
19536:718aaf1e84f7 | 19537:8f6a8422435d |
---|---|
212 return FloatComplexNDArray (); | 212 return FloatComplexNDArray (); |
213 | 213 |
214 FloatComplexNDArray retval (dv); | 214 FloatComplexNDArray retval (dv); |
215 octave_idx_type npts = dv(dim); | 215 octave_idx_type npts = dv(dim); |
216 octave_idx_type nn = 4*npts+15; | 216 octave_idx_type nn = 4*npts+15; |
217 Array<FloatComplex> wsave (nn, 1); | 217 Array<FloatComplex> wsave (dim_vector (nn, 1)); |
218 FloatComplex *pwsave = wsave.fortran_vec (); | 218 FloatComplex *pwsave = wsave.fortran_vec (); |
219 | 219 |
220 OCTAVE_LOCAL_BUFFER (FloatComplex, tmp, npts); | 220 OCTAVE_LOCAL_BUFFER (FloatComplex, tmp, npts); |
221 | 221 |
222 octave_idx_type stride = 1; | 222 octave_idx_type stride = 1; |
259 return FloatComplexNDArray (); | 259 return FloatComplexNDArray (); |
260 | 260 |
261 FloatComplexNDArray retval (dv); | 261 FloatComplexNDArray retval (dv); |
262 octave_idx_type npts = dv(dim); | 262 octave_idx_type npts = dv(dim); |
263 octave_idx_type nn = 4*npts+15; | 263 octave_idx_type nn = 4*npts+15; |
264 Array<FloatComplex> wsave (nn, 1); | 264 Array<FloatComplex> wsave (dim_vector (nn, 1)); |
265 FloatComplex *pwsave = wsave.fortran_vec (); | 265 FloatComplex *pwsave = wsave.fortran_vec (); |
266 | 266 |
267 OCTAVE_LOCAL_BUFFER (FloatComplex, tmp, npts); | 267 OCTAVE_LOCAL_BUFFER (FloatComplex, tmp, npts); |
268 | 268 |
269 octave_idx_type stride = 1; | 269 octave_idx_type stride = 1; |
309 | 309 |
310 for (int i = 0; i < rank; i++) | 310 for (int i = 0; i < rank; i++) |
311 { | 311 { |
312 octave_idx_type npts = dv2(i); | 312 octave_idx_type npts = dv2(i); |
313 octave_idx_type nn = 4*npts+15; | 313 octave_idx_type nn = 4*npts+15; |
314 Array<FloatComplex> wsave (nn, 1); | 314 Array<FloatComplex> wsave (dim_vector (nn, 1)); |
315 FloatComplex *pwsave = wsave.fortran_vec (); | 315 FloatComplex *pwsave = wsave.fortran_vec (); |
316 Array<FloatComplex> row (npts, 1); | 316 Array<FloatComplex> row (dim_vector (npts, 1)); |
317 FloatComplex *prow = row.fortran_vec (); | 317 FloatComplex *prow = row.fortran_vec (); |
318 | 318 |
319 octave_idx_type howmany = numel () / npts; | 319 octave_idx_type howmany = numel () / npts; |
320 howmany = (stride == 1 ? howmany : | 320 howmany = (stride == 1 ? howmany : |
321 (howmany > stride ? stride : howmany)); | 321 (howmany > stride ? stride : howmany)); |
357 | 357 |
358 for (int i = 0; i < rank; i++) | 358 for (int i = 0; i < rank; i++) |
359 { | 359 { |
360 octave_idx_type npts = dv2(i); | 360 octave_idx_type npts = dv2(i); |
361 octave_idx_type nn = 4*npts+15; | 361 octave_idx_type nn = 4*npts+15; |
362 Array<FloatComplex> wsave (nn, 1); | 362 Array<FloatComplex> wsave (dim_vector (nn, 1)); |
363 FloatComplex *pwsave = wsave.fortran_vec (); | 363 FloatComplex *pwsave = wsave.fortran_vec (); |
364 Array<FloatComplex> row (npts, 1); | 364 Array<FloatComplex> row (dim_vector (npts, 1)); |
365 FloatComplex *prow = row.fortran_vec (); | 365 FloatComplex *prow = row.fortran_vec (); |
366 | 366 |
367 octave_idx_type howmany = numel () / npts; | 367 octave_idx_type howmany = numel () / npts; |
368 howmany = (stride == 1 ? howmany : | 368 howmany = (stride == 1 ? howmany : |
369 (howmany > stride ? stride : howmany)); | 369 (howmany > stride ? stride : howmany)); |
405 | 405 |
406 for (int i = 0; i < rank; i++) | 406 for (int i = 0; i < rank; i++) |
407 { | 407 { |
408 octave_idx_type npts = dv(i); | 408 octave_idx_type npts = dv(i); |
409 octave_idx_type nn = 4*npts+15; | 409 octave_idx_type nn = 4*npts+15; |
410 Array<FloatComplex> wsave (nn, 1); | 410 Array<FloatComplex> wsave (dim_vector (nn, 1)); |
411 FloatComplex *pwsave = wsave.fortran_vec (); | 411 FloatComplex *pwsave = wsave.fortran_vec (); |
412 Array<FloatComplex> row (npts, 1); | 412 Array<FloatComplex> row (dim_vector (npts, 1)); |
413 FloatComplex *prow = row.fortran_vec (); | 413 FloatComplex *prow = row.fortran_vec (); |
414 | 414 |
415 octave_idx_type howmany = numel () / npts; | 415 octave_idx_type howmany = numel () / npts; |
416 howmany = (stride == 1 ? howmany : | 416 howmany = (stride == 1 ? howmany : |
417 (howmany > stride ? stride : howmany)); | 417 (howmany > stride ? stride : howmany)); |
452 | 452 |
453 for (int i = 0; i < rank; i++) | 453 for (int i = 0; i < rank; i++) |
454 { | 454 { |
455 octave_idx_type npts = dv(i); | 455 octave_idx_type npts = dv(i); |
456 octave_idx_type nn = 4*npts+15; | 456 octave_idx_type nn = 4*npts+15; |
457 Array<FloatComplex> wsave (nn, 1); | 457 Array<FloatComplex> wsave (dim_vector (nn, 1)); |
458 FloatComplex *pwsave = wsave.fortran_vec (); | 458 FloatComplex *pwsave = wsave.fortran_vec (); |
459 Array<FloatComplex> row (npts, 1); | 459 Array<FloatComplex> row (dim_vector (npts, 1)); |
460 FloatComplex *prow = row.fortran_vec (); | 460 FloatComplex *prow = row.fortran_vec (); |
461 | 461 |
462 octave_idx_type howmany = numel () / npts; | 462 octave_idx_type howmany = numel () / npts; |
463 howmany = (stride == 1 ? howmany : | 463 howmany = (stride == 1 ? howmany : |
464 (howmany > stride ? stride : howmany)); | 464 (howmany > stride ? stride : howmany)); |