mfi_blas_cublas Module



Variables

Type Visibility Attributes Name Initial
integer(kind=c_int), public, parameter :: CUBLAS_OP_N = 0

cuBLAS operation constants

integer(kind=c_int), public, parameter :: CUBLAS_OP_T = 1
integer(kind=c_int), public, parameter :: CUBLAS_OP_C = 2
integer(kind=c_int), public, parameter :: CUBLAS_FILL_MODE_UPPER = 0

cuBLAS fill mode constants (standard: UPPER=0, LOWER=1)

integer(kind=c_int), public, parameter :: CUBLAS_FILL_MODE_LOWER = 1
integer(kind=c_int), public, parameter :: CUBLAS_TRSM_FILL_UPPER = 1

cuBLAS fill mode for TRSM/TRMM — empirically inverted vs standard

integer(kind=c_int), public, parameter :: CUBLAS_TRSM_FILL_LOWER = 0
integer(kind=c_int), public, parameter :: CUBLAS_DIAG_NON_UNIT = 0

cuBLAS diagonal constants

integer(kind=c_int), public, parameter :: CUBLAS_DIAG_UNIT = 1
integer(kind=c_int), public, parameter :: CUBLAS_SIDE_LEFT = 0

cuBLAS side constants

integer(kind=c_int), public, parameter :: CUBLAS_SIDE_RIGHT = 1
integer(kind=c_int), public, parameter :: cudaMemcpyHostToDevice = 1

CUDA memory copy direction constants

integer(kind=c_int), public, parameter :: cudaMemcpyDeviceToHost = 2
integer(kind=c_int), public, parameter :: CUBLAS_POINTER_MODE_HOST = 0

cuBLAS pointer mode

integer(kind=c_int), public, parameter :: CUBLAS_STATUS_SUCCESS = 0

cuBLAS status constants

integer(kind=c_int), public, parameter :: CUBLAS_STATUS_NOT_INITIALIZED = 1
integer(kind=c_int), public, parameter :: CUBLAS_STATUS_ALLOC_FAILED = 3
integer(kind=c_int), public, parameter :: CUBLAS_STATUS_INVALID_VALUE = 7
integer(kind=c_int), public, parameter :: CUBLAS_STATUS_ARCH_MISMATCH = 8
integer(kind=c_int), public, parameter :: CUBLAS_STATUS_MAPPING_ERROR = 11
integer(kind=c_int), public, parameter :: CUBLAS_STATUS_EXECUTION_FAILED = 13
integer(kind=c_int), public, parameter :: CUBLAS_STATUS_INTERNAL_ERROR = 14
integer(kind=c_int), public, parameter :: CUBLAS_STATUS_NOT_SUPPORTED = 15
integer(kind=c_int), public, parameter :: CUBLAS_STATUS_LICENSE_ERROR = 16

Interfaces

interface

  • public pure function mfi_cublas_is_active_c() bind(c,name="mfi_cublas_is_active")

    Arguments

    None

    Return Value integer(kind=c_int)

interface

  • public pure function mfi_cublas_handle_count_c() bind(c,name="mfi_cublas_handle_count")

    Arguments

    None

    Return Value integer(kind=c_int)

interface

  • public pure subroutine cuda_malloc(devPtr, size, stat) bind(c,name="mfi_cuda_malloc")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(out) :: devPtr
    integer(kind=c_size_t), intent(in), value :: size
    integer(kind=c_int), intent(out) :: stat

interface

  • public pure subroutine cuda_free(devPtr, stat) bind(c,name="mfi_cuda_free")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(in), value :: devPtr
    integer(kind=c_int), intent(out) :: stat

interface

  • public pure subroutine cudaMemcpy(dst, src, count, kind, stat) bind(c,name="mfi_cuda_memcpy")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(in), value :: dst
    type(c_ptr), intent(in), value :: src
    integer(kind=c_size_t), intent(in), value :: count
    integer(kind=c_int), intent(in), value :: kind
    integer(kind=c_int), intent(out) :: stat

interface

  • public pure subroutine cublasCreate(handle, stat) bind(c,name="mfi_cublas_create")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(out) :: handle
    integer(kind=c_int), intent(out) :: stat

interface

  • public pure subroutine cublasDestroy(handle, stat) bind(c,name="mfi_cublas_destroy")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(in), value :: handle
    integer(kind=c_int), intent(out) :: stat

interface

  • public pure subroutine cublasSetPointerMode(handle, mode, stat) bind(c,name="mfi_cublas_set_pointer_mode")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(in), value :: handle
    integer(kind=c_int), intent(in), value :: mode
    integer(kind=c_int), intent(out) :: stat

interface

  • public pure subroutine mfi_cublas_set_count(count) bind(c,name="mfi_cublas_set_count")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), intent(in), value :: count

interface

  • public pure subroutine mfi_cublas_init_handles(stat) bind(c,name="mfi_cublas_init_handles")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), intent(out) :: stat

interface

  • public pure subroutine mfi_cublas_get_thread_handle(out_handle, stat) bind(c,name="mfi_cublas_get_thread_handle")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(out) :: out_handle
    integer(kind=c_int), intent(out) :: stat

interface

  • public pure subroutine mfi_cublas_finalize_all(stat) bind(c,name="mfi_cublas_finalize_all")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), intent(out) :: stat

interface

  • public pure subroutine mfi_cublas_force_gpu_c() bind(c,name="mfi_cublas_force_gpu")

    Arguments

    None

interface

  • public pure subroutine mfi_cublas_force_cpu_c() bind(c,name="mfi_cublas_force_cpu")

    Arguments

    None

interface

  • public pure subroutine mfi_cublas_lazy_init_c() bind(c,name="mfi_cublas_lazy_init")

    Arguments

    None

interface

  • public pure subroutine mfi_cublas_handle_get_c(handle, stat) bind(c,name="mfi_cublas_get_thread_handle")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(out) :: handle
    integer(kind=c_int), intent(out) :: stat

interface

  • public pure subroutine mfi_cublas_set_threads_c(n) bind(c,name="mfi_cublas_set_threads")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), intent(in), value :: n