Skip to main content

singe_cufft_sys/
sys_12200.rs

1/* automatically generated by rust-bindgen 0.72.1 */
2
3pub const CUFFT_VER_MAJOR: u32 = 12;
4pub const CUFFT_VER_MINOR: u32 = 2;
5pub const CUFFT_VER_PATCH: u32 = 0;
6pub const CUFFT_VER_BUILD: u32 = 37;
7pub const CUFFT_VERSION: u32 = 12200;
8pub const CUFFT_FORWARD: i32 = -1;
9pub const CUFFT_INVERSE: u32 = 1;
10pub const CUFFT_PLAN_NULL: i32 = -1;
11#[repr(C)]
12#[repr(align(8))]
13#[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)]
14pub struct float2 {
15    pub x: f32,
16    pub y: f32,
17}
18#[repr(C)]
19#[repr(align(16))]
20#[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)]
21pub struct double2 {
22    pub x: f64,
23    pub y: f64,
24}
25pub type cuFloatComplex = float2;
26pub type cuDoubleComplex = double2;
27pub type cuComplex = cuFloatComplex;
28pub type size_t = ::core::ffi::c_ulong;
29#[repr(C)]
30#[derive(Debug, Copy, Clone)]
31pub struct CUstream_st {
32    _unused: [u8; 0],
33}
34/// All cuFFT Library return values except for [`cufftResult::CUFFT_SUCCESS`] indicate that the current API call failed and the user should reconfigure to correct the problem. The possible return values are defined as follows.
35#[repr(u32)]
36#[derive(
37    Debug,
38    Copy,
39    Clone,
40    Hash,
41    PartialOrd,
42    Ord,
43    PartialEq,
44    Eq,
45    TryFromPrimitive,
46    IntoPrimitive,
47)]
48pub enum cufftResult_t {
49    /// The cuFFT operation was successful.
50    CUFFT_SUCCESS = 0,
51    /// cuFFT was passed an invalid plan handle.
52    CUFFT_INVALID_PLAN = 1,
53    /// cuFFT failed to allocate GPU or CPU memory.
54    CUFFT_ALLOC_FAILED = 2,
55    /// The cuFFT type provided is unsupported.
56    CUFFT_INVALID_TYPE = 3,
57    /// User specified an invalid pointer or parameter.
58    CUFFT_INVALID_VALUE = 4,
59    /// Driver or internal cuFFT library error.
60    CUFFT_INTERNAL_ERROR = 5,
61    /// Failed to execute an FFT on the GPU.
62    CUFFT_EXEC_FAILED = 6,
63    /// The cuFFT library failed to initialize.
64    CUFFT_SETUP_FAILED = 7,
65    /// User specified an invalid transform size.
66    CUFFT_INVALID_SIZE = 8,
67    /// Not currently in use.
68    CUFFT_UNALIGNED_DATA = 9,
69    /// Execution of a plan was on different GPU than plan creation.
70    CUFFT_INVALID_DEVICE = 11,
71    /// No workspace has been provided prior to plan execution.
72    CUFFT_NO_WORKSPACE = 13,
73    /// Function does not implement functionality for parameters given.
74    CUFFT_NOT_IMPLEMENTED = 14,
75    /// Operation is not supported for parameters given.
76    CUFFT_NOT_SUPPORTED = 16,
77    /// cuFFT is unable to find a dependency.
78    CUFFT_MISSING_DEPENDENCY = 17,
79    /// An NVRTC failure was encountered during a cuFFT operation.
80    CUFFT_NVRTC_FAILURE = 18,
81    /// An nvJitLink failure was encountered during a cuFFT operation.
82    CUFFT_NVJITLINK_FAILURE = 19,
83    /// An NVSHMEM failure was encountered during a cuFFT operation.
84    CUFFT_NVSHMEM_FAILURE = 20,
85}
86pub use self::cufftResult_t as cufftResult;
87/// A single-precision, floating-point real data type.
88pub type cufftReal = f32;
89/// A double-precision, floating-point real data type.
90pub type cufftDoubleReal = f64;
91/// A single-precision, floating-point complex data type that consists of interleaved real and imaginary components.
92pub type cufftComplex = cuComplex;
93/// A double-precision, floating-point complex data type that consists of interleaved real and imaginary components.
94pub type cufftDoubleComplex = cuDoubleComplex;
95/// The cuFFT library supports complex- and real-data transforms. The `cufftType` data type is an enumeration of the types of transform data supported by cuFFT.
96#[repr(u32)]
97#[derive(
98    Debug,
99    Copy,
100    Clone,
101    Hash,
102    PartialOrd,
103    Ord,
104    PartialEq,
105    Eq,
106    TryFromPrimitive,
107    IntoPrimitive,
108)]
109pub enum cufftType_t {
110    /// Real to complex (interleaved).
111    CUFFT_R2C = 42,
112    /// Complex (interleaved) to real.
113    CUFFT_C2R = 44,
114    /// Complex to complex (interleaved).
115    CUFFT_C2C = 41,
116    /// Double to double-complex (interleaved).
117    CUFFT_D2Z = 106,
118    /// Double-complex (interleaved) to double.
119    CUFFT_Z2D = 108,
120    /// Double-complex to double-complex (interleaved).
121    CUFFT_Z2Z = 105,
122}
123pub use self::cufftType_t as cufftType;
124#[repr(u32)]
125#[derive(
126    Debug,
127    Copy,
128    Clone,
129    Hash,
130    PartialOrd,
131    Ord,
132    PartialEq,
133    Eq,
134    TryFromPrimitive,
135    IntoPrimitive,
136)]
137pub enum cufftCompatibility_t {
138    CUFFT_COMPATIBILITY_FFTW_PADDING = 1,
139}
140pub use self::cufftCompatibility_t as cufftCompatibility;
141/// A handle type used to store and access cuFFT plans. The user receives a handle after creating a cuFFT plan and uses this handle to execute the plan.
142pub type cufftHandle = ::core::ffi::c_int;
143unsafe extern "C" {
144    /// Creates a 1D FFT plan configuration for a specified signal size and data type. The `batch` input parameter tells cuFFT how many 1D transforms to configure.
145    ///
146    /// This call can only be used once for a given handle. It will fail and return [`cufftResult::CUFFT_INVALID_PLAN`] if the plan is locked, i.e. the handle was previously used with a different `cufftPlan` or `cufftMakePlan` call.
147    ///
148    /// # Parameters
149    ///
150    /// - `plan`: Pointer to an uninitialized [`cufftHandle`] object.
151    ///
152    /// Contains a cuFFT 1D plan handle value.
153    /// - `nx`: The transform size (e.g. 256 for a 256-point FFT).
154    /// - `batch`: Number of transforms of size `nx`. Please consider using [`cufftPlanMany`] for multiple transforms.
155    ///
156    /// # Return value
157    ///
158    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
159    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
160    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle. Handle is not valid when the plan is locked.
161    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: The `nx` or `batch` parameter is not a supported size.
162    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
163    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
164    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
165    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
166    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
167    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully created the FFT plan.
168    pub fn cufftPlan1d(
169        plan: *mut cufftHandle,
170        nx: ::core::ffi::c_int,
171        type_: cufftType,
172        batch: ::core::ffi::c_int,
173    ) -> cufftResult;
174}
175unsafe extern "C" {
176    /// Creates a 2D FFT plan configuration according to specified signal sizes and data type.
177    ///
178    /// This call can only be used once for a given handle. It will fail and return [`cufftResult::CUFFT_INVALID_PLAN`] if the plan is locked, i.e. the handle was previously used with a different `cufftPlan` or `cufftMakePlan` call.
179    ///
180    /// # Parameters
181    ///
182    /// - `plan`: Pointer to an uninitialized [`cufftHandle`] object.
183    ///
184    /// Contains a cuFFT 2D plan handle value.
185    /// - `nx`: The transform size in the *x* dimension This is slowest changing dimension of a transform (strided in memory).
186    /// - `ny`: The transform size in the *y* dimension. This is fastest changing dimension of a transform (contiguous in memory).
187    ///
188    /// # Return value
189    ///
190    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
191    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
192    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle. Handle is not valid when the plan is locked.
193    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: Either or both of the `nx` or `ny` parameters is not a supported size.
194    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
195    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
196    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
197    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
198    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
199    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully created the FFT plan.
200    pub fn cufftPlan2d(
201        plan: *mut cufftHandle,
202        nx: ::core::ffi::c_int,
203        ny: ::core::ffi::c_int,
204        type_: cufftType,
205    ) -> cufftResult;
206}
207unsafe extern "C" {
208    /// Creates a 3D FFT plan configuration according to specified signal sizes and data type. This function is the same as [`cufftPlan2d`] except that it takes a third size parameter `nz`.
209    ///
210    /// This call can only be used once for a given handle. It will fail and return [`cufftResult::CUFFT_INVALID_PLAN`] if the plan is locked, i.e. the handle was previously used with a different `cufftPlan` or `cufftMakePlan` call.
211    ///
212    /// # Parameters
213    ///
214    /// - `plan`: Pointer to an uninitialized [`cufftHandle`] object.
215    ///
216    /// Contains a cuFFT 3D plan handle value.
217    /// - `nx`: The transform size in the *x* dimension. This is slowest changing dimension of a transform (strided in memory).
218    /// - `ny`: The transform size in the *y* dimension.
219    /// - `nz`: The transform size in the *z* dimension. This is fastest changing dimension of a transform (contiguous in memory).
220    ///
221    /// # Return value
222    ///
223    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
224    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
225    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle. Handle is not valid when the plan is locked.
226    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: One or more of the `nx`, `ny`, or `nz` parameters is not a supported size.
227    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
228    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
229    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
230    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
231    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
232    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully created the FFT plan.
233    pub fn cufftPlan3d(
234        plan: *mut cufftHandle,
235        nx: ::core::ffi::c_int,
236        ny: ::core::ffi::c_int,
237        nz: ::core::ffi::c_int,
238        type_: cufftType,
239    ) -> cufftResult;
240}
241unsafe extern "C" {
242    /// Creates a FFT plan configuration of dimension `rank`, with sizes specified in the array `n`. The `batch` input parameter tells cuFFT how many transforms to configure. With this function, batched plans of 1, 2, or 3 dimensions may be created.
243    ///
244    /// The [`cufftPlanMany`] API supports more complicated input and output data layouts via the advanced data layout parameters: `inembed`, `istride`, `idist`, `onembed`, `ostride`, and `odist`.
245    ///
246    /// If `inembed` and `onembed` are set to `NULL`, all other stride information is ignored, and default strides are used. The default assumes contiguous data arrays.
247    ///
248    /// All arrays are assumed to be in CPU memory.
249    ///
250    /// Please note that behavior of [`cufftPlanMany`] function when `inembed` and `onembed` is `NULL` is different than corresponding function in FFTW library `fftw_plan_many_dft`.
251    ///
252    /// This call can only be used once for a given handle. It will fail and return [`cufftResult::CUFFT_INVALID_PLAN`] if the plan is locked, i.e. the handle was previously used with a different `cufftPlan` or `cufftMakePlan` call.
253    ///
254    /// # Parameters
255    ///
256    /// - `plan`: Pointer to an uninitialized [`cufftHandle`] object.
257    ///
258    /// Contains a cuFFT plan handle.
259    /// - `rank`: Dimensionality of the transform (1, 2, or 3).
260    /// - `n`: Array of size `rank`, describing the size of each dimension, `n\[0\]` being the size of the outermost and `n\[rank-1\]` innermost (contiguous) dimension of a transform.
261    /// - `inembed`: Pointer of size `rank` that indicates the storage dimensions of the input data in memory. If set to NULL all other advanced data layout parameters are ignored.
262    /// - `istride`: Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.
263    /// - `idist`: Indicates the distance between the first element of two consecutive signals in a batch of the input data.
264    /// - `onembed`: Pointer of size `rank` that indicates the storage dimensions of the output data in memory. If set to NULL all other advanced data layout parameters are ignored.
265    /// - `ostride`: Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.
266    /// - `odist`: Indicates the distance between the first element of two consecutive signals in a batch of the output data.
267    /// - `batch`: Batch size for this transform.
268    ///
269    /// # Return value
270    ///
271    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
272    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
273    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle. Handle is not valid when the plan is locked.
274    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: One or more of the parameters is not a supported size.
275    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
276    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
277    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
278    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
279    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
280    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully created the FFT plan.
281    pub fn cufftPlanMany(
282        plan: *mut cufftHandle,
283        rank: ::core::ffi::c_int,
284        n: *mut ::core::ffi::c_int,
285        inembed: *mut ::core::ffi::c_int,
286        istride: ::core::ffi::c_int,
287        idist: ::core::ffi::c_int,
288        onembed: *mut ::core::ffi::c_int,
289        ostride: ::core::ffi::c_int,
290        odist: ::core::ffi::c_int,
291        type_: cufftType,
292        batch: ::core::ffi::c_int,
293    ) -> cufftResult;
294}
295unsafe extern "C" {
296    /// Following a call to [`cufftCreate`] makes a 1D FFT plan configuration for a specified signal size and data type. The `batch` input parameter tells cuFFT how many 1D transforms to configure.
297    ///
298    /// This call can only be used once for a given handle. It will fail and return [`cufftResult::CUFFT_INVALID_PLAN`] if the plan is locked, i.e. the handle was previously used with a different `cufftPlan` or `cufftMakePlan` call.
299    ///
300    /// If `cufftXtSetGPUs()` was called prior to this call with multiple GPUs, then `workSize` will contain multiple sizes. See sections on multiple GPUs for more details.
301    ///
302    /// # Parameters
303    ///
304    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
305    /// - `nx`: The transform size (e.g. 256 for a 256-point FFT). For multiple GPUs, this must be a power of 2.
306    /// - `batch`: Number of transforms of size `nx`. Please consider using [`cufftMakePlanMany`] for multiple transforms.
307    /// - `workSize`: Pointer to the size(s), in bytes, of the work areas. For example for two GPUs worksize must be declared to have two elements.
308    ///
309    /// Pointer to the size(s) of the work areas.
310    ///
311    /// # Return value
312    ///
313    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
314    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
315    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle. Handle is not valid when the plan is locked or multi-GPU restrictions are not met.
316    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: The `nx` or `batch` parameter is not a supported size.
317    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
318    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
319    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
320    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
321    /// - [`cufftResult_t::CUFFT_SETUP_FAILED`]`: The cuFFT library failed to initialize.
322    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully created the FFT plan.
323    pub fn cufftMakePlan1d(
324        plan: cufftHandle,
325        nx: ::core::ffi::c_int,
326        type_: cufftType,
327        batch: ::core::ffi::c_int,
328        workSize: *mut size_t,
329    ) -> cufftResult;
330}
331unsafe extern "C" {
332    /// Following a call to [`cufftCreate`] makes a 2D FFT plan configuration according to specified signal sizes and data type.
333    ///
334    /// This call can only be used once for a given handle. It will fail and return [`cufftResult::CUFFT_INVALID_PLAN`] if the plan is locked, i.e. the handle was previously used with a different `cufftPlan` or `cufftMakePlan` call.
335    ///
336    /// If `cufftXtSetGPUs()` was called prior to this call with multiple GPUs, then `workSize` will contain multiple sizes. See sections on multiple GPUs for more details.
337    ///
338    /// # Parameters
339    ///
340    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
341    /// - `nx`: The transform size in the *x* dimension. This is slowest changing dimension of a transform (strided in memory). For multiple GPUs, this must be factorable into primes less than or equal to 127.
342    /// - `ny`: The transform size in the *y* dimension. This is fastest changing dimension of a transform (contiguous in memory). For 2 GPUs, this must be factorable into primes less than or equal to 127.
343    /// - `workSize`: Pointer to the size(s), in bytes, of the work areas. For example for two GPUs worksize must be declared to have two elements.
344    ///
345    /// Pointer to the size(s) of the work areas.
346    ///
347    /// # Return value
348    ///
349    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
350    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
351    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
352    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: Either or both of the `nx` or `ny` parameters is not a supported size.
353    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
354    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
355    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
356    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
357    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
358    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully created the FFT plan.
359    pub fn cufftMakePlan2d(
360        plan: cufftHandle,
361        nx: ::core::ffi::c_int,
362        ny: ::core::ffi::c_int,
363        type_: cufftType,
364        workSize: *mut size_t,
365    ) -> cufftResult;
366}
367unsafe extern "C" {
368    /// Following a call to [`cufftCreate`] makes a 3D FFT plan configuration according to specified signal sizes and data type. This function is the same as [`cufftPlan2d`] except that it takes a third size parameter `nz`.
369    ///
370    /// This call can only be used once for a given handle. It will fail and return [`cufftResult::CUFFT_INVALID_PLAN`] if the plan is locked, i.e. the handle was previously used with a different `cufftPlan` or `cufftMakePlan` call.
371    ///
372    /// If `cufftXtSetGPUs()` was called prior to this call with multiple GPUs, then `workSize` will contain multiple sizes. See sections on multiple GPUs for more details.
373    ///
374    /// # Parameters
375    ///
376    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
377    /// - `nx`: The transform size in the *x* dimension. This is slowest changing dimension of a transform (strided in memory). For multiple GPUs, this must be factorable into primes less than or equal to 127.
378    /// - `ny`: The transform size in the *y* dimension. For multiple GPUs, this must be factorable into primes less than or equal to 127.
379    /// - `nz`: The transform size in the *z* dimension. This is fastest changing dimension of a transform (contiguous in memory). For multiple GPUs, this must be factorable into primes less than or equal to 127.
380    /// - `workSize`: Pointer to the size(s), in bytes, of the work areas. For example for two GPUs worksize must be declared to have two elements.
381    ///
382    /// Pointer to the size(s) of the work area(s).
383    ///
384    /// # Return value
385    ///
386    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
387    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
388    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
389    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: One or more of the `nx`, `ny`, or `nz` parameters is not a supported size.
390    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
391    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
392    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
393    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
394    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
395    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully created the FFT plan.
396    pub fn cufftMakePlan3d(
397        plan: cufftHandle,
398        nx: ::core::ffi::c_int,
399        ny: ::core::ffi::c_int,
400        nz: ::core::ffi::c_int,
401        type_: cufftType,
402        workSize: *mut size_t,
403    ) -> cufftResult;
404}
405unsafe extern "C" {
406    /// Following a call to [`cufftCreate`] makes a FFT plan configuration of dimension `rank`, with sizes specified in the array `n`. The `batch` input parameter tells cuFFT how many transforms to configure. With this function, batched plans of 1, 2, or 3 dimensions may be created.
407    ///
408    /// The [`cufftPlanMany`] API supports more complicated input and output data layouts via the advanced data layout parameters: `inembed`, `istride`, `idist`, `onembed`, `ostride`, and `odist`.
409    ///
410    /// If `inembed` and `onembed` are set to `NULL`, all other stride information is ignored, and default strides are used. The default assumes contiguous data arrays.
411    ///
412    /// This call can only be used once for a given handle. It will fail and return [`cufftResult::CUFFT_INVALID_PLAN`] if the plan is locked, i.e. the handle was previously used with a different `cufftPlan` or `cufftMakePlan` call.
413    ///
414    /// If `cufftXtSetGPUs()` was called prior to this call with multiple GPUs, then `workSize` will contain multiple sizes. See sections on multiple GPUs for more details.
415    ///
416    /// All arrays are assumed to be in CPU memory.
417    ///
418    /// # Parameters
419    ///
420    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
421    /// - `rank`: Dimensionality of the transform (1, 2, or 3).
422    /// - `n`: Array of size `rank`, describing the size of each dimension, `n\[0\]` being the size of the outermost and `n\[rank-1\]` innermost (contiguous) dimension of a transform. For multiple GPUs and rank equal to 1, the sizes must be a power of 2. For multiple GPUs and rank equal to 2 or 3, the sizes must be factorable into primes less than or equal to 127.
423    /// - `inembed`: Pointer of size `rank` that indicates the storage dimensions of the input data in memory, `inembed\[0\]` being the storage dimension of the outermost dimension. If set to NULL all other advanced data layout parameters are ignored.
424    /// - `istride`: Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.
425    /// - `idist`: Indicates the distance between the first element of two consecutive signals in a batch of the input data.
426    /// - `onembed`: Pointer of size `rank` that indicates the storage dimensions of the output data in memory, `onembed\[0\]` being the storage dimension of the outermost dimension. If set to NULL all other advanced data layout parameters are ignored.
427    /// - `ostride`: Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.
428    /// - `odist`: Indicates the distance between the first element of two consecutive signals in a batch of the output data.
429    /// - `batch`: Batch size for this transform.
430    /// - `workSize`: Pointer to the size(s), in bytes, of the work areas. For example for two GPUs worksize must be declared to have two elements.
431    ///
432    /// Pointer to the size(s) of the work areas.
433    ///
434    /// # Return value
435    ///
436    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
437    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
438    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle. Handle is not valid when the plan is locked or multi-GPU restrictions are not met.
439    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: One or more of the parameters is not a supported size.
440    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
441    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
442    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
443    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
444    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
445    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully created the FFT plan.
446    pub fn cufftMakePlanMany(
447        plan: cufftHandle,
448        rank: ::core::ffi::c_int,
449        n: *mut ::core::ffi::c_int,
450        inembed: *mut ::core::ffi::c_int,
451        istride: ::core::ffi::c_int,
452        idist: ::core::ffi::c_int,
453        onembed: *mut ::core::ffi::c_int,
454        ostride: ::core::ffi::c_int,
455        odist: ::core::ffi::c_int,
456        type_: cufftType,
457        batch: ::core::ffi::c_int,
458        workSize: *mut size_t,
459    ) -> cufftResult;
460}
461unsafe extern "C" {
462    /// Following a call to [`cufftCreate`] makes a FFT plan configuration of dimension `rank`, with sizes specified in the array `n`. The `batch` input parameter tells cuFFT how many transforms to configure. With this function, batched plans of 1, 2, or 3 dimensions may be created.
463    ///
464    /// This API is identical to [`cufftMakePlanMany`] except that the arguments specifying sizes and strides are 64 bit integers. This API makes very large transforms possible. cuFFT includes kernels that use 32 bit indexes, and kernels that use 64 bit indexes. cuFFT planning selects 32 bit kernels whenever possible to avoid any overhead due to 64 bit arithmetic.
465    ///
466    /// All sizes and types of transform are supported by this interface, with two exceptions. For transforms whose size exceeds 4G elements, the dimensions specified in the array `n` must be factorable into primes that are less than or equal to 127. For real to complex and complex to real transforms whose size exceeds 4G elements, the fastest changing dimension must be even.
467    ///
468    /// The `cufftPlanMany64()` API supports more complicated input and output data layouts via the advanced data layout parameters: `inembed`, `istride`, `idist`, `onembed`, `ostride`, and `odist`.
469    ///
470    /// If `inembed` and `onembed` are set to `NULL`, all other stride information is ignored, and default strides are used. The default assumes contiguous data arrays.
471    ///
472    /// This call can only be used once for a given handle. It will fail and return [`cufftResult::CUFFT_INVALID_PLAN`] if the plan is locked, i.e. the handle was previously used with a different `cufftPlan` or `cufftMakePlan` call.
473    ///
474    /// If `cufftXtSetGPUs()` was called prior to this call with multiple GPUs, then `workSize` will contain multiple sizes. See sections on multiple GPUs for more details.
475    ///
476    /// All arrays are assumed to be in CPU memory.
477    ///
478    /// # Parameters
479    ///
480    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
481    /// - `rank`: Dimensionality of the transform (1, 2, or 3).
482    /// - `n`: Array of size `rank`, describing the size of each dimension. For multiple GPUs and rank equal to 1, the sizes must be a power of 2. For multiple GPUs and rank equal to 2 or 3, the sizes must be factorable into primes less than or equal to 127.
483    /// - `inembed`: Pointer of size `rank` that indicates the storage dimensions of the input data in memory. If set to NULL all other advanced data layout parameters are ignored.
484    /// - `istride`: Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.
485    /// - `idist`: Indicates the distance between the first element of two consecutive signals in a batch of the input data.
486    /// - `onembed`: Pointer of size `rank` that indicates the storage dimensions of the output data in memory. If set to NULL all other advanced data layout parameters are ignored.
487    /// - `ostride`: Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.
488    /// - `odist`: Indicates the distance between the first element of two consecutive signals in a batch of the output data.
489    /// - `batch`: Batch size for this transform.
490    /// - `workSize`: Pointer to the size(s), in bytes, of the work areas. For example for two GPUs worksize must be declared to have two elements.
491    ///
492    /// Pointer to the size(s) of the work areas.
493    ///
494    /// # Return value
495    ///
496    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
497    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
498    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle. Handle is not valid when the plan is locked or multi-GPU restrictions are not met.
499    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: One or more of the parameters is not a supported size.
500    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
501    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
502    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
503    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
504    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
505    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully created the FFT plan.
506    pub fn cufftMakePlanMany64(
507        plan: cufftHandle,
508        rank: ::core::ffi::c_int,
509        n: *mut ::core::ffi::c_longlong,
510        inembed: *mut ::core::ffi::c_longlong,
511        istride: ::core::ffi::c_longlong,
512        idist: ::core::ffi::c_longlong,
513        onembed: *mut ::core::ffi::c_longlong,
514        ostride: ::core::ffi::c_longlong,
515        odist: ::core::ffi::c_longlong,
516        type_: cufftType,
517        batch: ::core::ffi::c_longlong,
518        workSize: *mut size_t,
519    ) -> cufftResult;
520}
521unsafe extern "C" {
522    /// This call gives a more accurate estimate of the work area size required for a plan than `cufftEstimateSizeMany()`, given the specified parameters, and taking into account any plan settings that may have been made. If a work area size of 0 is returned it means no temporary storage is needed for evaluation.
523    ///
524    /// This API is identical to [`cufftMakePlanMany`] except that the arguments specifying sizes and strides are 64 bit integers. This API makes very large transforms possible. cuFFT includes kernels that use 32 bit indexes, and kernels that use 64 bit indexes. cuFFT planning selects 32 bit kernels whenever possible to avoid any overhead due to 64 bit arithmetic.
525    ///
526    /// All sizes and types of transform are supported by this interface, with two exceptions. For transforms whose total size exceeds 4G elements, the dimensions specified in the array `n` must be factorable into primes that are less than or equal to 127. For real to complex and complex to real transforms whose total size exceeds 4G elements, the fastest changing dimension must be even.
527    ///
528    /// # Parameters
529    ///
530    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
531    /// - `rank`: Dimensionality of the transform (1, 2, or 3).
532    /// - `n`: Array of size `rank`, describing the size of each dimension.
533    /// - `inembed`: Pointer of size `rank` that indicates the storage dimensions of the input data in memory. If set to NULL all other advanced data layout parameters are ignored.
534    /// - `istride`: Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.
535    /// - `idist`: Indicates the distance between the first element of two consecutive signals in a batch of the input data.
536    /// - `onembed`: Pointer of size `rank` that indicates the storage dimensions of the output data in memory. If set to NULL all other advanced data layout parameters are ignored.
537    /// - `ostride`: Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.
538    /// - `odist`: Indicates the distance between the first element of two consecutive signals in a batch of the output data.
539    /// - `batch`: Batch size for this transform.
540    /// - `workSize`: Pointer to the size(s), in bytes, of the work areas. For example for two GPUs worksize must be declared to have two elements.
541    ///
542    /// Pointer to the size of the work area.
543    ///
544    /// # Return value
545    ///
546    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
547    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
548    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
549    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: One or more of the parameters is not a supported size.
550    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
551    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
552    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
553    pub fn cufftGetSizeMany64(
554        plan: cufftHandle,
555        rank: ::core::ffi::c_int,
556        n: *mut ::core::ffi::c_longlong,
557        inembed: *mut ::core::ffi::c_longlong,
558        istride: ::core::ffi::c_longlong,
559        idist: ::core::ffi::c_longlong,
560        onembed: *mut ::core::ffi::c_longlong,
561        ostride: ::core::ffi::c_longlong,
562        odist: ::core::ffi::c_longlong,
563        type_: cufftType,
564        batch: ::core::ffi::c_longlong,
565        workSize: *mut size_t,
566    ) -> cufftResult;
567}
568unsafe extern "C" {
569    /// During plan execution, cuFFT requires a work area for temporary storage of intermediate results. This call returns an estimate for the size of the work area required, given the specified parameters, and assuming default plan settings.
570    ///
571    /// # Parameters
572    ///
573    /// - `nx`: The transform size (e.g. 256 for a 256-point FFT).
574    /// - `batch`: Number of transforms of size `nx`. Please consider using [`cufftEstimateMany`] for multiple transforms.
575    /// - `workSize`: Pointer to the size, in bytes, of the work space.
576    ///
577    /// Pointer to the size of the work space.
578    ///
579    /// # Return value
580    ///
581    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
582    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
583    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: The `nx` parameter is not a supported size.
584    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
585    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
586    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
587    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
588    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
589    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
590    pub fn cufftEstimate1d(
591        nx: ::core::ffi::c_int,
592        type_: cufftType,
593        batch: ::core::ffi::c_int,
594        workSize: *mut size_t,
595    ) -> cufftResult;
596}
597unsafe extern "C" {
598    /// During plan execution, cuFFT requires a work area for temporary storage of intermediate results. This call returns an estimate for the size of the work area required, given the specified parameters, and assuming default plan settings. If a work area size of 0 is returned it means no temporary storage is needed for evaluation.
599    ///
600    /// # Parameters
601    ///
602    /// - `nx`: The transform size in the *x* dimension (number of rows).
603    /// - `ny`: The transform size in the *y* dimension (number of columns).
604    /// - `workSize`: Pointer to the size, in bytes, of the work space.
605    ///
606    /// Pointer to the size of the work space.
607    ///
608    /// # Return value
609    ///
610    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
611    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
612    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: Either or both of the `nx` or `ny` parameters is not a supported size.
613    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
614    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
615    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
616    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
617    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
618    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
619    pub fn cufftEstimate2d(
620        nx: ::core::ffi::c_int,
621        ny: ::core::ffi::c_int,
622        type_: cufftType,
623        workSize: *mut size_t,
624    ) -> cufftResult;
625}
626unsafe extern "C" {
627    /// During plan execution, cuFFT requires a work area for temporary storage of intermediate results. This call returns an estimate for the size of the work area required, given the specified parameters, and assuming default plan settings. If a work area size of 0 is returned it means no temporary storage is needed for evaluation.
628    ///
629    /// # Parameters
630    ///
631    /// - `nx`: The transform size in the *x* dimension.
632    /// - `ny`: The transform size in the *y* dimension.
633    /// - `nz`: The transform size in the *z* dimension.
634    /// - `workSize`: Pointer to the size, in bytes, of the work space.
635    ///
636    /// Pointer to the size of the work space.
637    ///
638    /// # Return value
639    ///
640    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
641    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
642    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: One or more of the `nx`, `ny`, or `nz` parameters is not a supported size.
643    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
644    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
645    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
646    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
647    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
648    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
649    pub fn cufftEstimate3d(
650        nx: ::core::ffi::c_int,
651        ny: ::core::ffi::c_int,
652        nz: ::core::ffi::c_int,
653        type_: cufftType,
654        workSize: *mut size_t,
655    ) -> cufftResult;
656}
657unsafe extern "C" {
658    /// During plan execution, cuFFT requires a work area for temporary storage of intermediate results. This call returns an estimate for the size of the work area required, given the specified parameters, and assuming default plan settings. If a work area size of 0 is returned it means no temporary storage is needed for evaluation.
659    ///
660    /// The [`cufftEstimateMany`] API supports more complicated input and output data layouts via the advanced data layout parameters: `inembed`, `istride`, `idist`, `onembed`, `ostride`, and `odist`.
661    ///
662    /// All arrays are assumed to be in CPU memory.
663    ///
664    /// # Parameters
665    ///
666    /// - `rank`: Dimensionality of the transform (1, 2, or 3).
667    /// - `n`: Array of size `rank`, describing the size of each dimension.
668    /// - `inembed`: Pointer of size `rank` that indicates the storage dimensions of the input data in memory. If set to NULL all other advanced data layout parameters are ignored.
669    /// - `istride`: Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.
670    /// - `idist`: Indicates the distance between the first element of two consecutive signals in a batch of the input data.
671    /// - `onembed`: Pointer of size `rank` that indicates the storage dimensions of the output data in memory. If set to NULL all other advanced data layout parameters are ignored.
672    /// - `ostride`: Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.
673    /// - `odist`: Indicates the distance between the first element of two consecutive signals in a batch of the output data.
674    /// - `batch`: Batch size for this transform.
675    /// - `workSize`: Pointer to the size, in bytes, of the work space.
676    ///
677    /// Pointer to the size of the work space.
678    ///
679    /// # Return value
680    ///
681    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
682    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
683    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: One or more of the parameters is not a supported size.
684    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
685    /// - [`cufftResult::CUFFT_MISSING_DEPENDENCY`]: The cuFFT library was unable to find a dependency either because it is missing or the version found is incompatible.
686    /// - [`cufftResult::CUFFT_NVJITLINK_FAILURE`]: nvJitLink encountered an error during planning.
687    /// - [`cufftResult::CUFFT_NVRTC_FAILURE`]: NVRTC encountered an error during planning.
688    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
689    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
690    pub fn cufftEstimateMany(
691        rank: ::core::ffi::c_int,
692        n: *mut ::core::ffi::c_int,
693        inembed: *mut ::core::ffi::c_int,
694        istride: ::core::ffi::c_int,
695        idist: ::core::ffi::c_int,
696        onembed: *mut ::core::ffi::c_int,
697        ostride: ::core::ffi::c_int,
698        odist: ::core::ffi::c_int,
699        type_: cufftType,
700        batch: ::core::ffi::c_int,
701        workSize: *mut size_t,
702    ) -> cufftResult;
703}
704unsafe extern "C" {
705    /// Creates only an opaque handle, and allocates small data structures on the host. The `cufftMakePlan*()` calls actually do the plan generation.
706    ///
707    /// # Return value
708    ///
709    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of resources for the plan failed.
710    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
711    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
712    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
713    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully created the FFT plan.
714    pub fn cufftCreate(handle: *mut cufftHandle) -> cufftResult;
715}
716unsafe extern "C" {
717    /// This call gives a more accurate estimate of the work area size required for a plan than [`cufftEstimate1d`], given the specified parameters, and taking into account any plan settings that may have been made. If a work area size of 0 is returned it means no temporary storage is needed for evaluation.
718    ///
719    /// # Parameters
720    ///
721    /// - `nx`: The transform size (e.g. 256 for a 256-point FFT).
722    /// - `batch`: Number of transforms of size `nx`. Please consider using [`cufftGetSizeMany`] for multiple transforms.
723    /// - `workSize`: Pointer to the size(s), in bytes, of the work areas. For example for two GPUs worksize must be declared to have two elements.
724    ///
725    /// Pointer to the size of the work space.
726    ///
727    /// # Return value
728    ///
729    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
730    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
731    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
732    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: The `nx` parameter is not a supported size.
733    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
734    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
735    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
736    pub fn cufftGetSize1d(
737        handle: cufftHandle,
738        nx: ::core::ffi::c_int,
739        type_: cufftType,
740        batch: ::core::ffi::c_int,
741        workSize: *mut size_t,
742    ) -> cufftResult;
743}
744unsafe extern "C" {
745    /// This call gives a more accurate estimate of the work area size required for a plan than [`cufftEstimate2d`], given the specified parameters, and taking into account any plan settings that may have been made. If a work area size of 0 is returned it means no temporary storage is needed for evaluation.
746    ///
747    /// # Parameters
748    ///
749    /// - `nx`: The transform size in the *x* dimension (number of rows).
750    /// - `ny`: The transform size in the *y* dimension (number of columns).
751    /// - `workSize`: Pointer to the size(s), in bytes, of the work areas. For example for two GPUs worksize must be declared to have two elements.
752    ///
753    /// Pointer to the size of the work space.
754    ///
755    /// # Return value
756    ///
757    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
758    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
759    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
760    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: Either or both of the `nx` or `ny` parameters is not a supported size.
761    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
762    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
763    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
764    pub fn cufftGetSize2d(
765        handle: cufftHandle,
766        nx: ::core::ffi::c_int,
767        ny: ::core::ffi::c_int,
768        type_: cufftType,
769        workSize: *mut size_t,
770    ) -> cufftResult;
771}
772unsafe extern "C" {
773    /// This call gives a more accurate estimate of the work area size required for a plan than [`cufftEstimate3d`], given the specified parameters, and taking into account any plan settings that may have been made. If a work area size of 0 is returned it means no temporary storage is needed for evaluation.
774    ///
775    /// # Parameters
776    ///
777    /// - `nx`: The transform size in the *x* dimension.
778    /// - `ny`: The transform size in the *y* dimension.
779    /// - `nz`: The transform size in the *z* dimension.
780    /// - `workSize`: Pointer to the size(s), in bytes, of the work areas. For example for two GPUs worksize must be declared to have two elements.
781    ///
782    /// Pointer to the size of the work space.
783    ///
784    /// # Return value
785    ///
786    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
787    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
788    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
789    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: One or more of the `nx`, `ny`, or `nz` parameters is not a supported size.
790    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
791    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
792    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
793    pub fn cufftGetSize3d(
794        handle: cufftHandle,
795        nx: ::core::ffi::c_int,
796        ny: ::core::ffi::c_int,
797        nz: ::core::ffi::c_int,
798        type_: cufftType,
799        workSize: *mut size_t,
800    ) -> cufftResult;
801}
802unsafe extern "C" {
803    /// This call gives a more accurate estimate of the work area size required for a plan than `cufftEstimateSizeMany()`, given the specified parameters, and taking into account any plan settings that may have been made. If a work area size of 0 is returned it means no temporary storage is needed for evaluation.
804    ///
805    /// # Parameters
806    ///
807    /// - `rank`: Dimensionality of the transform (1, 2, or 3).
808    /// - `n`: Array of size `rank`, describing the size of each dimension.
809    /// - `inembed`: Pointer of size `rank` that indicates the storage dimensions of the input data in memory. If set to NULL all other advanced data layout parameters are ignored.
810    /// - `istride`: Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.
811    /// - `idist`: Indicates the distance between the first element of two consecutive signals in a batch of the input data.
812    /// - `onembed`: Pointer of size `rank` that indicates the storage dimensions of the output data in memory. If set to NULL all other advanced data layout parameters are ignored.
813    /// - `ostride`: Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.
814    /// - `odist`: Indicates the distance between the first element of two consecutive signals in a batch of the output data.
815    /// - `batch`: Batch size for this transform.
816    ///
817    /// # Return value
818    ///
819    /// - [`cufftResult::CUFFT_ALLOC_FAILED`]: The allocation of GPU resources for the plan failed.
820    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
821    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
822    /// - [`cufftResult::CUFFT_INVALID_SIZE`]: One or more of the parameters is not a supported size.
823    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: One or more invalid parameters were passed to the API.
824    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
825    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
826    pub fn cufftGetSizeMany(
827        handle: cufftHandle,
828        rank: ::core::ffi::c_int,
829        n: *mut ::core::ffi::c_int,
830        inembed: *mut ::core::ffi::c_int,
831        istride: ::core::ffi::c_int,
832        idist: ::core::ffi::c_int,
833        onembed: *mut ::core::ffi::c_int,
834        ostride: ::core::ffi::c_int,
835        odist: ::core::ffi::c_int,
836        type_: cufftType,
837        batch: ::core::ffi::c_int,
838        workArea: *mut size_t,
839    ) -> cufftResult;
840}
841unsafe extern "C" {
842    /// Once plan generation has been done, either with the original API or the extensible API, this call returns the actual size of the work area required to support the plan. Callers who choose to manage work area allocation within their application must use this call after plan generation, and after any `cufftSet*()` calls subsequent to plan generation, if those calls might alter the required work space size.
843    ///
844    /// # Parameters
845    ///
846    /// - `workSize`: Pointer to the size(s), in bytes, of the work areas. For example for two GPUs worksize must be declared to have two elements.
847    ///
848    /// Pointer to the size of the work area.
849    ///
850    /// # Return value
851    ///
852    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
853    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
854    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
855    pub fn cufftGetSize(handle: cufftHandle, workSize: *mut size_t) -> cufftResult;
856}
857unsafe extern "C" {
858    /// [`cufftSetWorkArea`] overrides the work area pointer associated with a plan. If the work area was auto-allocated, cuFFT frees the auto-allocated space. The `cufftExec*()` calls assume that the work area pointer is valid and that it points to a contiguous region in device memory that does not overlap with any other work area. If this is not the case, results are indeterminate.
859    ///
860    /// # Parameters
861    ///
862    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
863    /// - `workArea`: Pointer to `workArea`. For multiple GPUs, multiple work area pointers must be given.
864    ///
865    /// # Return value
866    ///
867    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
868    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
869    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
870    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
871    pub fn cufftSetWorkArea(
872        plan: cufftHandle,
873        workArea: *mut ::core::ffi::c_void,
874    ) -> cufftResult;
875}
876unsafe extern "C" {
877    /// [`cufftSetAutoAllocation`] indicates that the caller intends to allocate and manage work areas for plans that have been generated. cuFFT default behavior is to allocate the work area at plan generation time. If [`cufftSetAutoAllocation`] has been called with autoAllocate set to 0 (“false”) prior to one of the `cufftMakePlan*()` calls, cuFFT does not allocate the work area. This is the preferred sequence for callers wishing to manage work area allocation.
878    ///
879    /// # Parameters
880    ///
881    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
882    /// - `autoAllocate`: Indicates whether to allocate work area.
883    ///
884    /// # Return value
885    ///
886    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
887    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
888    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
889    pub fn cufftSetAutoAllocation(
890        plan: cufftHandle,
891        autoAllocate: ::core::ffi::c_int,
892    ) -> cufftResult;
893}
894unsafe extern "C" {
895    /// [`cufftExecC2C`] ([`cufftExecZ2Z`]) executes a single-precision (double-precision) complex-to-complex transform plan in the transform direction as specified by `direction` parameter. cuFFT uses the GPU memory pointed to by the `idata` parameter as input data. This function stores the Fourier coefficients in the `odata` array. If `idata` and `odata` are the same, this method does an in-place transform.
896    ///
897    /// # Parameters
898    ///
899    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
900    /// - `idata`: Pointer to the complex input data (in GPU memory) to transform.
901    /// - `odata`: Pointer to the complex output data (in GPU memory).
902    ///
903    /// ontains the complex Fourier coefficients.
904    /// - `direction`: The transform direction: [`CUFFT_FORWARD`] or [`CUFFT_INVERSE`].
905    ///
906    /// # Return value
907    ///
908    /// - [`cufftResult::CUFFT_EXEC_FAILED`]: cuFFT failed to execute the transform on the GPU.
909    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
910    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
911    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: At least one of the parameters `idata`, `odata`, and `direction` is not valid.
912    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
913    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
914    pub fn cufftExecC2C(
915        plan: cufftHandle,
916        idata: *mut cufftComplex,
917        odata: *mut cufftComplex,
918        direction: ::core::ffi::c_int,
919    ) -> cufftResult;
920}
921unsafe extern "C" {
922    /// [`cufftExecR2C`] ([`cufftExecD2Z`]) executes a single-precision (double-precision) real-to-complex, implicitly forward, cuFFT transform plan. cuFFT uses as input data the GPU memory pointed to by the `idata` parameter. This function stores the nonredundant Fourier coefficients in the `odata` array. Pointers to `idata` and `odata` are both required to be aligned to [`cufftComplex`] data type in single-precision transforms and [`cufftDoubleComplex`] data type in double-precision transforms. If `idata` and `odata` are the same, this method does an in-place transform. Note the data layout differences between in-place and out-of-place transforms as described in Parameter cufftType.
923    ///
924    /// # Parameters
925    ///
926    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
927    /// - `idata`: Pointer to the real input data (in GPU memory) to transform.
928    /// - `odata`: Pointer to the complex output data (in GPU memory).
929    ///
930    /// Contains the complex Fourier coefficients.
931    ///
932    /// # Return value
933    ///
934    /// - [`cufftResult::CUFFT_EXEC_FAILED`]: cuFFT failed to execute the transform on the GPU.
935    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
936    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
937    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: At least one of the parameters `idata` and `odata` is not valid.
938    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
939    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
940    pub fn cufftExecR2C(
941        plan: cufftHandle,
942        idata: *mut cufftReal,
943        odata: *mut cufftComplex,
944    ) -> cufftResult;
945}
946unsafe extern "C" {
947    /// [`cufftExecC2R`] ([`cufftExecZ2D`]) executes a single-precision (double-precision) complex-to-real, implicitly inverse, cuFFT transform plan. cuFFT uses as input data the GPU memory pointed to by the `idata` parameter. The input array holds only the nonredundant complex Fourier coefficients. This function stores the real output values in the `odata` array. and pointers are both required to be aligned to [`cufftComplex`] data type in single-precision transforms and [`cufftDoubleComplex`] type in double-precision transforms. If `idata` and `odata` are the same, this method does an in-place transform.
948    ///
949    /// # Parameters
950    ///
951    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
952    /// - `idata`: Pointer to the complex input data (in GPU memory) to transform.
953    /// - `odata`: Pointer to the real output data (in GPU memory).
954    ///
955    /// Contains the real output data.
956    ///
957    /// # Return value
958    ///
959    /// - [`cufftResult::CUFFT_EXEC_FAILED`]: cuFFT failed to execute the transform on the GPU.
960    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
961    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
962    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: At least one of the parameters `idata` and `odata` is not valid.
963    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
964    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully executed the FFT plan.
965    pub fn cufftExecC2R(
966        plan: cufftHandle,
967        idata: *mut cufftComplex,
968        odata: *mut cufftReal,
969    ) -> cufftResult;
970}
971unsafe extern "C" {
972    /// [`cufftExecC2C`] ([`cufftExecZ2Z`]) executes a single-precision (double-precision) complex-to-complex transform plan in the transform direction as specified by `direction` parameter. cuFFT uses the GPU memory pointed to by the `idata` parameter as input data. This function stores the Fourier coefficients in the `odata` array. If `idata` and `odata` are the same, this method does an in-place transform.
973    ///
974    /// # Parameters
975    ///
976    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
977    /// - `idata`: Pointer to the complex input data (in GPU memory) to transform.
978    /// - `odata`: Pointer to the complex output data (in GPU memory).
979    ///
980    /// ontains the complex Fourier coefficients.
981    /// - `direction`: The transform direction: [`CUFFT_FORWARD`] or [`CUFFT_INVERSE`].
982    ///
983    /// # Return value
984    ///
985    /// - [`cufftResult::CUFFT_EXEC_FAILED`]: cuFFT failed to execute the transform on the GPU.
986    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
987    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
988    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: At least one of the parameters `idata`, `odata`, and `direction` is not valid.
989    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
990    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
991    pub fn cufftExecZ2Z(
992        plan: cufftHandle,
993        idata: *mut cufftDoubleComplex,
994        odata: *mut cufftDoubleComplex,
995        direction: ::core::ffi::c_int,
996    ) -> cufftResult;
997}
998unsafe extern "C" {
999    /// [`cufftExecR2C`] ([`cufftExecD2Z`]) executes a single-precision (double-precision) real-to-complex, implicitly forward, cuFFT transform plan. cuFFT uses as input data the GPU memory pointed to by the `idata` parameter. This function stores the nonredundant Fourier coefficients in the `odata` array. Pointers to `idata` and `odata` are both required to be aligned to [`cufftComplex`] data type in single-precision transforms and [`cufftDoubleComplex`] data type in double-precision transforms. If `idata` and `odata` are the same, this method does an in-place transform. Note the data layout differences between in-place and out-of-place transforms as described in Parameter cufftType.
1000    ///
1001    /// # Parameters
1002    ///
1003    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
1004    /// - `idata`: Pointer to the real input data (in GPU memory) to transform.
1005    /// - `odata`: Pointer to the complex output data (in GPU memory).
1006    ///
1007    /// Contains the complex Fourier coefficients.
1008    ///
1009    /// # Return value
1010    ///
1011    /// - [`cufftResult::CUFFT_EXEC_FAILED`]: cuFFT failed to execute the transform on the GPU.
1012    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
1013    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
1014    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: At least one of the parameters `idata` and `odata` is not valid.
1015    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
1016    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully returned the size of the work space.
1017    pub fn cufftExecD2Z(
1018        plan: cufftHandle,
1019        idata: *mut cufftDoubleReal,
1020        odata: *mut cufftDoubleComplex,
1021    ) -> cufftResult;
1022}
1023unsafe extern "C" {
1024    /// [`cufftExecC2R`] ([`cufftExecZ2D`]) executes a single-precision (double-precision) complex-to-real, implicitly inverse, cuFFT transform plan. cuFFT uses as input data the GPU memory pointed to by the `idata` parameter. The input array holds only the nonredundant complex Fourier coefficients. This function stores the real output values in the `odata` array. and pointers are both required to be aligned to [`cufftComplex`] data type in single-precision transforms and [`cufftDoubleComplex`] type in double-precision transforms. If `idata` and `odata` are the same, this method does an in-place transform.
1025    ///
1026    /// # Parameters
1027    ///
1028    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
1029    /// - `idata`: Pointer to the complex input data (in GPU memory) to transform.
1030    /// - `odata`: Pointer to the real output data (in GPU memory).
1031    ///
1032    /// Contains the real output data.
1033    ///
1034    /// # Return value
1035    ///
1036    /// - [`cufftResult::CUFFT_EXEC_FAILED`]: cuFFT failed to execute the transform on the GPU.
1037    /// - [`cufftResult::CUFFT_INTERNAL_ERROR`]: An internal driver error was detected.
1038    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
1039    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: At least one of the parameters `idata` and `odata` is not valid.
1040    /// - [`cufftResult::CUFFT_SETUP_FAILED`]: The cuFFT library failed to initialize.
1041    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully executed the FFT plan.
1042    pub fn cufftExecZ2D(
1043        plan: cufftHandle,
1044        idata: *mut cufftDoubleComplex,
1045        odata: *mut cufftDoubleReal,
1046    ) -> cufftResult;
1047}
1048unsafe extern "C" {
1049    /// Associates a CUDA stream with a cuFFT plan. All kernel launches made during plan execution are now done through the associated stream, enabling overlap with activity in other streams (e.g. data copying). The association remains until the plan is destroyed or the stream is changed with another call to [`cufftSetStream`].
1050    ///
1051    /// Note that starting from CUDA 11.2 (cuFFT 10.4.0), [`cufftSetStream`] is supported on multi-GPU plans. When associating a stream with a plan, `cufftXtMemcpy()` remains synchronous across the multiple GPUs. For previous versions of cuFFT, [`cufftSetStream`] will return an error in multiple GPU plans.
1052    ///
1053    /// Note that starting from CUDA 12.2 (cuFFT 11.0.8), on multi-GPU plans, `stream` can be associated with any context on any GPU. However, repeated calls to [`cufftSetStream`] with streams from different contexts incur a small time penalty. Optimal performance is obtained when repeated calls to [`cufftSetStream`] use streams from the same CUDA context.
1054    ///
1055    /// # Parameters
1056    ///
1057    /// - `plan`: The [`cufftHandle`] object to associate with the stream.
1058    /// - `stream`: A valid CUDA stream created with `cudaStreamCreate()`; `0` for the default stream.
1059    ///
1060    /// # Return value
1061    ///
1062    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle, or plan is multi-gpu in cuFFT version prior to 10.4.0.
1063    /// - [`cufftResult::CUFFT_SUCCESS`]: The stream was associated with the plan.
1064    pub fn cufftSetStream(plan: cufftHandle, stream: cudaStream_t) -> cufftResult;
1065}
1066unsafe extern "C" {
1067    /// Frees all GPU resources associated with a cuFFT plan and destroys the internal plan data structure. This function should be called once a plan is no longer needed, to avoid wasting GPU memory.
1068    /// In the case of multi-GPU plans, the plan created first should be destroyed last.
1069    ///
1070    /// # Parameters
1071    ///
1072    /// - `plan`: The [`cufftHandle`] object of the plan to be destroyed.
1073    ///
1074    /// # Return value
1075    ///
1076    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
1077    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully destroyed the FFT plan.
1078    pub fn cufftDestroy(plan: cufftHandle) -> cufftResult;
1079}
1080unsafe extern "C" {
1081    /// Returns the version number of cuFFT.
1082    ///
1083    /// # Parameters
1084    ///
1085    /// - `version`: Pointer to the version number.
1086    ///
1087    /// Contains the version number.
1088    pub fn cufftGetVersion(version: *mut ::core::ffi::c_int) -> cufftResult;
1089}
1090unsafe extern "C" {
1091    /// Return in `*value` the number for the property described by `type` of the dynamically linked CUFFT library.
1092    ///
1093    /// # Parameters
1094    ///
1095    /// - `value`: Contains the integer value for the requested property.
1096    ///
1097    /// # Return value
1098    ///
1099    /// - [`cufftResult::CUFFT_INVALID_TYPE`]: The property type is not recognized.
1100    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: `value` is `NULL`.
1101    /// - [`cufftResult::CUFFT_SUCCESS`]: The property value was successfully returned.
1102    pub fn cufftGetProperty(
1103        type_: libraryPropertyType,
1104        value: *mut ::core::ffi::c_int,
1105    ) -> cufftResult;
1106}
1107#[repr(u32)]
1108#[derive(
1109    Debug,
1110    Copy,
1111    Clone,
1112    Hash,
1113    PartialOrd,
1114    Ord,
1115    PartialEq,
1116    Eq,
1117    TryFromPrimitive,
1118    IntoPrimitive,
1119)]
1120pub enum cufftProperty_t {
1121    NVFFT_PLAN_PROPERTY_INT64_PATIENT_JIT = 1,
1122    NVFFT_PLAN_PROPERTY_INT64_MAX_NUM_HOST_THREADS = 2,
1123}
1124pub use self::cufftProperty_t as cufftProperty;
1125unsafe extern "C" {
1126    /// Associates a cuFFT plan with a property identified by the key `property`. The value for the property is given by value `propertyValueInt64`, which is a signed long long integer.
1127    ///
1128    /// # Parameters
1129    ///
1130    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
1131    /// - `property`: The property identifier, of type `cufftPlanProperty`.
1132    ///
1133    /// # Return value
1134    ///
1135    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
1136    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: Invalid property or value with which to set the property.
1137    /// - [`cufftResult::CUFFT_NOT_SUPPORTED`]: The property is not supported, or it cannot be set at the time (e.g. some properties cannot be set after calling a planning routine for the plan, see cuFFT Plan Properties).
1138    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully set the property.
1139    pub fn cufftSetPlanPropertyInt64(
1140        plan: cufftHandle,
1141        property: cufftProperty,
1142        inputValueInt: ::core::ffi::c_longlong,
1143    ) -> cufftResult;
1144}
1145unsafe extern "C" {
1146    /// Retrieves the property value identified by the key `property` associated with the cuFFT plan `plan`. The value for the property, which is a signed long long integer, is set in the address space pointed by `propertyValueInt64`.
1147    ///
1148    /// # Parameters
1149    ///
1150    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
1151    /// - `property`: The property identifier, of type `cufftPlanProperty`.
1152    ///
1153    /// # Return value
1154    ///
1155    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
1156    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: Invalid property, or pointer `propertyValueInt64` is null.
1157    /// - [`cufftResult::CUFFT_NOT_SUPPORTED`]: The property is not supported.
1158    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully retrieved the property value.
1159    pub fn cufftGetPlanPropertyInt64(
1160        plan: cufftHandle,
1161        property: cufftProperty,
1162        returnPtrValue: *mut ::core::ffi::c_longlong,
1163    ) -> cufftResult;
1164}
1165unsafe extern "C" {
1166    /// Resets the value of the property identified by the key `property`, associated with the cuFFT plan `plan`, to its default value.
1167    ///
1168    /// # Parameters
1169    ///
1170    /// - `plan`: [`cufftHandle`] returned by [`cufftCreate`].
1171    /// - `property`: The property identifier, of type `cufftPlanProperty`.
1172    ///
1173    /// # Return value
1174    ///
1175    /// - [`cufftResult::CUFFT_INVALID_PLAN`]: The `plan` parameter is not a valid handle.
1176    /// - [`cufftResult::CUFFT_INVALID_VALUE`]: Invalid property.
1177    /// - [`cufftResult::CUFFT_NOT_SUPPORTED`]: The property is not supported for `plan`, or cannot be reset at present time (see Behavior column on cuFFT Plan Properties).
1178    /// - [`cufftResult::CUFFT_SUCCESS`]: cuFFT successfully reset the property value.
1179    pub fn cufftResetPlanProperty(
1180        plan: cufftHandle,
1181        property: cufftProperty,
1182    ) -> cufftResult;
1183}