| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | #define CUSPARSE_G77 1 |
| | #define CUSPARSE_INTEL_FORTRAN 2 |
| | #define CUSPARSE_G95 3 |
| |
|
| | |
| | #if defined(_WIN32) |
| | #define CUSPARSE_FORTRAN_COMPILER CUSPARSE_INTEL_FORTRAN |
| | #elif defined(__linux) || defined(__QNX__) |
| | #define CUSPARSE_FORTRAN_COMPILER CUSPARSE_G95 |
| | #elif defined(__APPLE__) |
| | #define CUSPARSE_FORTRAN_COMPILER CUSPARSE_G95 |
| | #define RETURN_COMPLEX 1 |
| | #else |
| | #error unsupported platform |
| | #endif |
| |
|
| | #if (CUSPARSE_FORTRAN_COMPILER==CUSPARSE_G77) || (CUSPARSE_FORTRAN_COMPILER==CUSPARSE_G95) |
| | |
| | |
| | |
| | |
| | #define CUDA_MALLOC cuda_malloc_ |
| | #define CUDA_FREE cuda_free_ |
| | #define CUDA_MEMCPY_FORT2C_INT cuda_memcpy_fort2c_int_ |
| | #define CUDA_MEMCPY_FORT2C_REAL cuda_memcpy_fort2c_real_ |
| | #define CUDA_MEMCPY_C2FORT_INT cuda_memcpy_c2fort_int_ |
| | #define CUDA_MEMCPY_C2FORT_REAL cuda_memcpy_c2fort_real_ |
| | #define CUDA_MEMSET cuda_memset_ |
| | #define GET_SHIFTED_ADDRESS get_shifted_address_ |
| |
|
| | #define CUSPARSE_CREATE cusparse_create_ |
| | #define CUSPARSE_DESTROY cusparse_destroy_ |
| | #define CUSPARSE_GET_VERSION cusparse_get_version_ |
| | #define CUSPARSE_SET_STREAM cusparse_set_stream_ |
| | #define CUSPARSE_SET_POINTER_MODE cusparse_set_pointer_mode_ |
| | #define CUSPARSE_GET_POINTER_MODE cusparse_get_pointer_mode_ |
| | #define CUSPARSE_CREATE_MAT_DESCR cusparse_create_mat_descr_ |
| | #define CUSPARSE_DESTROY_MAT_DESCR cusparse_destroy_mat_descr_ |
| | #define CUSPARSE_SET_MAT_TYPE cusparse_set_mat_type_ |
| | #define CUSPARSE_GET_MAT_TYPE cusparse_get_mat_type_ |
| | #define CUSPARSE_SET_MAT_FILL_MODE cusparse_set_mat_fill_mode_ |
| | #define CUSPARSE_GET_MAT_FILL_MODE cusparse_get_mat_fill_mode_ |
| | #define CUSPARSE_SET_MAT_DIAG_TYPE cusparse_set_mat_diag_type_ |
| | #define CUSPARSE_GET_MAT_DIAG_TYPE cusparse_get_mat_diag_type_ |
| | #define CUSPARSE_SET_MAT_INDEX_BASE cusparse_set_mat_index_base_ |
| | #define CUSPARSE_GET_MAT_INDEX_BASE cusparse_get_mat_index_base_ |
| | #define CUSPARSE_CREATE_SOLVE_ANALYSIS_INFO cusparse_create_solve_analysis_info_ |
| | #define CUSPARSE_DESTROY_SOLVE_ANALYSIS_INFO cusparse_destroy_solve_analysis_info_ |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | #define CUSPARSE_SGTSV cusparse_sgtsv_ |
| | #define CUSPARSE_DGTSV cusparse_dgtsv_ |
| | #define CUSPARSE_CGTSV cusparse_cgtsv_ |
| | #define CUSPARSE_ZGTSV cusparse_zgtsv_ |
| | #define CUSPARSE_SGTSV_STRIDEDBATCH cusparse_sgtsv_stridedbatch_ |
| | #define CUSPARSE_DGTSV_STRIDEDBATCH cusparse_dgtsv_stridedbatch_ |
| | #define CUSPARSE_CGTSV_STRIDEDBATCH cusparse_cgtsv_stridedbatch_ |
| | #define CUSPARSE_ZGTSV_STRIDEDBATCH cusparse_zgtsv_stridedbatch_ |
| | #define CUSPARSE_SNNZ cusparse_snnz_ |
| | #define CUSPARSE_DNNZ cusparse_dnnz_ |
| | #define CUSPARSE_CNNZ cusparse_cnnz_ |
| | #define CUSPARSE_ZNNZ cusparse_znnz_ |
| | #define CUSPARSE_SDENSE2CSR cusparse_sdense2csr_ |
| | #define CUSPARSE_DDENSE2CSR cusparse_ddense2csr_ |
| | #define CUSPARSE_CDENSE2CSR cusparse_cdense2csr_ |
| | #define CUSPARSE_ZDENSE2CSR cusparse_zdense2csr_ |
| | #define CUSPARSE_SCSR2DENSE cusparse_scsr2dense_ |
| | #define CUSPARSE_DCSR2DENSE cusparse_dcsr2dense_ |
| | #define CUSPARSE_CCSR2DENSE cusparse_ccsr2dense_ |
| | #define CUSPARSE_ZCSR2DENSE cusparse_zcsr2dense_ |
| | #define CUSPARSE_SDENSE2CSC cusparse_sdense2csc_ |
| | #define CUSPARSE_DDENSE2CSC cusparse_ddense2csc_ |
| | #define CUSPARSE_CDENSE2CSC cusparse_cdense2csc_ |
| | #define CUSPARSE_ZDENSE2CSC cusparse_zdense2csc_ |
| | #define CUSPARSE_SCSC2DENSE cusparse_scsc2dense_ |
| | #define CUSPARSE_DCSC2DENSE cusparse_dcsc2dense_ |
| | #define CUSPARSE_CCSC2DENSE cusparse_ccsc2dense_ |
| | #define CUSPARSE_ZCSC2DENSE cusparse_zcsc2dense_ |
| | #define CUSPARSE_XCOO2CSR cusparse_xcoo2csr_ |
| | #define CUSPARSE_XCSR2COO cusparse_xcsr2coo_ |
| | |
| | |
| | |
| | |
| |
|
| | #elif CUSPARSE_FORTRAN_COMPILER==CUSPARSE_INTEL_FORTRAN |
| |
|
| | #define CUDA_MALLOC CUDA_MALLOC |
| | #define CUDA_FREE CUDA_FREE |
| | #define CUDA_MEMCPY_FORT2C_INT CUDA_MEMCPY_FORT2C_INT |
| | #define CUDA_MEMCPY_FORT2C_REAL CUDA_MEMCPY_FORT2C_REAL |
| | #define CUDA_MEMCPY_C2FORT_INT CUDA_MEMCPY_C2FORT_INT |
| | #define CUDA_MEMCPY_C2FORT_REAL CUDA_MEMCPY_C2FORT_REAL |
| | #define CUDA_MEMSET CUDA_MEMSET |
| | #define GET_SHIFTED_ADDRESS GET_SHIFTED_ADDRESS |
| |
|
| | #define CUSPARSE_CREATE CUSPARSE_CREATE |
| | #define CUSPARSE_DESTROY CUSPARSE_DESTROY |
| | #define CUSPARSE_GET_VERSION CUSPARSE_GET_VERSION |
| | #define CUSPARSE_SET_STREAM CUSPARSE_SET_STREAM |
| | #define CUSPARSE_SET_POINTER_MODE CUSPARSE_SET_POINTER_MODE |
| | #define CUSPARSE_GET_POINTER_MODE CUSPARSE_GET_POINTER_MODE |
| | #define CUSPARSE_CREATE_MAT_DESCR CUSPARSE_CREATE_MAT_DESCR |
| | #define CUSPARSE_DESTROY_MAT_DESCR CUSPARSE_DESTROY_MAT_DESCR |
| | #define CUSPARSE_SET_MAT_TYPE CUSPARSE_SET_MAT_TYPE |
| | #define CUSPARSE_GET_MAT_TYPE CUSPARSE_GET_MAT_TYPE |
| | #define CUSPARSE_SET_MAT_FILL_MODE CUSPARSE_SET_MAT_FILL_MODE |
| | #define CUSPARSE_GET_MAT_FILL_MODE CUSPARSE_GET_MAT_FILL_MODE |
| | #define CUSPARSE_SET_MAT_DIAG_TYPE CUSPARSE_SET_MAT_DIAG_TYPE |
| | #define CUSPARSE_GET_MAT_DIAG_TYPE CUSPARSE_GET_MAT_DIAG_TYPE |
| | #define CUSPARSE_SET_MAT_INDEX_BASE CUSPARSE_SET_MAT_INDEX_BASE |
| | #define CUSPARSE_GET_MAT_INDEX_BASE CUSPARSE_GET_MAT_INDEX_BASE |
| | #define CUSPARSE_CREATE_SOLVE_ANALYSIS_INFO CUSPARSE_CREATE_SOLVE_ANALYSIS_INFO |
| | #define CUSPARSE_DESTROY_SOLVE_ANALYSIS_INFO CUSPARSE_DESTROY_SOLVE_ANALYSIS_INFO |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | #define CUSPARSE_SGTSV CUSPARSE_SGTSV |
| | #define CUSPARSE_DGTSV CUSPARSE_DGTSV |
| | #define CUSPARSE_CGTSV CUSPARSE_CGTSV |
| | #define CUSPARSE_ZGTSV CUSPARSE_ZGTSV |
| | #define CUSPARSE_SGTSV_STRIDEDBATCH CUSPARSE_SGTSV_STRIDEDBATCH |
| | #define CUSPARSE_DGTSV_STRIDEDBATCH CUSPARSE_DGTSV_STRIDEDBATCH |
| | #define CUSPARSE_CGTSV_STRIDEDBATCH CUSPARSE_CGTSV_STRIDEDBATCH |
| | #define CUSPARSE_ZGTSV_STRIDEDBATCH CUSPARSE_ZGTSV_STRIDEDBATCH |
| | #define CUSPARSE_SNNZ CUSPARSE_SNNZ |
| | #define CUSPARSE_DNNZ CUSPARSE_DNNZ |
| | #define CUSPARSE_CNNZ CUSPARSE_CNNZ |
| | #define CUSPARSE_ZNNZ CUSPARSE_ZNNZ |
| | #define CUSPARSE_SDENSE2CSR CUSPARSE_SDENSE2CSR |
| | #define CUSPARSE_DDENSE2CSR CUSPARSE_DDENSE2CSR |
| | #define CUSPARSE_CDENSE2CSR CUSPARSE_CDENSE2CSR |
| | #define CUSPARSE_ZDENSE2CSR CUSPARSE_ZDENSE2CSR |
| | #define CUSPARSE_SCSR2DENSE CUSPARSE_SCSR2DENSE |
| | #define CUSPARSE_DCSR2DENSE CUSPARSE_DCSR2DENSE |
| | #define CUSPARSE_CCSR2DENSE CUSPARSE_CCSR2DENSE |
| | #define CUSPARSE_ZCSR2DENSE CUSPARSE_ZCSR2DENSE |
| | #define CUSPARSE_SDENSE2CSC CUSPARSE_SDENSE2CSC |
| | #define CUSPARSE_DDENSE2CSC CUSPARSE_DDENSE2CSC |
| | #define CUSPARSE_CDENSE2CSC CUSPARSE_CDENSE2CSC |
| | #define CUSPARSE_ZDENSE2CSC CUSPARSE_ZDENSE2CSC |
| | #define CUSPARSE_SCSC2DENSE CUSPARSE_SCSC2DENSE |
| | #define CUSPARSE_DCSC2DENSE CUSPARSE_DCSC2DENSE |
| | #define CUSPARSE_CCSC2DENSE CUSPARSE_CCSC2DENSE |
| | #define CUSPARSE_ZCSC2DENSE CUSPARSE_ZCSC2DENSE |
| | #define CUSPARSE_XCOO2CSR CUSPARSE_XCOO2CSR |
| | #define CUSPARSE_XCSR2COO CUSPARSE_XCSR2COO |
| | |
| | |
| | |
| | |
| |
|
| | #else |
| | #error unsupported Fortran compiler |
| | #endif |
| |
|