cufft - bug in the manual & batch 2d/3d ffts

Hi All,

There appear to be a couple of bugs in the cufft manual. I’m looking at V3.0, dated February 2010 (this is currently the most up-to-date version).

The code on the very last page (p21) is to do a Batched 2D C2C transform. First, the call to cufftPlanMany( … ) has a bug: the first parameter should be [font=“Lucida Sans Unicode”]&plan[/font], not [font=“Lucida Sans Unicode”]plan[/font] (cufftPlanMany takes a pointer to a plan object as its first parameter, not a plan object).

Second, the call to cufftPlanMany( … ) is missing a parameter. The second parameter should be the rank (ie a 1, 2, or 3) of the problem, and it appears that this parameter was omitted in the code.

The cufftPlanMany() function is new (I think). Previously, one could only do multiple ffts in batch if they were 1D; now this function allows one to do multiple batch ffts for 2D and 3D. So, this function obsolesces the code and discussion for 2D and 3D batch jobs here:
http://forums.nvidia.com/index.php?showtopic=34241

Of course, the function only obsolesces this previous code if it works! I have yet to try it and am a little uneasy since the example code contains some blatant bugs. I’m doubt it would even compile as written…

Anyone have experience with it? cheers,
lawrence

You’re correct – this is a bug in the documentation. We’ll get it fixed up for CUDA 3.2 (it’s already too late for us to fix it in CUDA 3.1, unfortunately).

As you suggested, the example should say the following:

cufftPlanMany(&plan,2,{ NX, NY },NULL,1,0,NULL,1,0,CUFFT_C2C,BATCHSIZE);

The CUFFT team assures me that the cufftPlanMany() function is used and exercised in their testbench, so this doc bug is not indicative of the quality of cufftPlanMany() itself – it’s just a typo. :)

Thanks for bringing this to our attention!

–Cliff

Great, thanks for replying. I also tried out at the cufftPlanMany() function last week and it is working fine.

lawrence