Understand PocketFFT transform arguments
cppWhen calling PocketFFT functions, you must provide several parameters to define the transform geometry and direction:
shape[_*]: Astd::vector<std::size_t>containing the number of entries along each axis. Forr2ctransforms, provide the input shape; forc2r, provide the output shape.stride_*: Astd::vector<std::ptrdiff_t>describing the memory distance (in bytes) between neighboring entries along an axis. Supports negative strides.axes: A vector of non-negative integers specifying which axes to transform. Forr2c/c2r, the last entry inaxesis treated specially.forward: Direction of the transform. Use the symbolic constantsFORWARDorBACKWARD.fct: A scaling factor applied to the result (transforms are not normalized by default).nthreads: A non-negative integer for multi-threading.0uses all logical CPU cores. Note that multi-threading is disabled for 1D transforms and ifPOCKETFFT_NO_MULTITHREADINGis defined.
Constraints
shape,stride_in, andstride_outmust have the same size and not be empty.- Axis indices must be in the range
[0, shape.size() - 1]. - For
r2c/c2rtransforms, the complex array length along the specified axis is assumed to bes/2 + 1, wheresis the real array axis length.