cufftPlan1d() overhead

real time signal data analysis .

this is my code


int mem_size = sizeof(Complex) * SIGNAL_SIZE;

  // Allocate device memory for signal

   Complex* d_signal;

   CUDA_SAFE_CALL(cudaMalloc((void**)&d_signal, mem_size));

   // Copy host memory to device

   CUDA_SAFE_CALL(cudaMemcpy(d_signal, h_signal, mem_size,

                             cudaMemcpyHostToDevice));

     cufftPlan1d(&plan, ??, CUFFT_DATA_C2C, 1);

// Transform signal and kernel

 CUFFT_SAFE_CALL(cufftExecute(plan, d_signal, d_signal, CUFFT_FORWARD));

 CUFFT_SAFE_CALL(cufftExecute(plan, d_signal, d_signal, CUFFT_INVERSE));

   // Copy device memory to host

   Complex* h_result_signal = h_signal;

   CUDA_SAFE_CALL(cudaMemcpy(h_result_signal, d_signal, mem_size,

                             cudaMemcpyDeviceToHost));

real time input signal data


#define  SMPRATE        	44100

#define  BUFSIZE        	16384

	wfx.wFormatTag = WAVE_FORMAT_PCM;	// PCM format

  	wfx.nChannels = 1;    	// mono sound

  	wfx.nSamplesPerSec = SMPRATE;  // sampling rate

  	wfx.nAvgBytesPerSec = SMPRATE*2;	// 16 bytes per sample

  	wfx.nBlockAlign = 2;    // bytes per sample

  	wfx.wBitsPerSample = 16;  	// bits per sample

  	wfx.cbSize = 0;      // extra info (ignored for PCM)

what is plan fuction paramera ??

16?

16384?

too many overhead…