 
 	// --- Device side input data allocation and initialization
 	cufftReal *deviceInputData;
-	gpuErrchk(cudaMalloc((void**)&deviceInputData, DATASIZE * BATCH * sizeof(cufftReal)));
-	cudaMemcpy(deviceInputData, hostInputData, DATASIZE * BATCH * sizeof(cufftReal), cudaMemcpyHostToDevice);
+	gpuErrchk(cudaMalloc((void**)&deviceInputData, N * BATCH * sizeof(cufftReal)));
+	cudaMemcpy(deviceInputData, hostInputData, N * BATCH * sizeof(cufftReal), cudaMemcpyHostToDevice);
 
 	// --- Host side output data allocation
-	cufftComplex *hostOutputData = (cufftComplex*)malloc((DATASIZE / 2 + 1) * BATCH * sizeof(cufftComplex));
+	cufftComplex *hostOutputData = (cufftComplex*)malloc((FFTSIZE / 2 + 1) * BATCH * sizeof(cufftComplex));
 
 	// --- Device side output data allocation
-	cufftComplex *deviceOutputData; gpuErrchk(cudaMalloc((void**)&deviceOutputData, (DATASIZE / 2 + 1) * BATCH * sizeof(cufftComplex)));
+	cufftComplex *deviceOutputData; gpuErrchk(cudaMalloc((void**)&deviceOutputData, (FFTSIZE / 2 + 1) * BATCH * sizeof(cufftComplex)));
 
 	// --- Batched 1D FFTs
 	cufftHandle handle;
 	int rank = 1;                           // --- 1D FFTs
-	int n[] = { DATASIZE };                 // --- Size of the Fourier transform
+	int n[] = { FFTSIZE };                 // --- Size of the Fourier transform
 	int istride = 1, ostride = 1;           // --- Distance between two successive input/output elements
-	int idist = DATASIZE, odist = (DATASIZE / 2 + 1); // --- Distance between batches
+	int idist = FFTSIZE, odist = (FFTSIZE / 2 + 1); // --- Distance between batches
 	int inembed[] = { 0 };                  // --- Input size with pitch (ignored for 1D transforms)
 	int onembed[] = { 0 };                  // --- Output size with pitch (ignored for 1D transforms)
 	int batch = BATCH;                      // --- Number of batched executions


	if(plantype == 1) {
		printf("cufftplan1d\n");
		cufftPlan1d(&handle, DATASIZE, CUFFT_R2C, BATCH);
	}

	if(plantype == 2) {

		return -1;
	};

	int N = FFTSIZE;
	N = N + 2;

	// --- Host side input data allocation and initialization
	cufftReal *hostInputData = (cufftReal*)malloc(N*BATCH*sizeof(cufftReal));
	for (int i=0; i<BATCH; i++) {
		for (int j=0; j<N; j++){
			//hostInputData[i*FFTSIZE + j] = (cufftReal)(j + 1);
			//hostInputData[i*FFTSIZE + j] = 100.f; 
			hostInputData[i*N+ j] = (float)(j % 10); 
			printf("%f ", hostInputData[i*N + j]);
		}
		printf("\n");
	}
