SELF_GPU Module


Uses

  • module~~self_gpu~~UsesGraph module~self_gpu SELF_GPU iso_c_binding iso_c_binding module~self_gpu->iso_c_binding module~self_gpu_enums~2 SELF_GPU_enums module~self_gpu->module~self_gpu_enums~2 module~self_gpu_enums~2->iso_c_binding

Contents


Interfaces

public interface hipFree

  • public function hipFree_(ptr) bind(c,name="hipFree")

    Arguments

    TypeIntentOptionalAttributesName
    type(c_ptr), value:: ptr

    Return Value integer(kind=c_int)

public interface hipGetDeviceCount

  • public function hipGetDeviceCount_(count) bind(c,name="hipGetDeviceCount")

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=c_int) :: count

    Return Value integer(kind=c_int)

public interface hipMalloc

  • public function hipMalloc_(ptr, mySize) bind(c,name="hipMalloc")

    Arguments

    TypeIntentOptionalAttributesName
    type(c_ptr) :: ptr
    integer(kind=c_size_t), value:: mySize

    Return Value integer(kind=c_int)

public interface hipMemGetInfo

  • public function hipMemGetInfo_(freeBytes, totalBytes) bind(c,name="hipMemGetInfo")

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=c_size_t) :: freeBytes
    integer(kind=c_size_t) :: totalBytes

    Return Value integer(kind=c_int)

public interface hipMemcpy

  • public function hipMemcpy_(dest, src, sizeBytes, myKind) bind(c,name="hipMemcpy")

    Arguments

    TypeIntentOptionalAttributesName
    type(c_ptr), value:: dest
    type(c_ptr), value:: src
    integer(kind=c_size_t), value:: sizeBytes
    integer(kind=c_int), value:: myKind

    Return Value integer(kind=c_int)

public interface hipMemset

  • public function hipMemset_(ptr, value, sizeBytes) bind(c,name="hipMemset")

    Arguments

    TypeIntentOptionalAttributesName
    type(c_ptr), value:: ptr
    integer(kind=c_int), value:: value
    integer(kind=c_size_t), value:: sizeBytes

    Return Value integer(kind=c_int)

public interface hipSetDevice

  • public function hipSetDevice_(device_id) bind(c,name="hipSetDevice")

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=c_int), value:: device_id

    Return Value integer(kind=c_int)


Functions

public function GPUAvailable() result(avail)

Arguments

None

Return Value logical


Subroutines

public subroutine EnsureDeviceBuffer(ptr, allocBytes, neededBytes)

High-water-mark device allocation (AMR Stage 6b). Grows ptr to hold neededBytes, reusing the existing allocation when it already does, and records the capacity in allocBytes. Contents are not preserved across a growth - every caller rewrites the buffer before reading it.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(c_ptr), intent(inout) :: ptr
integer(kind=c_size_t), intent(inout) :: allocBytes
integer(kind=c_size_t), intent(in) :: neededBytes

public subroutine gpuCheck(gpuError_t)

Arguments

TypeIntentOptionalAttributesName
integer(kind=c_int) :: gpuError_t