I am using this code to create a 2D array having data type complex (from complex.h in c). Then I want to find the fft of that array 'in place'. However it is giving segmentation fault, which I fear is due to improper casting of the pointer. How do we use complex data type for a fftw?

```
//a is a 2d array of size blockSize*NO_INPUTS

complex float* a=(complex float*)malloc(sizeof(complex float)*NO_INPUTS*blockSize);

//****** Put data in a*******//
//blah//
//blah//

//a has data now//

fftw_plan p;
p=fftw_plan_dft_2d(blockSize,NO_INPUTS,(fftw_complex*)a,(fftw_complex*)a,FFTW_FORWARD,FFTW_ESTIMATE);

fftw_execute(p);

fftw_destroy_plan(p);

```

Please note that I do not want to use fftw\_complex or fftw\_malloc.
Thank you.