|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
|
|
| #ifndef _CUFFTXT_H_ |
| #define _CUFFTXT_H_ |
| #include "cudalibxt.h" |
| #include "cufft.h" |
|
|
|
|
| #ifndef CUFFTAPI |
| #ifdef _WIN32 |
| #define CUFFTAPI __stdcall |
| #else |
| #define CUFFTAPI |
| #endif |
| #endif |
|
|
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
|
|
| |
| |
| |
| |
| |
|
|
| typedef enum cufftXtSubFormat_t { |
| CUFFT_XT_FORMAT_INPUT = 0x00, |
| CUFFT_XT_FORMAT_OUTPUT = 0x01, |
| CUFFT_XT_FORMAT_INPLACE = 0x02, |
| CUFFT_XT_FORMAT_INPLACE_SHUFFLED = 0x03, |
| CUFFT_XT_FORMAT_1D_INPUT_SHUFFLED = 0x04, |
| CUFFT_XT_FORMAT_DISTRIBUTED_INPUT = 0x05, |
| CUFFT_XT_FORMAT_DISTRIBUTED_OUTPUT = 0x06, |
| CUFFT_FORMAT_UNDEFINED = 0x07 |
| } cufftXtSubFormat; |
|
|
| |
| |
| |
| typedef enum cufftXtCopyType_t { |
| CUFFT_COPY_HOST_TO_DEVICE = 0x00, |
| CUFFT_COPY_DEVICE_TO_HOST = 0x01, |
| CUFFT_COPY_DEVICE_TO_DEVICE = 0x02, |
| CUFFT_COPY_UNDEFINED = 0x03 |
| } cufftXtCopyType; |
|
|
| |
| |
| |
| typedef enum cufftXtQueryType_t { |
| CUFFT_QUERY_1D_FACTORS = 0x00, |
| CUFFT_QUERY_UNDEFINED = 0x01 |
| } cufftXtQueryType; |
|
|
| typedef struct cufftXt1dFactors_t { |
| long long int size; |
| long long int stringCount; |
| long long int stringLength; |
| long long int substringLength; |
| long long int factor1; |
| long long int factor2; |
| long long int stringMask; |
| long long int substringMask; |
| long long int factor1Mask; |
| long long int factor2Mask; |
| int stringShift; |
| int substringShift; |
| int factor1Shift; |
| int factor2Shift; |
| } cufftXt1dFactors; |
|
|
| |
| |
| |
| typedef enum cufftXtWorkAreaPolicy_t { |
| CUFFT_WORKAREA_MINIMAL = 0, |
| CUFFT_WORKAREA_USER = 1, |
| CUFFT_WORKAREA_PERFORMANCE = 2, |
| } cufftXtWorkAreaPolicy; |
|
|
| |
| cufftResult CUFFTAPI cufftXtSetGPUs(cufftHandle handle, int nGPUs, int *whichGPUs); |
|
|
| cufftResult CUFFTAPI cufftXtMalloc(cufftHandle plan, |
| cudaLibXtDesc ** descriptor, |
| cufftXtSubFormat format); |
|
|
| cufftResult CUFFTAPI cufftXtMemcpy(cufftHandle plan, |
| void *dstPointer, |
| void *srcPointer, |
| cufftXtCopyType type); |
|
|
| cufftResult CUFFTAPI cufftXtFree(cudaLibXtDesc *descriptor); |
|
|
| cufftResult CUFFTAPI cufftXtSetWorkArea(cufftHandle plan, void **workArea); |
|
|
| cufftResult CUFFTAPI cufftXtExecDescriptorC2C(cufftHandle plan, |
| cudaLibXtDesc *input, |
| cudaLibXtDesc *output, |
| int direction); |
|
|
| cufftResult CUFFTAPI cufftXtExecDescriptorR2C(cufftHandle plan, |
| cudaLibXtDesc *input, |
| cudaLibXtDesc *output); |
|
|
| cufftResult CUFFTAPI cufftXtExecDescriptorC2R(cufftHandle plan, |
| cudaLibXtDesc *input, |
| cudaLibXtDesc *output); |
|
|
| cufftResult CUFFTAPI cufftXtExecDescriptorZ2Z(cufftHandle plan, |
| cudaLibXtDesc *input, |
| cudaLibXtDesc *output, |
| int direction); |
|
|
| cufftResult CUFFTAPI cufftXtExecDescriptorD2Z(cufftHandle plan, |
| cudaLibXtDesc *input, |
| cudaLibXtDesc *output); |
|
|
| cufftResult CUFFTAPI cufftXtExecDescriptorZ2D(cufftHandle plan, |
| cudaLibXtDesc *input, |
| cudaLibXtDesc *output); |
|
|
| |
|
|
| cufftResult CUFFTAPI cufftXtQueryPlan(cufftHandle plan, void *queryStruct, cufftXtQueryType queryType); |
|
|
|
|
| |
|
|
|
|
| typedef enum cufftXtCallbackType_t { |
| CUFFT_CB_LD_COMPLEX = 0x0, |
| CUFFT_CB_LD_COMPLEX_DOUBLE = 0x1, |
| CUFFT_CB_LD_REAL = 0x2, |
| CUFFT_CB_LD_REAL_DOUBLE = 0x3, |
| CUFFT_CB_ST_COMPLEX = 0x4, |
| CUFFT_CB_ST_COMPLEX_DOUBLE = 0x5, |
| CUFFT_CB_ST_REAL = 0x6, |
| CUFFT_CB_ST_REAL_DOUBLE = 0x7, |
| CUFFT_CB_UNDEFINED = 0x8 |
|
|
| } cufftXtCallbackType; |
|
|
| typedef cufftComplex (*cufftCallbackLoadC)(void *dataIn, size_t offset, void *callerInfo, void *sharedPointer); |
| typedef cufftDoubleComplex (*cufftCallbackLoadZ)(void *dataIn, size_t offset, void *callerInfo, void *sharedPointer); |
| typedef cufftReal (*cufftCallbackLoadR)(void *dataIn, size_t offset, void *callerInfo, void *sharedPointer); |
| typedef cufftDoubleReal(*cufftCallbackLoadD)(void *dataIn, size_t offset, void *callerInfo, void *sharedPointer); |
|
|
| typedef void (*cufftCallbackStoreC)(void *dataOut, size_t offset, cufftComplex element, void *callerInfo, void *sharedPointer); |
| typedef void (*cufftCallbackStoreZ)(void *dataOut, size_t offset, cufftDoubleComplex element, void *callerInfo, void *sharedPointer); |
| typedef void (*cufftCallbackStoreR)(void *dataOut, size_t offset, cufftReal element, void *callerInfo, void *sharedPointer); |
| typedef void (*cufftCallbackStoreD)(void *dataOut, size_t offset, cufftDoubleReal element, void *callerInfo, void *sharedPointer); |
|
|
|
|
| cufftResult CUFFTAPI cufftXtSetCallback(cufftHandle plan, void **callback_routine, cufftXtCallbackType cbType, void **caller_info); |
| cufftResult CUFFTAPI cufftXtClearCallback(cufftHandle plan, cufftXtCallbackType cbType); |
| cufftResult CUFFTAPI cufftXtSetCallbackSharedSize(cufftHandle plan, cufftXtCallbackType cbType, size_t sharedSize); |
|
|
| cufftResult CUFFTAPI cufftXtMakePlanMany(cufftHandle plan, |
| int rank, |
| long long int *n, |
| long long int *inembed, |
| long long int istride, |
| long long int idist, |
| cudaDataType inputtype, |
| long long int *onembed, |
| long long int ostride, |
| long long int odist, |
| cudaDataType outputtype, |
| long long int batch, |
| size_t *workSize, |
| cudaDataType executiontype); |
|
|
| cufftResult CUFFTAPI cufftXtGetSizeMany(cufftHandle plan, |
| int rank, |
| long long int *n, |
| long long int *inembed, |
| long long int istride, |
| long long int idist, |
| cudaDataType inputtype, |
| long long int *onembed, |
| long long int ostride, |
| long long int odist, |
| cudaDataType outputtype, |
| long long int batch, |
| size_t *workSize, |
| cudaDataType executiontype); |
|
|
|
|
| cufftResult CUFFTAPI cufftXtExec(cufftHandle plan, |
| void *input, |
| void *output, |
| int direction); |
|
|
| cufftResult CUFFTAPI cufftXtExecDescriptor(cufftHandle plan, |
| cudaLibXtDesc *input, |
| cudaLibXtDesc *output, |
| int direction); |
|
|
| cufftResult CUFFTAPI cufftXtSetWorkAreaPolicy(cufftHandle plan, cufftXtWorkAreaPolicy policy, size_t *workSize); |
|
|
| #ifdef __cplusplus |
| } |
| #endif |
|
|
| #endif |
|
|