muFFT API 参考
目录
- mufftXt1dFactors_t Structure
- size Variable
- stringCount Variable
- stringLength Variable
- substringLength Variable
- factor1 Variable
- factor2 Variable
- stringMask Variable
- substringMask Variable
- factor1Mask Variable
- factor2Mask Variable
- stringShift Variable
- substringShift Variable
- factor1Shift Variable
- factor2Shift Variable
- mufft.h File
- MUFFT_FORWARD Macro
- MUFFT_INVERSE Macro
- mufftResult_t Enumeration type
- MUFFT_SUCCESS Enumerator
- MUFFT_INVALID_PLAN Enumerator
- MUFFT_ALLOC_FAILED Enumerator
- MUFFT_INVALID_TYPE Enumerator
- MUFFT_INVALID_VALUE Enumerator
- MUFFT_INTERNAL_ERROR Enumerator
- MUFFT_EXEC_FAILED Enumerator
- MUFFT_SETUP_FAILED Enumerator
- MUFFT_INVALID_SIZE Enumerator
- MUFFT_UNALIGNED_DATA Enumerator
- MUFFT_INCOMPLETE_PARAMETER_LIST Enumerator
- MUFFT_INVALID_DEVICE Enumerator
- MUFFT_PARSE_ERROR Enumerator
- MUFFT_NO_WORKSPACE Enumerator
- MUFFT_NOT_IMPLEMENTED Enumerator
- MUFFT_LICENSE_ERROR Enumerator
- MUFFT_NOT_SUPPORTED Enumerator
- mufftType_t Enumeration type
- MUFFT_R2C Enumerator
- MUFFT_C2R Enumerator
- MUFFT_C2C Enumerator
- MUFFT_D2Z Enumerator
- MUFFT_Z2D Enumerator
- MUFFT_Z2Z Enumerator
- mufftResult Typedef
- mufftType Typedef
- mufftHandle Typedef
- mufftReal Typedef
- mufftDoubleReal Typedef
- mufftComplex Typedef
- mufftDoubleComplex Typedef
- mufftPlan1d Function
- mufftPlan2d Function
- mufftPlan3d Function
- mufftPlanMany Function
- mufftCreate Function
- mufftMakePlan1d Function
- mufftMakePlan2d Function
- mufftMakePlan3d Function
- mufftMakePlanMany Function
- mufftEstimate1d Function
- mufftEstimate2d Function
- mufftEstimate3d Function
- mufftEstimateMany Function
- mufftGetSize1d Function
- mufftGetSize2d Function
- mufftGetSize3d Function
- mufftGetSizeMany Function
- mufftGetSize Function
- mufftSetAutoAllocation Function
- mufftSetWorkArea Function
- mufftDestroy Function
- mufftExecC2C Function
- mufftExecR2C Function
- mufftExecC2R Function
- mufftExecZ2Z Function
- mufftExecD2Z Function
- mufftExecZ2D Function
- mufftSetStream Function
- mufftGetVersion Function
- mufftGetProperty Function
- mufftXt.h File
- mufftXtSubFormat_t Enumeration type
- MUFFT_XT_FORMAT_INPUT Enumerator
- MUFFT_XT_FORMAT_OUTPUT Enumerator
- MUFFT_XT_FORMAT_INPLACE Enumerator
- MUFFT_XT_FORMAT_INPLACE_SHUFFLED Enumerator
- MUFFT_XT_FORMAT_1D_INPUT_SHUFFLED Enumerator
- MUFFT_XT_FORMAT_DISTRIBUTED_INPUT Enumerator
- MUFFT_XT_FORMAT_DISTRIBUTED_OUTPUT Enumerator
- MUFFT_FORMAT_UNDEFINED Enumerator
- mufftXtCopyType_t Enumeration type
- MUFFT_COPY_HOST_TO_DEVICE Enumerator
- MUFFT_COPY_DEVICE_TO_HOST Enumerator
- MUFFT_COPY_DEVICE_TO_DEVICE Enumerator
- MUFFT_COPY_UNDEFINED Enumerator
- mufftXtQueryType_t Enumeration type
- MUFFT_QUERY_1D_FACTORS Enumerator
- MUFFT_QUERY_UNDEFINED Enumerator
- mufftXtWorkAreaPolicy_t Enumeration type
- MUFFT_WORKAREA_MINIMAL Enumerator
- MUFFT_WORKAREA_USER Enumerator
- MUFFT_WORKAREA_PERFORMANCE Enumerator
- mufftXtCallbackType_t Enumeration type
- MUFFT_CB_LD_COMPLEX Enumerator
- MUFFT_CB_LD_COMPLEX_DOUBLE Enumerator
- MUFFT_CB_LD_REAL Enumerator
- MUFFT_CB_LD_REAL_DOUBLE Enumerator
- MUFFT_CB_ST_COMPLEX Enumerator
- MUFFT_CB_ST_COMPLEX_DOUBLE Enumerator
- MUFFT_CB_ST_REAL Enumerator
- MUFFT_CB_ST_REAL_DOUBLE Enumerator
- MUFFT_CB_UNDEFINED Enumerator
- mufftXtSubFormat Typedef
- mufftXtCopyType Typedef
- mufftXtQueryType Typedef
- mufftXt1dFactors Typedef
- mufftXtWorkAreaPolicy Typedef
- mufftXtCallbackType Typedef
- mufftCallbackLoadC Typedef
- mufftCallbackLoadZ Typedef
- mufftCallbackLoadR Typedef
- mufftCallbackLoadD Typedef
- mufftCallbackStoreC Typedef
- mufftCallbackStoreZ Typedef
- mufftCallbackStoreR Typedef
- mufftCallbackStoreD Typedef
- mufftXtSetGPUs Function
- mufftXtMalloc Function
- mufftXtMemcpy Function
- mufftXtFree Function
- mufftXtSetWorkArea Function
- mufftXtExecDescriptorC2C Function
- mufftXtExecDescriptorR2C Function
- mufftXtExecDescriptorC2R Function
- mufftXtExecDescriptorZ2Z Function
- mufftXtExecDescriptorD2Z Function
- mufftXtExecDescriptorZ2D Function
- mufftXtQueryPlan Function
- mufftXtSetCallback Function
- mufftXtClearCallback Function
- mufftXtMakePlanMany Function
- mufftXtGetSizeMany Function
- mufftXtExec Function
- mufftXtExecDescriptor Function
- mufftXtSetWorkAreaPolicy Function
- mufftXtSetDistribution Function
Files
File mufft.h
Location: mufft.h
mufft.h defines all the public interfaces and types
Includes
- <muComplex.h>
- <musa_runtime.h>
- mufft-export.h
Included by
Macros
Macro MUFFT_FORWARD
#define MUFFT_FORWARD -1
Perform a forward FFT.
Macro MUFFT_INVERSE
#define MUFFT_INVERSE 1
Perform a backward/inverse FFT.
Enumeration types
Enumeration type mufftResult_t
Definition: mufft.h (line 52)
enum mufftResult_t \{
MUFFT_SUCCESS = 0,
MUFFT_INVALID_PLAN = 1,
MUFFT_ALLOC_FAILED = 2,
MUFFT_INVALID_TYPE = 3,
MUFFT_INVALID_VALUE = 4,
MUFFT_INTERNAL_ERROR = 5,
MUFFT_EXEC_FAILED = 6,
MUFFT_SETUP_FAILED = 7,
MUFFT_INVALID_SIZE = 8,
MUFFT_UNALIGNED_DATA = 9,
MUFFT_INCOMPLETE_PARAMETER_LIST = 0xA,
MUFFT_INVALID_DEVICE =
0xB,
MUFFT_PARSE_ERROR = 0xC,
MUFFT_NO_WORKSPACE =
0xD,
MUFFT_NOT_IMPLEMENTED =
0xE,
MUFFT_LICENSE_ERROR =
0xF,
MUFFT_NOT_SUPPORTED =
0x10
\}
Return status codes.
All muFFT Library return values except for MUFFT_SUCCESS indicate that the current API call failed and the user should reconfigure to correct the problem.
Enumerator MUFFT_SUCCESS
Enumerator MUFFT_INVALID_PLAN
Enumerator MUFFT_ALLOC_FAILED
Enumerator MUFFT_INVALID_TYPE
Enumerator MUFFT_INVALID_VALUE
Enumerator MUFFT_INTERNAL_ERROR
Enumerator MUFFT_EXEC_FAILED
Enumerator MUFFT_SETUP_FAILED
Enumerator MUFFT_INVALID_SIZE
Enumerator MUFFT_UNALIGNED_DATA
Enumerator MUFFT_INCOMPLETE_PARAMETER_LIST
Enumerator MUFFT_INVALID_DEVICE
Enumerator MUFFT_PARSE_ERROR
Enumerator MUFFT_NO_WORKSPACE
Enumerator MUFFT_NOT_IMPLEMENTED
Enumerator MUFFT_LICENSE_ERROR
Enumerator MUFFT_NOT_SUPPORTED
Enumeration type mufftType_t
Definition: mufft.h (line 84)
enum mufftType_t \{
MUFFT_R2C = 0x2a,
MUFFT_C2R = 0x2c,
MUFFT_C2C = 0x29,
MUFFT_D2Z = 0x6a,
MUFFT_Z2D = 0x6c,
MUFFT_Z2Z = 0x69
\}
Transform type.
This type is used to declare the Fourier transform type that will be executed. left most digit decide real or complex left second and third digit decide forward or inverse for real right most digit(the 7th) decide single/double
Enumerator MUFFT_R2C
Enumerator MUFFT_C2R
Enumerator MUFFT_C2C
Enumerator MUFFT_D2Z
Enumerator MUFFT_Z2D
Enumerator MUFFT_Z2Z
Typedefs
Typedef mufftResult
Definition: mufft.h (line 75)
typedef enum mufftResult_t mufftResult
Return status codes.
All muFFT Library return values except for MUFFT_SUCCESS indicate that the current API call failed and the user should reconfigure to correct the problem.
Return type: enum mufftResult_t
Typedef mufftType
Definition: mufft.h (line 91)
typedef enum mufftType_t mufftType
Transform type.
This type is used to declare the Fourier transform type that will be executed. left most digit decide real or complex left second and third digit decide forward or inverse for real right most digit(the 7th) decide single/double
Return type: enum mufftType_t
Typedef mufftHandle
Definition: mufft.h (line 103)
typedef struct mufftHandle_t* mufftHandle
A handle type used to store and access muFFT plans. The user receives a handle after creating a muFFT plan and uses this handle to execute the plan.
Return type: struct mufftHandle_t *
Typedef mufftReal
Definition: mufft.h (line 106)
typedef float mufftReal
A single-precision, floating-point real data type.
Return type: float
Typedef mufftDoubleReal
Definition: mufft.h (line 109)
typedef double mufftDoubleReal
A double-precision, floating-point real data type.
Return type: double
Typedef mufftComplex
Definition: mufft.h (line 113)
typedef muComplex mufftComplex
A single-precision, floating-point complex data type that consists of interleaved real and imaginary components.
Return type: muComplex
Typedef mufftDoubleComplex
Definition: mufft.h (line 117)
typedef muDoubleComplex mufftDoubleComplex
A double-precision, floating-point complex data type that consists of interleaved real and imaginary components.
Return type: muDoubleComplex
Functions
Function mufftPlan1d
MUFFT_EXPORT mufftResult mufftPlan1d(mufftHandle *plan, int nx, mufftType type, int batch)
Create a new one-dimensional FFT plan.
Allocate and initialize a new one-dimensional FFT plan.
Parameters:
plan: Pointer to the FFT plan handle.nx: FFT length.type: FFT type.batch: Number of batched transforms to compute.
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: The nx or batch parameter is not a supported size.
Parameters:
[mufftHandle](#mufft_8h_1a8f7720b787c5ceaa6ebe8688f83616de) plan
- int
nx - mufftType
type - int
batch
Return type: MUFFT_EXPORT mufftResult
Function mufftPlan2d
MUFFT_EXPORT mufftResult mufftPlan2d(mufftHandle *plan, int nx, int ny, mufftType type)
Create a new two-dimensional FFT plan.
Allocate and initialize a new two-dimensional FFT plan. Two-dimensional data should be stored in C ordering (row-major format), so that indexes in y-direction (j index) vary the fastest.
Parameters:
plan: Pointer to the FFT plan handle.nx: Number of elements in the x-direction (slow index).ny: Number of elements in the y-direction (fast index).type: FFT type.
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: Either or both of the nx or ny parameters is not a supported size.
Parameters:
[mufftHandle](#mufft_8h_1a8f7720b787c5ceaa6ebe8688f83616de) plan
- int
nx - int
ny - mufftType
type
Return type: MUFFT_EXPORT mufftResult
Function mufftPlan3d
MUFFT_EXPORT mufftResult mufftPlan3d(mufftHandle *plan, int nx, int ny, int nz, mufftType type)
Create a new three-dimensional FFT plan.
Allocate and initialize a new three-dimensional FFT plan. Three-dimensional data should be stored in C ordering (row-major format), so that indexes in z-direction (k index) vary the fastest.
Parameters:
plan: Pointer to the FFT plan handle.nx: Number of elements in the x-direction (slowest index).ny: Number of elements in the y-direction.nz: Number of elements in the z-direction (fastest index).type: FFT type.
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: One or more of the nx, ny, or nz parameters is not a supported size.
Parameters:
[mufftHandle](#mufft_8h_1a8f7720b787c5ceaa6ebe8688f83616de) plan
- int
nx - int
ny - int
nz - mufftType
type
Return type: MUFFT_EXPORT mufftResult
Function mufftPlanMany
MUFFT_EXPORT mufftResult mufftPlanMany(mufftHandle `plan, int rank, int `n, int `inembed, int istride, int idist, int `onembed, int ostride, int odist, mufftType type, int batch)
Create a new batched rank-dimensional FFT plan.
Allocate and initialize a new batched rank-dimensional FFT. The batch parameter tells muFFT how many transforms to perform. Used in complicated usage case like flexible input and output layout.
Parameters:
plan: Pointer to the FFT plan handle.rank: Dimension of FFT transform (1, 2, or 3).n: Number of elements in the x/y/z directions.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.istride: Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.idist: Distance between input batches.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.ostride: Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.odist: Distance between output batches.type: FFT type (e.g., MUFFT_R2C for single precision real to complex).batch: Number of batched transforms to perform.
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: One or more of the parameters is not a supported size.
Parameters:
[mufftHandle](#mufft_8h_1a8f7720b787c5ceaa6ebe8688f83616de) plan
- int
rankintnintinembed - int
istride - int
idistintonembed - int
ostride - int
odist - mufftType
type - int
batch
Return type: MUFFT_EXPORT mufftResult
Function mufftCreate
MUFFT_EXPORT mufftResult mufftCreate(mufftHandle *plan)
Allocate a new plan.
Creates only an opaque handle, and allocates small data structures on the host. The mufftMakePlan*() calls actually do the plan generation.
Parameters:
plan: Pointer to a mufftHandle object.
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_ALLOC_FAILED: The allocation of resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.
Parameters:
[mufftHandle](#mufft_8h_1a8f7720b787c5ceaa6ebe8688f83616de) plan
Return type: MUFFT_EXPORT mufftResult
Function mufftMakePlan1d
MUFFT_EXPORT mufftResult mufftMakePlan1d(mufftHandle plan, int nx, mufftType type, int batch, size_t *workSize)
Initialize a new one-dimensional FFT plan.
Assumes that the plan has been created already, and modifies the plan associated with the plan handle.
Parameters:
plan: Handle of the FFT plan.nx: FFT length.type: FFT type.batch: Number of batched transforms to compute.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: The nx or batch parameter is not a supported size.
Parameters:
- mufftHandle
plan - int
nx - mufftType
type - int
batchsize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftMakePlan2d
MUFFT_EXPORT mufftResult mufftMakePlan2d(mufftHandle plan, int nx, int ny, mufftType type, size_t *workSize)
Initialize a new two-dimensional FFT plan.
Assumes that the plan has been created already, and modifies the plan associated with the plan handle. Two-dimensional data should be stored in C ordering (row-major format), so that indexes in y-direction (j index) vary the fastest.
Parameters:
plan: Handle of the FFT plan.nx: Number of elements in the x-direction (slow index).ny: Number of elements in the y-direction (fast index).type: FFT type.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: Either or both of the nx or ny parameters is not a supported size.
Parameters:
- mufftHandle
plan - int
nx - int
ny - mufftType
typesize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftMakePlan3d
MUFFT_EXPORT mufftResult mufftMakePlan3d(mufftHandle plan, int nx, int ny, int nz, mufftType type, size_t *workSize)
Initialize a new three-dimensional FFT plan.
Assumes that the plan has been created already, and modifies the plan associated with the plan handle. Three-dimensional data should be stored in C ordering (row-major format), so that indexes in z-direction (k index) vary the fastest.
Parameters:
plan: Handle of the FFT plan.nx: Number of elements in the x-direction (slowest index).ny: Number of elements in the y-direction.nz: Number of elements in the z-direction (fastest index).type: FFT type.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: One or more of the nx, ny, or nz parameters is not a supported size.
Parameters:
- mufftHandle
plan - int
nx - int
ny - int
nz - mufftType
typesize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftMakePlanMany
MUFFT_EXPORT mufftResult mufftMakePlanMany(mufftHandle plan, int rank, int `n, int `inembed, int istride, int idist, int `onembed, int ostride, int odist, mufftType type, int batch, size_t `workSize)
Initialize a new batched rank-dimensional FFT plan.
Assumes that the plan has been created already, and modifies the plan associated with the plan handle. The batch parameter tells muFFT how many transforms to perform. Used in complicated usage case like flexible input and output layout.
Parameters:
plan: Pointer to the FFT plan handle.rank: Dimension of FFT transform (1, 2, or 3).n: Number of elements in the x/y/z directions.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.istride: Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.idist: Distance between input batches.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.ostride: Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.odist: Distance between output batches.type: FFT type (e.g., MUFFT_R2C for single precision real to complex).batch: Number of batched transforms to perform.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: One or more of the parameters is not a supported size.
Parameters:
- mufftHandle
plan - int
rankintnintinembed - int
istride - int
idistintonembed - int
ostride - int
odist - mufftType
type - int
batchsize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftEstimate1d
MUFFT_EXPORT mufftResult mufftEstimate1d(int nx, mufftType type, int batch, size_t *workSize)
Return an estimate of the work area size required for a 1D plan.
Parameters:
nx: Number of elements in the x-direction.type: FFT type.batch: Number of batched transforms to compute.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: The nx or batch parameter is not a supported size.
Parameters:
- int
nx - mufftType
type - int
batchsize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftEstimate2d
MUFFT_EXPORT mufftResult mufftEstimate2d(int nx, int ny, mufftType type, size_t *workSize)
Return an estimate of the work area size required for a 2D plan.
Parameters:
nx: Number of elements in the x-direction.ny: Number of elements in the y-direction.type: FFT type.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: Either or both of the nx or ny parameters is not a supported size.
Parameters:
- int
nx - int
ny - mufftType
typesize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftEstimate3d
MUFFT_EXPORT mufftResult mufftEstimate3d(int nx, int ny, int nz, mufftType type, size_t *workSize)
Return an estimate of the work area size required for a 3D plan.
Parameters:
nx: Number of elements in the x-direction.ny: Number of elements in the y-direction.nz: Number of elements in the z-direction.type: FFT type.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: One or more of the nx, ny, or nz parameters is not a supported size.
Parameters:
- int
nx - int
ny - int
nz - mufftType
typesize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftEstimateMany
MUFFT_EXPORT mufftResult mufftEstimateMany(int rank, int `n, int `inembed, int istride, int idist, int `onembed, int ostride, int odist, mufftType type, int batch, size_t `workSize)
Return an estimate of the work area size required for a rank-dimensional plan.
Parameters:
rank: Dimension of FFT transform (1, 2, or 3).n: Number of elements in the x/y/z directions.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.istride: Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.idist: Distance between input batches.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.ostride: Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.odist: Distance between output batches.type: FFT type.batch: Number of batched transforms to perform.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: One or more of the parameters is not a supported size.
Parameters:
- int
rankintnintinembed - int
istride - int
idistintonembed - int
ostride - int
odist - mufftType
type - int
batchsize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftGetSize1d
MUFFT_EXPORT mufftResult mufftGetSize1d(mufftHandle plan, int nx, mufftType type, int batch, size_t *workSize)
Return size of the work area size required for a 1D plan.
Parameters:
plan: Pointer to the FFT plan.nx: Number of elements in the x-direction.type: FFT type.batch: Number of batched transforms to compute.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: The nx or batch parameter is not a supported size.
Parameters:
- mufftHandle
plan - int
nx - mufftType
type - int
batchsize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftGetSize2d
MUFFT_EXPORT mufftResult mufftGetSize2d(mufftHandle plan, int nx, int ny, mufftType type, size_t *workSize)
Return size of the work area size required for a 2D plan.
Parameters:
plan: Pointer to the FFT plan.nx: Number of elements in the x-direction.ny: Number of elements in the y-direction.type: FFT type.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: Either or both of the nx or ny parameters is not a supported size.
Parameters:
- mufftHandle
plan - int
nx - int
ny - mufftType
typesize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftGetSize3d
MUFFT_EXPORT mufftResult mufftGetSize3d(mufftHandle plan, int nx, int ny, int nz, mufftType type, size_t *workSize)
Return size of the work area size required for a 3D plan.
Parameters:
plan: Pointer to the FFT plan.nx: Number of elements in the x-direction.ny: Number of elements in the y-direction.nz: Number of elements in the z-direction.type: FFT type.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: One or more of the nx, ny, or nz parameters is not a supported size.
Parameters:
- mufftHandle
plan - int
nx - int
ny - int
nz - mufftType
typesize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftGetSizeMany
MUFFT_EXPORT mufftResult mufftGetSizeMany(mufftHandle plan, int rank, int `n, int `inembed, int istride, int idist, int `onembed, int ostride, int odist, mufftType type, int batch, size_t `workSize)
Return size of the work area size required for a rank-dimensional plan.
Parameters:
plan: Pointer to the FFT plan.rank: Dimension of FFT transform (1, 2, or 3).n: Number of elements in the x/y/z directions.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.istride: Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.idist: Distance between input batches.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.ostride: Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.odist: Distance between output batches.type: FFT type.batch: Number of batched transforms to perform.workSize: Pointer to work area size (returned value).
Return values:
MUFFT_SUCCESS: muFFT successfully created the FFT plan.MUFFT_ALLOC_FAILED: The allocation of GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were passed to the API.MUFFT_INVALID_SIZE: One or more of the parameters is not a supported size.
Parameters:
- mufftHandle
plan - int
rankintnintinembed - int
istride - int
idistintonembed - int
ostride - int
odist - mufftType
type - int
batchsize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftGetSize
MUFFT_EXPORT mufftResult mufftGetSize(mufftHandle plan, size_t *workSize)
Return size of the work area size required for a rank-dimensional plan.
Parameters:
plan: Pointer to the FFT plan.workSize: Pointer to the size(s), in bytes, of the work areas.
Return values:
MUFFT_SUCCESS: muFFT successfully returned the size of the work space.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.
Parameters:
- mufftHandle
plansize_tworkSize
Return type: MUFFT_EXPORT mufftResult
Function mufftSetAutoAllocation
MUFFT_EXPORT mufftResult mufftSetAutoAllocation(mufftHandle plan, int autoAllocate)
Set the plan's auto-allocation flag. The plan will allocate its own workarea.
Parameters:
plan: Pointer to the FFT plan.autoAllocate: 0 to disable auto-allocation, non-zero to enable.
Return values:
MUFFT_SUCCESS: muFFT successfully allows user to manage work area.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.
Parameters:
- mufftHandle
plan - int
autoAllocate
Return type: MUFFT_EXPORT mufftResult
Function mufftSetWorkArea
MUFFT_EXPORT mufftResult mufftSetWorkArea(mufftHandle plan, void *workArea)
Set the plan's work area.
Parameters:
plan: Pointer to the FFT plan.workArea: Pointer to the work area (on device).
Return values:
MUFFT_SUCCESS: muFFT successfully allows user to override workArea pointer.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_ALLOC_FAILED: free the original GPU resources for the plan failed.MUFFT_INVALID_VALUE: One or more invalid parameters were in the passed plan.
Parameters:
- mufftHandle
planvoidworkArea
Return type: MUFFT_EXPORT mufftResult
Function mufftDestroy
MUFFT_EXPORT mufftResult mufftDestroy(mufftHandle plan)
Destroy and deallocate an existing plan.
Parameters:
plan: The mufftHandle object of the plan to be destroyed.
Return values:
MUFFT_SUCCESS: muFFT successfully destroyed the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.
Parameters:
- mufftHandle
plan
Return type: MUFFT_EXPORT mufftResult
Function mufftExecC2C
MUFFT_EXPORT mufftResult mufftExecC2C(mufftHandle plan, mufftComplex `idata, mufftComplex `odata, int direction)
Execute a (float) complex-to-complex FFT.
If the input and output buffers are equal, an in-place transform is performed.
Parameters:
plan: The FFT plan.idata: Input data (on device).odata: Output data (on device).direction: EitherMUFFT_FORWARDorMUFFT_INVERSE.
Return values:
MUFFT_SUCCESS: muFFT successfully executed the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_EXEC_FAILED: muFFT failed to execute the transform on the GPU.
Parameters:
- mufftHandle
plan[mufftComplex](#mufft_8h_1af6daf5e4faf75a3fceff758eace7df6a)idata[mufftComplex](#mufft_8h_1af6daf5e4faf75a3fceff758eace7df6a)odata - int
direction
Return type: MUFFT_EXPORT mufftResult
Function mufftExecR2C
MUFFT_EXPORT mufftResult mufftExecR2C(mufftHandle plan, mufftReal `idata, mufftComplex `odata)
Execute a (float) real-to-complex FFT.
If the input and output buffers are equal, an in-place transform is performed.
Parameters:
plan: The FFT plan.idata: Input data (on device).odata: Output data (on device).
Return values:
MUFFT_SUCCESS: muFFT successfully executed the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_EXEC_FAILED: muFFT failed to execute the transform on the GPU.
Parameters:
- mufftHandle
plan[mufftReal](#mufft_8h_1aa50da68f4bc4a707ee2685cb0c616925)idata[mufftComplex](#mufft_8h_1af6daf5e4faf75a3fceff758eace7df6a)odata
Return type: MUFFT_EXPORT mufftResult
Function mufftExecC2R
MUFFT_EXPORT mufftResult mufftExecC2R(mufftHandle plan, mufftComplex `idata, mufftReal `odata)
Execute a (float) complex-to-real FFT.
If the input and output buffers are equal, an in-place transform is performed.
Parameters:
plan: The FFT plan.idata: Input data (on device).odata: Output data (on device).
Return values:
MUFFT_SUCCESS: muFFT successfully executed the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_EXEC_FAILED: muFFT failed to execute the transform on the GPU.
Parameters:
- mufftHandle
plan[mufftComplex](#mufft_8h_1af6daf5e4faf75a3fceff758eace7df6a)idata[mufftReal](#mufft_8h_1aa50da68f4bc4a707ee2685cb0c616925)odata
Return type: MUFFT_EXPORT mufftResult
Function mufftExecZ2Z
MUFFT_EXPORT mufftResult mufftExecZ2Z(mufftHandle plan, mufftDoubleComplex `idata, mufftDoubleComplex `odata, int direction)
Execute a (double) complex-to-complex FFT.
If the input and output buffers are equal, an in-place transform is performed.
Parameters:
plan: The FFT plan.idata: Input data (on device).odata: Output data (on device).direction: EitherMUFFT_FORWARDorMUFFT_INVERSE.
Return values:
MUFFT_SUCCESS: muFFT successfully executed the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_EXEC_FAILED: muFFT failed to execute the transform on the GPU.
Parameters:
- mufftHandle
plan[mufftDoubleComplex](#mufft_8h_1aadc3683b55485985c20d9720a334ff43)idata[mufftDoubleComplex](#mufft_8h_1aadc3683b55485985c20d9720a334ff43)odata - int
direction
Return type: MUFFT_EXPORT mufftResult
Function mufftExecD2Z
MUFFT_EXPORT mufftResult mufftExecD2Z(mufftHandle plan, mufftDoubleReal `idata, mufftDoubleComplex `odata)
Execute a (double) real-to-complex FFT.
If the input and output buffers are equal, an in-place transform is performed.
Parameters:
plan: The FFT plan.idata: Input data (on device).odata: Output data (on device).
Return values:
MUFFT_SUCCESS: muFFT successfully executed the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_EXEC_FAILED: muFFT failed to execute the transform on the GPU.
Parameters:
- mufftHandle
plan[mufftDoubleReal](#mufft_8h_1a43236074083ef0ccff93845be0c9f64f)idata[mufftDoubleComplex](#mufft_8h_1aadc3683b55485985c20d9720a334ff43)odata
Return type: MUFFT_EXPORT mufftResult
Function mufftExecZ2D
MUFFT_EXPORT mufftResult mufftExecZ2D(mufftHandle plan, mufftDoubleComplex `idata, mufftDoubleReal `odata)
Execute a (double) complex-to-real FFT.
If the input and output buffers are equal, an in-place transform is performed.
Parameters:
plan: The FFT plan.idata: Input data (on device).odata: Output data (on device).
Return values:
MUFFT_SUCCESS: muFFT successfully executed the FFT plan.MUFFT_INVALID_PLAN: The plan parameter is not a valid handle.MUFFT_EXEC_FAILED: muFFT failed to execute the transform on the GPU.
Parameters:
- mufftHandle
plan[mufftDoubleComplex](#mufft_8h_1aadc3683b55485985c20d9720a334ff43)idata[mufftDoubleReal](#mufft_8h_1a43236074083ef0ccff93845be0c9f64f)odata
Return type: MUFFT_EXPORT mufftResult