cufftHandles in cascade of construction and destruction of plans

Hi,

I create two cufftPlans with cufftPlan1d() and the resulting cufftHandles are “1” for the first plan and “2” for the second plan. If I now call a cufftDestroy() on the “1” handle, followed by a new cufftPlan1d() call, the resulting handle is “2” which seems to be wrong! Look at the code below…

cufftHandle plan1, plan2, plan3;

cufftPlan1d(&plan1, 10, CUFFT_C2C, 13);

printf("created plan1 with handle %i\n", plan1);

cufftPlan1d(&plan2, 11, CUFFT_C2C, 14);

printf("created plan2 with handle %i\n", plan2);

cufftDestroy(plan1);

printf("destroyed plan1 with handle %i\n", plan1);

cufftPlan1d(&plan3, 12, CUFFT_C2C, 15);

printf("created plan3 with handle %i\n", plan3);

The output of this is…

created plan1 with handle 1

created plan2 with handle 2

destroyed plan1 with handle 1

created plan3 with handle 2

I think either handle “1” should be reused or a new handle “3” should be created. Is the current behavior a bug? If so, can someone from NVIDIA please investigate this…

Marcel

Ok, it seems to be a bug in 3.1…
http://forums.nvidia.com/index.php?showtopic=172931