我正在尝试使用 CUDA FFT aka cufft 库
当 cufftPlan1d(..) 抛出异常时出现问题。
#define NX 256
#define BATCH 10
cufftHandle plan;
cufftComplex *data;
cudaMalloc((void**)&data, sizeof(cufftComplex)*NX*BATCH);
if (cudaGetLastError() != cudaSuccess){
fprintf(stderr, "Cuda error: Failed to allocate\n");
return;
}
if (cufftPlan1d(&plan, NX, CUFFT_C2C, BATCH) != CUFFT_SUCCESS){
fprintf(stderr, "CUFFT error: Plan creation failed");
return;
}
当编译器点击 cufftPlan1d 命令时,VS08 上的输出窗口出现以下内容:
first chance expection at 0x75af9617 in CudaFFTProject.exe Microsoft C++ exception: cufftResult_t at memory location 0x002df99c..