leapCuda Module

Provides interfaces to CUDA Runtime API


Uses

  • module~~leapcuda~~UsesGraph module~leapcuda leapCuda iso_c_binding iso_c_binding module~leapcuda->iso_c_binding

Used by

  • module~~leapcuda~~UsedByGraph module~leapcuda leapCuda proc~hypre_obj_final hypre_obj%hypre_obj_Final proc~hypre_obj_final->module~leapcuda proc~hypre_obj_setuppointersij hypre_obj%hypre_obj_SetupPointersIJ proc~hypre_obj_setuppointersij->module~leapcuda

Variables

Type Visibility Attributes Name Initial
integer(kind=c_int), public, parameter :: cudaMemAttachGlobal = 1
integer(kind=c_int), public, parameter :: cudaMemAttachHost = 2
integer(kind=c_int), public, parameter :: cudaMemAttachSingle = 4

Interfaces

interface

  • public function cudaDeviceGetAttribute(val, attr, device) bind(c, name="cudaDeviceGetAttribute")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), intent(out) :: val
    integer(kind=c_int), value :: attr
    integer(kind=c_int), value :: device

    Return Value integer(kind=c_int)

interface

  • public function cudaFree(dPtr) bind(c, name="cudaFree")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: dPtr

    Return Value integer(kind=c_int)

interface

  • public function cudaGetDeviceCount(val) bind(c, name="cudaGetDeviceCount")

    Arguments

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

    Return Value integer(kind=c_int)

interface

  • public function cudaMallocManaged(dPtr, size, flags) bind(c, name="cudaMallocManaged")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(out) :: dPtr
    integer(kind=c_size_t), value :: size
    integer(kind=c_int), value :: flags

    Return Value integer(kind=c_int)


Functions

public function device_Get_Attribute(val, attr, device) result(stat)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(out) :: val
integer(kind=int32), intent(in) :: attr
integer(kind=int32), intent(in) :: device

Return Value integer

public function device_Get_Count(val) result(stat)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(out) :: val

Return Value integer

public function device_free(dPtr) result(stat)

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: dPtr

Return Value integer

public function device_malloc_managed(nbytes, dPtr) result(stat)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: nbytes
type(c_ptr), intent(inout) :: dPtr

Return Value integer


Subroutines

public subroutine device_info(devID)

Get information about GPU

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: devID