| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | |
| | |
| | |
| | |
| |
|
| | #ifndef _CUFFT_H_ |
| | #define _CUFFT_H_ |
| |
|
| |
|
| | #include "cuComplex.h" |
| | #include "driver_types.h" |
| | #include "library_types.h" |
| |
|
| | #ifndef CUFFTAPI |
| | #ifdef _WIN32 |
| | #define CUFFTAPI __stdcall |
| | #elif __GNUC__ >= 4 |
| | #define CUFFTAPI __attribute__ ((visibility ("default"))) |
| | #else |
| | #define CUFFTAPI |
| | #endif |
| | #endif |
| |
|
| | #ifdef __cplusplus |
| | extern "C" { |
| | #endif |
| |
|
| | #define CUFFT_VER_MAJOR 10 |
| | #define CUFFT_VER_MINOR 9 |
| | #define CUFFT_VER_PATCH 0 |
| | #define CUFFT_VER_BUILD 58 |
| |
|
| | |
| | |
| | |
| | |
| | |
| | #define CUFFT_VERSION 10900 |
| |
|
| | |
| | typedef enum cufftResult_t { |
| | CUFFT_SUCCESS = 0x0, |
| | CUFFT_INVALID_PLAN = 0x1, |
| | CUFFT_ALLOC_FAILED = 0x2, |
| | CUFFT_INVALID_TYPE = 0x3, |
| | CUFFT_INVALID_VALUE = 0x4, |
| | CUFFT_INTERNAL_ERROR = 0x5, |
| | CUFFT_EXEC_FAILED = 0x6, |
| | CUFFT_SETUP_FAILED = 0x7, |
| | CUFFT_INVALID_SIZE = 0x8, |
| | CUFFT_UNALIGNED_DATA = 0x9, |
| | CUFFT_INCOMPLETE_PARAMETER_LIST = 0xA, |
| | CUFFT_INVALID_DEVICE = 0xB, |
| | CUFFT_PARSE_ERROR = 0xC, |
| | CUFFT_NO_WORKSPACE = 0xD, |
| | CUFFT_NOT_IMPLEMENTED = 0xE, |
| | CUFFT_LICENSE_ERROR = 0x0F, |
| | CUFFT_NOT_SUPPORTED = 0x10 |
| |
|
| | } cufftResult; |
| |
|
| | #define MAX_CUFFT_ERROR 0x11 |
| |
|
| |
|
| | |
| |
|
| |
|
| | |
| | |
| | typedef float cufftReal; |
| | typedef double cufftDoubleReal; |
| |
|
| | |
| | |
| | |
| | typedef cuComplex cufftComplex; |
| | typedef cuDoubleComplex cufftDoubleComplex; |
| |
|
| | |
| | #define CUFFT_FORWARD -1 |
| | #define CUFFT_INVERSE 1 |
| |
|
| | |
| | typedef enum cufftType_t { |
| | CUFFT_R2C = 0x2a, |
| | CUFFT_C2R = 0x2c, |
| | CUFFT_C2C = 0x29, |
| | CUFFT_D2Z = 0x6a, |
| | CUFFT_Z2D = 0x6c, |
| | CUFFT_Z2Z = 0x69 |
| | } cufftType; |
| |
|
| | |
| | typedef enum cufftCompatibility_t { |
| | CUFFT_COMPATIBILITY_FFTW_PADDING = 0x01 |
| | } cufftCompatibility; |
| |
|
| | #define CUFFT_COMPATIBILITY_DEFAULT CUFFT_COMPATIBILITY_FFTW_PADDING |
| |
|
| | |
| | |
| | |
| | #define MAX_SHIM_RANK 3 |
| |
|
| | |
| | typedef int cufftHandle; |
| |
|
| |
|
| | cufftResult CUFFTAPI cufftPlan1d(cufftHandle *plan, |
| | int nx, |
| | cufftType type, |
| | int batch); |
| |
|
| | cufftResult CUFFTAPI cufftPlan2d(cufftHandle *plan, |
| | int nx, int ny, |
| | cufftType type); |
| |
|
| | cufftResult CUFFTAPI cufftPlan3d(cufftHandle *plan, |
| | int nx, int ny, int nz, |
| | cufftType type); |
| |
|
| | cufftResult CUFFTAPI cufftPlanMany(cufftHandle *plan, |
| | int rank, |
| | int *n, |
| | int *inembed, int istride, int idist, |
| | int *onembed, int ostride, int odist, |
| | cufftType type, |
| | int batch); |
| |
|
| | cufftResult CUFFTAPI cufftMakePlan1d(cufftHandle plan, |
| | int nx, |
| | cufftType type, |
| | int batch, |
| | size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftMakePlan2d(cufftHandle plan, |
| | int nx, int ny, |
| | cufftType type, |
| | size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftMakePlan3d(cufftHandle plan, |
| | int nx, int ny, int nz, |
| | cufftType type, |
| | size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftMakePlanMany(cufftHandle plan, |
| | int rank, |
| | int *n, |
| | int *inembed, int istride, int idist, |
| | int *onembed, int ostride, int odist, |
| | cufftType type, |
| | int batch, |
| | size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftMakePlanMany64(cufftHandle plan, |
| | int rank, |
| | long long int *n, |
| | long long int *inembed, |
| | long long int istride, |
| | long long int idist, |
| | long long int *onembed, |
| | long long int ostride, long long int odist, |
| | cufftType type, |
| | long long int batch, |
| | size_t * workSize); |
| |
|
| | cufftResult CUFFTAPI cufftGetSizeMany64(cufftHandle plan, |
| | int rank, |
| | long long int *n, |
| | long long int *inembed, |
| | long long int istride, long long int idist, |
| | long long int *onembed, |
| | long long int ostride, long long int odist, |
| | cufftType type, |
| | long long int batch, |
| | size_t *workSize); |
| |
|
| |
|
| |
|
| |
|
| | cufftResult CUFFTAPI cufftEstimate1d(int nx, |
| | cufftType type, |
| | int batch, |
| | size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftEstimate2d(int nx, int ny, |
| | cufftType type, |
| | size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftEstimate3d(int nx, int ny, int nz, |
| | cufftType type, |
| | size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftEstimateMany(int rank, |
| | int *n, |
| | int *inembed, int istride, int idist, |
| | int *onembed, int ostride, int odist, |
| | cufftType type, |
| | int batch, |
| | size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftCreate(cufftHandle * handle); |
| |
|
| | cufftResult CUFFTAPI cufftGetSize1d(cufftHandle handle, |
| | int nx, |
| | cufftType type, |
| | int batch, |
| | size_t *workSize ); |
| |
|
| | cufftResult CUFFTAPI cufftGetSize2d(cufftHandle handle, |
| | int nx, int ny, |
| | cufftType type, |
| | size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftGetSize3d(cufftHandle handle, |
| | int nx, int ny, int nz, |
| | cufftType type, |
| | size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftGetSizeMany(cufftHandle handle, |
| | int rank, int *n, |
| | int *inembed, int istride, int idist, |
| | int *onembed, int ostride, int odist, |
| | cufftType type, int batch, size_t *workArea); |
| |
|
| | cufftResult CUFFTAPI cufftGetSize(cufftHandle handle, size_t *workSize); |
| |
|
| | cufftResult CUFFTAPI cufftSetWorkArea(cufftHandle plan, void *workArea); |
| |
|
| | cufftResult CUFFTAPI cufftSetAutoAllocation(cufftHandle plan, int autoAllocate); |
| |
|
| | cufftResult CUFFTAPI cufftExecC2C(cufftHandle plan, |
| | cufftComplex *idata, |
| | cufftComplex *odata, |
| | int direction); |
| |
|
| | cufftResult CUFFTAPI cufftExecR2C(cufftHandle plan, |
| | cufftReal *idata, |
| | cufftComplex *odata); |
| |
|
| | cufftResult CUFFTAPI cufftExecC2R(cufftHandle plan, |
| | cufftComplex *idata, |
| | cufftReal *odata); |
| |
|
| | cufftResult CUFFTAPI cufftExecZ2Z(cufftHandle plan, |
| | cufftDoubleComplex *idata, |
| | cufftDoubleComplex *odata, |
| | int direction); |
| |
|
| | cufftResult CUFFTAPI cufftExecD2Z(cufftHandle plan, |
| | cufftDoubleReal *idata, |
| | cufftDoubleComplex *odata); |
| |
|
| | cufftResult CUFFTAPI cufftExecZ2D(cufftHandle plan, |
| | cufftDoubleComplex *idata, |
| | cufftDoubleReal *odata); |
| |
|
| |
|
| | |
| | cufftResult CUFFTAPI cufftSetStream(cufftHandle plan, |
| | cudaStream_t stream); |
| |
|
| | cufftResult CUFFTAPI cufftDestroy(cufftHandle plan); |
| |
|
| | cufftResult CUFFTAPI cufftGetVersion(int *version); |
| |
|
| | cufftResult CUFFTAPI cufftGetProperty(libraryPropertyType type, |
| | int *value); |
| |
|
| | #ifdef __cplusplus |
| | } |
| | #endif |
| |
|
| | #endif |
| |
|