 		return -1;
 	};
 
+	int N = FFTSIZE;
+	N = N + 2;
+
 	// --- Host side input data allocation and initialization
-	cufftReal *hostInputData = (cufftReal*)malloc(DATASIZE*BATCH*sizeof(cufftReal));
+	cufftReal *hostInputData = (cufftReal*)malloc(N*BATCH*sizeof(cufftReal));
 	for (int i=0; i<BATCH; i++) {
-		for (int j=0; j<DATASIZE; j++){
-			//hostInputData[i*DATASIZE + j] = (cufftReal)(j + 1);
-			//hostInputData[i*DATASIZE + j] = 100.f; 
-			hostInputData[i*DATASIZE + j] = (float)(j % 10); 
-			printf("%f ", hostInputData[i*DATASIZE + j]);
+		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");
 	}


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

	if(plantype == 2) {

	cufftExecR2C(handle,  deviceInputData, deviceOutputData);

	// --- Device->Host copy of the results
	gpuErrchk(cudaMemcpy(hostOutputData, deviceOutputData, (FFTSIZE / 2 + 1) * BATCH * sizeof(cufftComplex), cudaMemcpyDeviceToHost));

	for (int i=0; i<BATCH; i++)
		for (int j=0; j<(FFTSIZE / 2 + 1); j++)
			printf("%i %i %f %f\n", i, j, hostOutputData[i*(FFTSIZE / 2 + 1) + j].x, hostOutputData[i*(FFTSIZE / 2 + 1) + j].y);

	cufftDestroy(handle);
	gpuErrchk(cudaFree(deviceOutputData));
