小智 5
是的,您可以使用批处理模式。
要使用批处理模式,需要连续存储5300个元素。
这意味着相邻批次之间的距离是 5300。你可以这样做:
..........
cufftComplex *host;
cufftComplex *device;
CudaMallocHost((void **)&host,sizeof(cufftComplex)*5300*3500);
CudaMalloc((void **)&devcie,sizeof(cufftComplex)*5300*3500);
//here add the elements,like this:
//host[0-5299] the first batch, host[5300-10599] the second batch ,and up to the 3500th batch.
CudaMemcpy(device,host,sizeof(cufftComplex)*5300*3500,......);
CufftPlan1d(&device,5300,type,3500);
CufftExecC2C(......);
......
Run Code Online (Sandbox Code Playgroud)
有关更多详细信息,请参阅 CUFFT 手册。