Do I need a DLM Wrapper for this? [message #37319] |
Wed, 10 December 2003 01:20 |
Brian
Messages: 27 Registered: March 2001
|
Junior Member |
|
|
I am somewhat new to IDL, so you can imagine how confusing I find the notion
of DLM wrappers...
In any case, I have made several posts about the FFTW3 dll, and I am getting
closer to being able to get it working, but now I have come across DLMs, and
am wondering if I need one (and in general wondering under which
circumstances I need one).
Do I need to write a DLM wrapper to truly use this fftw3 dll? In the manual
it says
The basic usage of FFTW to compute a one-dimensional DFT of size N is
simple, and it
typically looks something like this code:
#include <fftw3.h>
...
{
fftw_complex *in, *out;
fftw_plan p;
...
in = fftw_malloc(sizeof(fftw_complex) * N);
out = fftw_malloc(sizeof(fftw_complex) * N);
p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
...
fftw_execute(p); /* repeat as needed */
...
fftw_destroy_plan(p);
fftw_free(in); fftw_free(out);
}
(When you compile, you must also link with the fftw3 library,
e.g. -lfftw3 -lm on
Unix systems.)
First you allocate the input and output arrays. You can allocate them in any
way that
you like, but we recommend using fftw_malloc, which behaves like malloc
except that it
properly aligns the array when SIMD instructions (such as SSE and Altivec)
are available
(see Section 3.1.1 [SIMD alignment and
tw malloc], page 15).
I am just confused how I pass an array in IDL to this dll.
-brian
|
|
|