dtfft_interface_cuda_runtime Module

CUDA Runtime Interfaces


Uses

  • module~~dtfft_interface_cuda_runtime~~UsesGraph module~dtfft_interface_cuda_runtime dtfft_interface_cuda_runtime iso_c_binding iso_c_binding module~dtfft_interface_cuda_runtime->iso_c_binding module~dtfft_parameters dtfft_parameters module~dtfft_interface_cuda_runtime->module~dtfft_parameters module~dtfft_utils dtfft_utils module~dtfft_interface_cuda_runtime->module~dtfft_utils module~dtfft_parameters->iso_c_binding iso_fortran_env iso_fortran_env module~dtfft_parameters->iso_fortran_env mpi_f08 mpi_f08 module~dtfft_parameters->mpi_f08 module~dtfft_utils->iso_c_binding module~dtfft_utils->module~dtfft_parameters module~dtfft_utils->iso_fortran_env module~dtfft_utils->mpi_f08

Used by

  • module~~dtfft_interface_cuda_runtime~~UsedByGraph module~dtfft_interface_cuda_runtime dtfft_interface_cuda_runtime module~dtfft_abstract_backend dtfft_abstract_backend module~dtfft_abstract_backend->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_kernel dtfft_nvrtc_kernel module~dtfft_abstract_backend->module~dtfft_nvrtc_kernel module~dtfft_pencil dtfft_pencil module~dtfft_abstract_backend->module~dtfft_pencil module~dtfft_abstract_transpose_plan dtfft_abstract_transpose_plan module~dtfft_abstract_transpose_plan->module~dtfft_interface_cuda_runtime module~dtfft_abstract_transpose_plan->module~dtfft_abstract_backend module~dtfft_config dtfft_config module~dtfft_abstract_transpose_plan->module~dtfft_config module~dtfft_abstract_transpose_plan->module~dtfft_nvrtc_kernel module~dtfft_abstract_transpose_plan->module~dtfft_pencil module~dtfft_backend_cufftmp_m dtfft_backend_cufftmp_m module~dtfft_backend_cufftmp_m->module~dtfft_interface_cuda_runtime module~dtfft_backend_cufftmp_m->module~dtfft_abstract_backend module~dtfft_backend_cufftmp_m->module~dtfft_pencil module~dtfft_backend_mpi dtfft_backend_mpi module~dtfft_backend_mpi->module~dtfft_interface_cuda_runtime module~dtfft_backend_mpi->module~dtfft_abstract_backend module~dtfft_backend_nccl_m dtfft_backend_nccl_m module~dtfft_backend_nccl_m->module~dtfft_interface_cuda_runtime module~dtfft_backend_nccl_m->module~dtfft_abstract_backend module~dtfft_config->module~dtfft_interface_cuda_runtime module~dtfft_executor_cufft_m dtfft_executor_cufft_m module~dtfft_executor_cufft_m->module~dtfft_interface_cuda_runtime module~dtfft_executor_cufft_m->module~dtfft_config module~dtfft_abstract_executor dtfft_abstract_executor module~dtfft_executor_cufft_m->module~dtfft_abstract_executor module~dtfft_interface_cuda dtfft_interface_cuda module~dtfft_interface_cuda->module~dtfft_interface_cuda_runtime module~dtfft_interface_nvrtc dtfft_interface_nvrtc module~dtfft_interface_nvrtc->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_kernel->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_kernel->module~dtfft_interface_cuda module~dtfft_nvrtc_kernel->module~dtfft_interface_nvrtc module~dtfft_pencil->module~dtfft_interface_cuda_runtime module~dtfft_plan dtfft_plan module~dtfft_plan->module~dtfft_interface_cuda_runtime module~dtfft_plan->module~dtfft_abstract_transpose_plan module~dtfft_plan->module~dtfft_config module~dtfft_plan->module~dtfft_executor_cufft_m module~dtfft_plan->module~dtfft_nvrtc_kernel module~dtfft_plan->module~dtfft_pencil module~dtfft_transpose_plan_cuda dtfft_transpose_plan_cuda module~dtfft_plan->module~dtfft_transpose_plan_cuda module~dtfft_plan->module~dtfft_abstract_executor module~dtfft_executor_fftw_m dtfft_executor_fftw_m module~dtfft_plan->module~dtfft_executor_fftw_m module~dtfft_executor_vkfft_m dtfft_executor_vkfft_m module~dtfft_plan->module~dtfft_executor_vkfft_m module~dtfft_transpose_plan_host dtfft_transpose_plan_host module~dtfft_plan->module~dtfft_transpose_plan_host module~dtfft_executor_mkl_m dtfft_executor_mkl_m module~dtfft_plan->module~dtfft_executor_mkl_m module~dtfft_transpose_handle_cuda dtfft_transpose_handle_cuda module~dtfft_transpose_handle_cuda->module~dtfft_interface_cuda_runtime module~dtfft_transpose_handle_cuda->module~dtfft_abstract_backend module~dtfft_transpose_handle_cuda->module~dtfft_backend_cufftmp_m module~dtfft_transpose_handle_cuda->module~dtfft_backend_mpi module~dtfft_transpose_handle_cuda->module~dtfft_backend_nccl_m module~dtfft_transpose_handle_cuda->module~dtfft_nvrtc_kernel module~dtfft_transpose_handle_cuda->module~dtfft_pencil module~dtfft_transpose_plan_cuda->module~dtfft_interface_cuda_runtime module~dtfft_transpose_plan_cuda->module~dtfft_abstract_backend module~dtfft_transpose_plan_cuda->module~dtfft_abstract_transpose_plan module~dtfft_transpose_plan_cuda->module~dtfft_config module~dtfft_transpose_plan_cuda->module~dtfft_interface_cuda module~dtfft_transpose_plan_cuda->module~dtfft_interface_nvrtc module~dtfft_transpose_plan_cuda->module~dtfft_nvrtc_kernel module~dtfft_transpose_plan_cuda->module~dtfft_pencil module~dtfft_transpose_plan_cuda->module~dtfft_transpose_handle_cuda module~dtfft dtfft module~dtfft->module~dtfft_config module~dtfft->module~dtfft_pencil module~dtfft->module~dtfft_plan module~dtfft_abstract_executor->module~dtfft_pencil module~dtfft_api dtfft_api module~dtfft_api->module~dtfft_config module~dtfft_api->module~dtfft_pencil module~dtfft_api->module~dtfft_plan module~dtfft_executor_fftw_m->module~dtfft_pencil module~dtfft_executor_fftw_m->module~dtfft_abstract_executor module~dtfft_executor_vkfft_m->module~dtfft_config module~dtfft_executor_vkfft_m->module~dtfft_abstract_executor module~dtfft_transpose_handle_host dtfft_transpose_handle_host module~dtfft_transpose_handle_host->module~dtfft_pencil module~dtfft_transpose_plan_host->module~dtfft_abstract_transpose_plan module~dtfft_transpose_plan_host->module~dtfft_pencil module~dtfft_transpose_plan_host->module~dtfft_transpose_handle_host module~dtfft_executor_mkl_m->module~dtfft_abstract_executor

Variables

Type Visibility Attributes Name Initial
integer(kind=c_int), public, parameter :: cudaEventDisableTiming = 2

Enumerations

enum, bind(c)

Enumerators

enumerator:: cudaSuccess = 0
enumerator:: cudaErrorInvalidValue = 1
enumerator:: cudaErrorMemoryAllocation = 2
enumerator:: cudaErrorInitializationError = 3
enumerator:: cudaErrorCudartUnloading = 4
enumerator:: cudaErrorProfilerDisabled = 5
enumerator:: cudaErrorProfilerNotInitialized = 6
enumerator:: cudaErrorProfilerAlreadyStarted = 7
enumerator:: cudaErrorProfilerAlreadyStopped = 8
enumerator:: cudaErrorInvalidConfiguration = 9
enumerator:: cudaErrorInvalidPitchValue = 12
enumerator:: cudaErrorInvalidSymbol = 13
enumerator:: cudaErrorInvalidHostPointer = 16
enumerator:: cudaErrorInvalidDevicePointer = 17
enumerator:: cudaErrorInvalidTexture = 18
enumerator:: cudaErrorInvalidTextureBinding = 19
enumerator:: cudaErrorInvalidChannelDescriptor = 20
enumerator:: cudaErrorInvalidMemcpyDirection = 21
enumerator:: cudaErrorAddressOfConstant = 22
enumerator:: cudaErrorTextureFetchFailed = 23
enumerator:: cudaErrorTextureNotBound = 24
enumerator:: cudaErrorSynchronizationError = 25
enumerator:: cudaErrorInvalidFilterSetting = 26
enumerator:: cudaErrorInvalidNormSetting = 27
enumerator:: cudaErrorMixedDeviceExecution = 28
enumerator:: cudaErrorNotYetImplemented = 31
enumerator:: cudaErrorMemoryValueTooLarge = 32
enumerator:: cudaErrorInsufficientDriver = 35
enumerator:: cudaErrorInvalidSurface = 37
enumerator:: cudaErrorDuplicateVariableName = 43
enumerator:: cudaErrorDuplicateTextureName = 44
enumerator:: cudaErrorDuplicateSurfaceName = 45
enumerator:: cudaErrorDevicesUnavailable = 46
enumerator:: cudaErrorIncompatibleDriverContext = 49
enumerator:: cudaErrorMissingConfiguration = 52
enumerator:: cudaErrorPriorLaunchFailure = 53
enumerator:: cudaErrorLaunchMaxDepthExceeded = 65
enumerator:: cudaErrorLaunchFileScopedTex = 66
enumerator:: cudaErrorLaunchFileScopedSurf = 67
enumerator:: cudaErrorSyncDepthExceeded = 68
enumerator:: cudaErrorLaunchPendingCountExceeded = 69
enumerator:: cudaErrorInvalidDeviceFunction = 98
enumerator:: cudaErrorNoDevice = 100
enumerator:: cudaErrorInvalidDevice = 101
enumerator:: cudaErrorStartupFailure = 127
enumerator:: cudaErrorInvalidKernelImage = 200
enumerator:: cudaErrorDeviceUninitialized = 201
enumerator:: cudaErrorMapBufferObjectFailed = 205
enumerator:: cudaErrorUnmapBufferObjectFailed = 206
enumerator:: cudaErrorArrayIsMapped = 207
enumerator:: cudaErrorAlreadyMapped = 208
enumerator:: cudaErrorNoKernelImageForDevice = 209
enumerator:: cudaErrorAlreadyAcquired = 210
enumerator:: cudaErrorNotMapped = 211
enumerator:: cudaErrorNotMappedAsArray = 212
enumerator:: cudaErrorNotMappedAsPointer = 213
enumerator:: cudaErrorECCUncorrectable = 214
enumerator:: cudaErrorUnsupportedLimit = 215
enumerator:: cudaErrorDeviceAlreadyInUse = 216
enumerator:: cudaErrorPeerAccessUnsupported = 217
enumerator:: cudaErrorInvalidPtx = 218
enumerator:: cudaErrorInvalidGraphicsContext = 219
enumerator:: cudaErrorNvlinkUncorrectable = 220
enumerator:: cudaErrorJitCompilerNotFound = 221
enumerator:: cudaErrorInvalidSource = 300
enumerator:: cudaErrorFileNotFound = 301
enumerator:: cudaErrorSharedObjectSymbolNotFound = 302
enumerator:: cudaErrorSharedObjectInitFailed = 303
enumerator:: cudaErrorOperatingSystem = 304
enumerator:: cudaErrorInvalidResourceHandle = 400
enumerator:: cudaErrorIllegalState = 401
enumerator:: cudaErrorSymbolNotFound = 500
enumerator:: cudaErrorNotReady = 600
enumerator:: cudaErrorIllegalAddress = 700
enumerator:: cudaErrorLaunchOutOfResources = 701
enumerator:: cudaErrorLaunchTimeout = 702
enumerator:: cudaErrorLaunchIncompatibleTexturing = 703
enumerator:: cudaErrorPeerAccessAlreadyEnabled = 704
enumerator:: cudaErrorPeerAccessNotEnabled = 705
enumerator:: cudaErrorSetOnActiveProcess = 708
enumerator:: cudaErrorContextIsDestroyed = 709
enumerator:: cudaErrorAssert = 710
enumerator:: cudaErrorTooManyPeers = 711
enumerator:: cudaErrorHostMemoryAlreadyRegistered = 712
enumerator:: cudaErrorHostMemoryNotRegistered = 713
enumerator:: cudaErrorHardwareStackError = 714
enumerator:: cudaErrorIllegalInstruction = 715
enumerator:: cudaErrorMisalignedAddress = 716
enumerator:: cudaErrorInvalidAddressSpace = 717
enumerator:: cudaErrorInvalidPc = 718
enumerator:: cudaErrorLaunchFailure = 719
enumerator:: cudaErrorCooperativeLaunchTooLarge = 720
enumerator:: cudaErrorNotPermitted = 800
enumerator:: cudaErrorNotSupported = 801
enumerator:: cudaErrorSystemNotReady = 802
enumerator:: cudaErrorSystemDriverMismatch = 803
enumerator:: cudaErrorCompatNotSupportedOnDevice = 804
enumerator:: cudaErrorStreamCaptureUnsupported = 900
enumerator:: cudaErrorStreamCaptureInvalidated = 901
enumerator:: cudaErrorStreamCaptureMerge = 902
enumerator:: cudaErrorStreamCaptureUnmatched = 903
enumerator:: cudaErrorStreamCaptureUnjoined = 904
enumerator:: cudaErrorStreamCaptureIsolation = 905
enumerator:: cudaErrorStreamCaptureImplicit = 906
enumerator:: cudaErrorCapturedEvent = 907
enumerator:: cudaErrorStreamCaptureWrongThread = 908
enumerator:: cudaErrorTimeout = 909
enumerator:: cudaErrorGraphExecUpdateFailure = 910
enumerator:: cudaErrorUnknown = 999
enumerator:: cudaErrorApiFailureBase = 10000

enum, bind(c)

Enumerators

enumerator:: cudaMemcpyHostToHost = 0
enumerator:: cudaMemcpyHostToDevice = 1
enumerator:: cudaMemcpyDeviceToHost = 2
enumerator:: cudaMemcpyDeviceToDevice = 3
enumerator:: cudaMemcpyDefault = 4

Interfaces

interface

Queries an asynchronous stream for completion status.

  • public function cudaStreamQuery(stream) result(cudaError_t) bind(C, name="cudaStreamQuery")

    Arguments

    Type IntentOptional Attributes Name
    type(dtfft_stream_t), value :: stream

    Stream identifier

    Return Value integer(kind=c_int)

    Returns cudaSuccess if all operations in stream have completed, or cudaErrorNotReady if not.

interface

Creates an asynchronous stream.

  • public function cudaStreamCreate(stream) result(cudaError_t) bind(C, name="cudaStreamCreate")

    Arguments

    Type IntentOptional Attributes Name
    type(dtfft_stream_t) :: stream

    Pointer to the created stream

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the stream was created successfully, or an error code if there was an issue.

interface

Destroys an asynchronous stream.

  • public function cudaStreamDestroy(stream) result(cudaError_t) bind(C, name="cudaStreamDestroy")

    Arguments

    Type IntentOptional Attributes Name
    type(dtfft_stream_t), value :: stream

    Stream identifier

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the stream was destroyed successfully, or an error code if there was an issue.

interface

Waits for stream tasks to complete.

  • public function cudaStreamSynchronize(stream) result(cudaError_t) bind(C, name="cudaStreamSynchronize")

    Arguments

    Type IntentOptional Attributes Name
    type(dtfft_stream_t), value :: stream

    Stream identifier

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the stream tasks completed successfully, or an error code if there was an issue.

interface

Allocates memory on the device.

  • public function cudaMalloc(ptr, count) result(cudaError_t) bind(C, name="cudaMalloc")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr) :: ptr

    Pointer to allocated device memory

    integer(kind=c_size_t), value :: count

    Requested allocation size in bytes

    Return Value integer(kind=c_int)

    Returns cudaSuccess if memory was allocated successfully, or cudaErrorMemoryAllocation if the memory could not be allocated.

interface

Frees memory on the device.

  • public function cudaFree(ptr) result(cudaError_t) bind(C, name="cudaFree")

    Arguments

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

    Pointer to memory to free

    Return Value integer(kind=c_int)

    Returns cudaSuccess if memory was freed successfully, or an error code if there was an issue.

interface

Initializes or sets device memory to a value.

  • public function cudaMemset(ptr, val, count) result(cudaError_t) bind(C, name="cudaMemset")

    Arguments

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

    Pointer to device memory

    integer(kind=c_int), value :: val

    Value to set

    integer(kind=c_size_t), value :: count

    Size in bytes to set

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the memory was set successfully, or an error code if there was an issue.

interface

Creates an event with the specified flags.

  • public function cudaEventCreateWithFlags(event, flags) result(cudaError_t) bind(C, name="cudaEventCreateWithFlags")

    Arguments

    Type IntentOptional Attributes Name
    type(cudaEvent) :: event

    Event identifier

    integer(kind=c_int), value :: flags

    Flags for event creation

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the event was created successfully, or an error code if there was an issue.

interface

Records an event in a stream.

  • public function cudaEventRecord(event, stream) result(cudaError_t) bind(C, name="cudaEventRecord")

    Arguments

    Type IntentOptional Attributes Name
    type(cudaEvent), value :: event

    Event identifier

    type(dtfft_stream_t), value :: stream

    Stream identifier

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the event was recorded successfully, or an error code if there was an issue.

interface

Makes a stream wait on an event.

  • public function cudaStreamWaitEvent(stream, event, flags) result(cudaError_t) bind(C, name="cudaStreamWaitEvent")

    Arguments

    Type IntentOptional Attributes Name
    type(dtfft_stream_t), value :: stream

    Stream identifier

    type(cudaEvent), value :: event

    Event identifier

    integer(kind=c_int), value :: flags

    Flags for the wait operation

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the stream is waiting successfully, or an error code if there was an issue.

interface

Destroys an event.

  • public function cudaEventDestroy(event) result(cudaError_t) bind(C, name="cudaEventDestroy")

    Arguments

    Type IntentOptional Attributes Name
    type(cudaEvent), value :: event

    Event identifier

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the event was destroyed successfully, or an error code if there was an issue.

interface

Creates an event.

  • public function cudaEventCreate(event) result(cudaError_t) bind(C, name="cudaEventCreate")

    Arguments

    Type IntentOptional Attributes Name
    type(cudaEvent) :: event

    Event identifier

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the event was created successfully, or an error code if there was an issue.

interface

Waits for an event to complete.

  • public function cudaEventSynchronize(event) result(cudaError_t) bind(C, name="cudaEventSynchronize")

    Arguments

    Type IntentOptional Attributes Name
    type(cudaEvent), value :: event

    Event identifier

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the event completed successfully, or an error code if there was an issue.

interface

Computes the elapsed time between two events.

  • public function cudaEventElapsedTime(time, start, end) result(cudaError_t) bind(C, name="cudaEventElapsedTime")

    Arguments

    Type IntentOptional Attributes Name
    real(kind=c_float) :: time

    Elapsed time in milliseconds

    type(cudaEvent), value :: start

    Starting event

    type(cudaEvent), value :: end

    Ending event

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the elapsed time was computed successfully, or an error code if there was an issue.

public interface cudaMemcpyAsync

Copies data asynchronously between host and device.

  • private function cudaMemcpyAsync_ptr(dst, src, count, kdir, stream) result(cudaError_t) bind(C, name="cudaMemcpyAsync")

    Arguments

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

    Destination pointer

    type(c_ptr), value :: src

    Source pointer

    integer(kind=c_size_t), value :: count

    Size in bytes to copy

    integer(kind=c_int), value :: kdir

    Direction of copy (host-to-device, device-to-host, etc.)

    type(dtfft_stream_t), value :: stream

    Stream identifier

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the copy was initiated successfully, or an error code if there was an issue.

  • private function cudaMemcpyAsync_r32(dst, src, count, kdir, stream) result(cudaError_t) bind(C, name="cudaMemcpyAsync")

    Arguments

    Type IntentOptional Attributes Name
    real(kind=c_float) :: dst

    Destination array (32-bit float)

    real(kind=c_float) :: src

    Source array (32-bit float)

    integer(kind=c_size_t), value :: count

    Number of elements to copy

    integer(kind=c_int), value :: kdir

    Direction of copy

    type(dtfft_stream_t), value :: stream

    Stream identifier

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the copy was initiated successfully, or an error code if there was an issue.

public interface cudaMemcpy

Copies data synchronously between host and device.

  • private function cudaMemcpy_ptr(dst, src, count, kdir) result(cudaError_t) bind(C, name="cudaMemcpy")

    Arguments

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

    Destination pointer

    type(c_ptr), value :: src

    Source pointer

    integer(kind=c_size_t), value :: count

    Size in bytes to copy

    integer(kind=c_int), value :: kdir

    Direction of copy

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the copy was completed successfully, or an error code if there was an issue.

  • private function cudaMemcpy_r64(dst, src, count, kdir) result(cudaError_t) bind(C, name="cudaMemcpy")

    Arguments

    Type IntentOptional Attributes Name
    real(kind=c_double) :: dst(*)

    Destination array (64-bit float)

    real(kind=c_double) :: src(*)

    Source array (64-bit float)

    integer(kind=c_size_t), value :: count

    Number of bytes to copy

    integer(kind=c_int), value :: kdir

    Direction of copy

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the copy was completed successfully, or an error code if there was an issue.

  • private function cudaMemcpy_r32(dst, src, count, kdir) result(cudaError_t) bind(C, name="cudaMemcpy")

    Arguments

    Type IntentOptional Attributes Name
    real(kind=c_float) :: dst(*)

    Destination array (32-bit float)

    real(kind=c_float) :: src(*)

    Source array (32-bit float)

    integer(kind=c_size_t), value :: count

    Number of bytes to copy

    integer(kind=c_int), value :: kdir

    Direction of copy

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the copy was completed successfully, or an error code if there was an issue.

interface

Returns the current device.

  • public function cudaGetDevice(num) result(cudaError_t) bind(C, name="cudaGetDevice")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int) :: num

    Device number

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the device was retrieved successfully, or an error code if there was an issue.

interface

Returns the number of available devices.

  • public function cudaGetDeviceCount(num) result(cudaError_t) bind(C, name="cudaGetDeviceCount")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int) :: num

    Number of devices

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the device count was retrieved successfully, or an error code if there was an issue.

interface

Sets the current device.

  • public function cudaSetDevice(num) result(cudaError_t) bind(C, name="cudaSetDevice")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), value :: num

    Device number

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the device was set successfully, or an error code if there was an issue.

interface

Returns the CUDA architecture for a given device.

  • public subroutine get_cuda_architecture(device, major, minor) bind(C, name="get_cuda_architecture")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), value :: device

    Device number

    integer(kind=c_int) :: major

    Major compute capability

    integer(kind=c_int) :: minor

    Minor compute capability

interface

Returns the amount of free and total memory on the device.

  • public function cudaMemGetInfo(free, total) result(cudaError_t) bind(C, name="cudaMemGetInfo")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_size_t) :: free

    Free memory in bytes

    integer(kind=c_size_t) :: total

    Total memory in bytes

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the memory information was retrieved successfully, or an error code if there was an issue.

interface

Synchronizes the device, blocking until all preceding tasks in all streams have completed.

  • public function cudaDeviceSynchronize() result(cudaError_t) bind(C, name="cudaDeviceSynchronize")

    Arguments

    None

    Return Value integer(kind=c_int)

    Returns cudaSuccess if the device was set successfully, or an error code if there was an issue.

interface

Returns the string representation of an error code.

  • private function cudaGetErrorString_c(errcode) result(string) bind(C, name="cudaGetErrorString")

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), value :: errcode

    Error code

    Return Value type(c_ptr)

    Pointer to the error string


Derived Types

type, public, bind(C) ::  dim3

Dimension specification type

Components

Type Visibility Attributes Name Initial
integer(kind=c_int), public :: x
integer(kind=c_int), public :: y
integer(kind=c_int), public :: z

type, public, bind(C) ::  cudaEvent

CUDA event types

Components

Type Visibility Attributes Name Initial
type(c_ptr), public :: event

Handle


Functions

public function cudaGetErrorString(errcode) result(string)

Helper function that returns a string describing the given nvrtcResult code If the error code is not recognized, “unrecognized error code” is returned.

Arguments

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

CUDA Runtime Compilation API result code.

Return Value character(len=:), allocatable

Result string