Cufft idist and odist not working as expected

Hello,

I have a ragged array with multiple shaped 1D sequences

I am looking to make a batched 1D FFT on two 1D sequence that are contiguous but not adjacent.

        int rank = 1;         // 1D FFT
        int batch_size = 2;   // Number of rings to transform
        int n[] = {size};     // Size of each FFT
        int *inembed = NULL;  // Stride of input data
        int istride = 1;      // Distance between consecutive elements in the same batch
        int idist = 188;  // Distance between the starting points of two consecutive batches
        int *onembed = NULL;            // Stride of output data
        int ostride = 1;                // Distance between consecutive elements in the same batch
        int odist = 188;

        std::cout << "For ring " << i << " size is " << size << " dist is " << dist << std::endl;
        CUFFT_CALL(cufftMakePlanMany(plan, rank, n, inembed, istride, idist, onembed, ostride, odist,
                                     CUFFT_C2C, batch_size, &polar_worksize));

The size if 4 and the idist = odist is 188
Yet when I execute the plan, the first 8 elements are transformed, instead of the first 4 and the last 4 of my array.

Anyone have an idea how can I use this from the documentation :


1D

input[ b * idist + x * istride ]

output[ b * odist + x * ostride ]

Thank you

The solution is to set inembed and onembed to anything which is a bit counter intuitive for a 1D transform

You might get better help with a short, complete example. You may wish to review the advanced data layout section of the cufft docs. which states:

Passing inembed or onembed set to NULL is a special case and is equivalent to passing n for each. This is same as the basic data layout and other advanced parameters such as istride are ignored.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.